Re: [PATCH 1/1] ext4: better error handling of kstrdup()

2015-04-03 Thread Taesoo Kim
n 04/03/15 at 01:09am, Theodore Ts'o wrote: > On Fri, Mar 20, 2015 at 05:21:54PM -0400, Taesoo Kim wrote: > > Upon memory pressure, kstrdup() might fail and correctly > > handle memory error, although current implementation do not > > refer orig_data. > > > >

[PATCH 1/1] hpfs: update ctime/mtime of old/new_dir

2015-03-24 Thread Taesoo Kim
Upon successful rename(), update ctime and mtime of old/new_dir, as posix specifies. Signed-off-by: Taesoo Kim --- fs/hpfs/namei.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c index bdbc2c3..8d8669c 100644 --- a/fs/hpfs/namei.c +++ b/fs/hpfs

[PATCH 1/1] udf: update ctime and mtime of new_dir

2015-03-24 Thread Taesoo Kim
Upon successful rename(), update ctime and mtime of new_dir as posix specifies. Signed-off-by: Taesoo Kim --- fs/udf/namei.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/udf/namei.c b/fs/udf/namei.c index 33b246b..eca1955 100644 --- a/fs/udf/namei.c +++ b/fs/udf/namei.c @@ -1144,6

Re: [PATCH] xfs: use GFP_NOFS argument in radix_tree_preload

2015-03-22 Thread Taesoo Kim
Hi Dave, Thank you for letting us know. Since we are not an expert of XFS (nor want to be), we really want to let you guys know it's potential bug that you might miss (we are helping you!). And that's why Sanidhya asked (rather than sending a patch) at the first place. I agree that the comment is

Re: [PATCH 1/1] f2fs: correctly check empty xattr key

2015-03-22 Thread Taesoo Kim
error condition. We are wondering if it is the real reason for f2fs's design decision. Thank you, Taesoo On 03/20/15 at 01:52pm, Jaegeuk Kim wrote: > Hi Taesoo, > > On Fri, Mar 20, 2015 at 12:19:07AM -0400, Taesoo Kim wrote: > > When xattr name (key) is empty (""), cor

Re: [PATCH 1/1] cifs: potential memory leaks when parsing mnt opts

2015-03-21 Thread Taesoo Kim
On 03/21/15 at 09:10pm, Scott Lovenberg wrote: > On Sat, Mar 21, 2015 at 6:08 PM, Taesoo Kim wrote: > > > Althouhg mkfs.cifs in userspace performs a bit of sanitization > > (e.g., forcing one user option), current implementation is not > > robust. Other options such as

[PATCH 1/1] cifs: potential memory leaks when parsing mnt opts

2015-03-21 Thread Taesoo Kim
ementation is not robust. Other options such as iocharset and domainanme are similary vulnerable. Signed-off-by: Taesoo Kim --- fs/cifs/connect.c | 4 1 file changed, 4 insertions(+) diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index d3aa999..4cb8450 100644 --- a/fs/cifs/connect.c +++

Re: [PATCH 1/1] fs/affs/file.c: unlock/release page on error

2015-03-21 Thread Taesoo Kim
Thank you for letting us know. We will definitely do it for the next time. Thanks again for checking this out. Taesoo On 03/21/15 at 08:51pm, Fabian Frederick wrote: > > > > On 21 March 2015 at 18:31 Taesoo Kim wrote: > > > > > > When affs_bread_ino() fails,

Re: [PATCH] NFS: fix potential NULL deref in nfs_closedir()

2015-03-21 Thread Taesoo Kim
:21:18AM -0400, Taesoo Kim wrote: > > From: Byoungyoung Lee > > > > When filp->private_data is NULL, put_nfs_open_dir_context() > > deferences its pointer (fi->list, fi->cred), similar to what > > other file systems handle '.release' api (9p

[PATCH 1/1] fs/affs/file.c: unlock/release page on error

2015-03-21 Thread Taesoo Kim
When affs_bread_ino() fails, correctly unlock the page and release the page cache with proper error value. All write_end() should unlock/release the page that was locked by write_beg(). Signed-off-by: Taesoo Kim --- fs/affs/file.c | 19 --- 1 file changed, 12 insertions(+), 7

[PATCH] NFS: fix potential NULL deref in nfs_closedir()

2015-03-20 Thread Taesoo Kim
From: Byoungyoung Lee When filp->private_data is NULL, put_nfs_open_dir_context() deferences its pointer (fi->list, fi->cred), similar to what other file systems handle '.release' api (9p, cifs, btrfs, ext4, ocfs2). Signed-off-by: Byoungyoung Lee Signed-off-by: Taesoo Kim

[PATCH 1/1] ufs: return correct errno for write_inode()

2015-03-20 Thread Taesoo Kim
Instead of -1, properly return -EIO upon write_inode() error, similar/consistant to the rest of filesystems. Signed-off-by: Taesoo Kim --- fs/ufs/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index be7d42c..9f910d8 100644 --- a

[PATCH 1/1] ceph: properly release page upon error

2015-03-20 Thread Taesoo Kim
When ceph_update_writeable_page fails (including -EAGAIN), it unlocks (w/ unlock_page) the page but does not 'release' (w/ page_cache_release) properly. Upon error, properly set *pagep to NULL, indicating an error. Signed-off-by: Taesoo Kim --- fs/ceph/addr.c | 4 1 file

[PATCH 1/1] ext4: better error handling of kstrdup()

2015-03-20 Thread Taesoo Kim
ned-off-by: Taesoo Kim --- fs/ext4/super.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index e061e66..e2a609c 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -3408,7 +3408,7 @@ static int ext4_reserve_clusters(struct ext4_sb_

inconsistent timestamp update in rename() of xfs/fat/gfs2/ramfs/jffs2...

2015-03-20 Thread Taesoo Kim
Hi all, We've cross-checking patches from ext3/ext4, and found out inconsistent implementations of other fs. We want to ask whether this is intended or unexpected behavior. We will be able to send patches as soon as confirmed/acknowledged. Ref. (ext4) 53b7e9f6807c1274eee19201396b4c2b5f721553 (ex

[PATCH 1/1] f2fs: correctly check empty xattr key

2015-03-19 Thread Taesoo Kim
When xattr name (key) is empty (""), correctly return -EINVAL error. xattr_advise_set/get() seem to make the same mistake. Signed-off-by: Taesoo Kim --- fs/f2fs/xattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c ind

[PATCH 1/1] 9p: correctly check empty xattr key

2015-03-19 Thread Taesoo Kim
When xattr name (key) is empty (""), correctly return -EINVAL error. Not sure how previous xattr_set_acl() performs with any xattr key for get/set(). Signed-off-by: Taesoo Kim --- fs/9p/acl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/9p/acl.c b/fs/9p/a

[PATCH 1/1] udf: block-based fs should use generic_write_end()

2015-03-19 Thread Taesoo Kim
simple_write_end() is for non-block fs, which doesn't invoke mark_inode_dirty(). Instead, generic_write_end() correctly handles such case when i_size has changed. Signed-off-by: Taesoo Kim --- fs/udf/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/udf/file.c

[PATCH 1/1] fs/affs/file.c: unlock/release page on error

2015-03-19 Thread Taesoo Kim
When affs_bread_ino() fails, correctly unlock the page and release the page cache with proper error value. All write_end() should unlock/release the page that was locked by write_beg(). Signed-off-by: Taesoo Kim --- fs/affs/file.c | 13 + 1 file changed, 9 insertions(+), 4 deletions

Re: [PATCH 1/1] jbd2: fix incorrect unlock on j_list_lock

2015-03-19 Thread Taesoo Kim
On 03/19/15 at 10:48am, Lukáš Czerner wrote: > On Wed, 18 Mar 2015, Taesoo Kim wrote: > > > Date: Wed, 18 Mar 2015 13:39:31 -0400 > > From: Taesoo Kim > > To: Lukáš Czerner > > Cc: Taesoo Kim , ty...@mit.edu, > > linux-e...@vger.kernel.org, linux-k

Re: [PATCH 1/1] jbd2: fix incorrect unlock on j_list_lock

2015-03-18 Thread Taesoo Kim
erns; our first goal is to scan over existing filesystems and figure out how they are implemented differently (or similarly). We will report bugs in sequence as soon as our team confirm (just start sending patches to other fs). Thanks, Taesoo > Thanks! > -Lukas > > >

Re: [PATCH 1/1] UBIFS: fix incorrect unlocking handling

2015-03-17 Thread Taesoo Kim
at 08:18pm, Brian Norris wrote: > On Tue, Mar 17, 2015 at 10:09:26PM -0400, Taesoo Kim wrote: > > When ubifs_init_security() fails, 'ui_mutex' is incorrectly > > unlocked and incorrectly restores 'i_size'. There are four > > such places that were introduce by

[PATCH 1/1] UBIFS: fix incorrect unlocking handling

2015-03-17 Thread Taesoo Kim
When ubifs_init_security() fails, 'ui_mutex' is incorrectly unlocked and incorrectly restores 'i_size'. There are four such places that were introduce by the last commit. Signed-off-by: Taesoo Kim --- fs/ubifs/dir.c | 11 +++ 1 file changed, 7 insertions(+), 4 deleti

[PATCH 1/1] jbd2: fix incorrect unlock on j_list_lock

2015-03-17 Thread Taesoo Kim
When 'jh->b_transaction == transaction' (asserted by below) J_ASSERT_JH(jh, (jh->b_transaction == transaction || ... 'journal->j_list_lock' will be incorrectly unlocked, since the the lock is aquired only at the end of if / else-if statements (missing the else case

[tip:perf/urgent] perf list: Fix --raw-dump option

2015-01-08 Thread tip-bot for Taesoo Kim
Commit-ID: b3505208804f3b59150cd77719f01c8b0023a865 Gitweb: http://git.kernel.org/tip/b3505208804f3b59150cd77719f01c8b0023a865 Author: Taesoo Kim AuthorDate: Tue, 30 Dec 2014 22:36:55 -0500 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 2 Jan 2015 23:26:58 -0300 perf list: Fix

[PATCH 1/1] perf list: Fix --raw-dump option

2014-12-30 Thread Taesoo Kim
list --raw-dump cpu-cycles instructions cache-references cache-misses ... Signed-off-by: Taesoo Kim --- tools/perf/builtin-list.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c index 011195e..198f3c3 100644 -

[PATCH 1/1] perf list: Fix --raw-dump option

2014-12-29 Thread Taesoo Kim
list --raw-dump cpu-cycles instructions cache-references cache-misses ... Signed-off-by: Taesoo Kim --- tools/perf/builtin-list.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c index 011195e..3783c28 100

[PATCH 1/1] perf list: Fix --raw-dump option

2014-12-26 Thread Taesoo Kim
list --raw-dump cpu-cycles instructions cache-references cache-misses ... Signed-off-by: Taesoo Kim --- tools/perf/builtin-list.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c index 011195e..ec76bee 100644 -