[PATCH] squashfs: return correct error value

2015-03-25 Thread Sanidhya Kashyap
In the squashfs_symlink_readpage(), the return value should be -EIO instead of 0 when the code fails in obtaining the information about the symlink metadata. Signed-off-by: Sanidhya Kashyap --- fs/squashfs/symlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/squashfs

[PATCH] squashfs: return correct error value

2015-03-25 Thread Sanidhya Kashyap
In the squashfs_symlink_readpage(), the return value should be -EIO instead of 0 when the code fails in obtaining the information about the symlink metadata. Signed-off-by: Sanidhya Kashyap sanidhya.gat...@gmail.com --- fs/squashfs/symlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] bfs: correct return values

2015-03-24 Thread Sanidhya Kashyap
In case of no memory allocation, the return should be ENOMEM instead of ENOSPC. Well, for the other case, in which the buffer head is not allocated, in that case -EIO should be returned. Signed-off-by: Sanidhya Kashyap --- fs/bfs/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH] ocfs2: trusted xattr missing CAP_SYS_ADMIN check

2015-03-24 Thread Sanidhya Kashyap
not have access to. Signed-off-by: Sanidhya Kashyap --- fs/ocfs2/xattr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 85b190d..71a6551 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -7326,6 +7326,9 @@ static size_t

missing MS_RDONLY check in fsync

2015-03-24 Thread Sanidhya Kashyap
Hello everyone, We've been cross checking various file systems for the general inconsistencies and we have a question about the check of MS_RDONLY during fsync. We know that the vfs layer does not check for MS_RDONLY for fsync and this is confirmed by the ubifs where they have explicitly

[PATCH] bfs: correct return values

2015-03-24 Thread Sanidhya Kashyap
In case of no memory allocation, the return should be ENOMEM instead of ENOSPC. Well, for the other case, in which the buffer head is not allocated, in that case -EIO should be returned. Signed-off-by: Sanidhya Kashyap sanidhya.gat...@gmail.com --- fs/bfs/dir.c | 4 ++-- 1 file changed, 2

[PATCH] ocfs2: trusted xattr missing CAP_SYS_ADMIN check

2015-03-24 Thread Sanidhya Kashyap
not have access to. Signed-off-by: Sanidhya Kashyap sanidhya.gat...@gmail.com --- fs/ocfs2/xattr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 85b190d..71a6551 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -7326,6 +7326,9 @@ static

missing MS_RDONLY check in fsync

2015-03-24 Thread Sanidhya Kashyap
Hello everyone, We've been cross checking various file systems for the general inconsistencies and we have a question about the check of MS_RDONLY during fsync. We know that the vfs layer does not check for MS_RDONLY for fsync and this is confirmed by the ubifs where they have explicitly

[PATCH] adfs: returning correct return values

2015-03-23 Thread Sanidhya Kashyap
This patch tries to fix the wrong values returned by various functions such as EIO and ENOMEM. Signed-off-by: Sanidhya Kashyap --- fs/adfs/dir_fplus.c | 1 + fs/adfs/super.c | 20 +++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/fs/adfs/dir_fplus.c b/fs

missing MS_RDONLY check in fsync

2015-03-23 Thread Sanidhya Kashyap
Hello everyone, We've been cross checking various file systems for the general inconsistencies and we have a question about the check of MS_RDONLY during fsync. We know that the vfs layer does not check for MS_RDONLY for fsync and this is confirmed by the ubifs where they have explicitly

[PATCH] ubifs: propagate error value than 0

2015-03-23 Thread Sanidhya Kashyap
Currently, ubifs_readpage only returns 0 even if ubifs_bulk_read() fails. Therefore propagating error to the above functions which have called ubifs_readpage. Another check that is missing is ENOMEM for kmalloc in ubifs_bulk_read. Signed-off-by: Sanidhya Kashyap --- fs/ubifs/file.c | 11

[PATCH] ubifs: propagate error value than 0

2015-03-23 Thread Sanidhya Kashyap
Currently, ubifs_readpage only returns 0 even if ubifs_bulk_read() fails. Therefore propagating error to the above functions which have called ubifs_readpage. Another check that is missing is ENOMEM for kmalloc in ubifs_bulk_read. Signed-off-by: Sanidhya Kashyap sanidhya.gat...@gmail.com --- fs

missing MS_RDONLY check in fsync

2015-03-23 Thread Sanidhya Kashyap
Hello everyone, We've been cross checking various file systems for the general inconsistencies and we have a question about the check of MS_RDONLY during fsync. We know that the vfs layer does not check for MS_RDONLY for fsync and this is confirmed by the ubifs where they have explicitly

[PATCH] adfs: returning correct return values

2015-03-23 Thread Sanidhya Kashyap
This patch tries to fix the wrong values returned by various functions such as EIO and ENOMEM. Signed-off-by: Sanidhya Kashyap sanidhya.gat...@gmail.com --- fs/adfs/dir_fplus.c | 1 + fs/adfs/super.c | 20 +++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git

[PATCH] ubifs: return err value than 0

2015-03-22 Thread Sanidhya Kashyap
Currently, ubifs_readpage only returns 0 even if ubifs_bulk_read() fails. Like the other file systems, the error value should be propagated further instead of 0. Another check that is missing is ENOMEM for kmalloc. Signed-off-by: Sanidhya Kashyap --- fs/ubifs/file.c | 13 + 1 file

[PATCH] xfs: use GFP_NOFS argument in radix_tree_preload

2015-03-22 Thread Sanidhya Kashyap
From: Byoungyoung Lee Following the convention of other file systems, GFP_NOFS should be used as an argument for radix_tree_preload() instead of GFP_KERNEL. Signed-off-by: Byoungyoung Lee Signed-off-by: Sanidhya Kashyap --- fs/xfs/xfs_mru_cache.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH] reiserfs: kstrdup() memory handling

2015-03-22 Thread Sanidhya Kashyap
On Sat, Mar 21, 2015 at 1:15 PM, Josh Triplett wrote: > On Sat, Mar 21, 2015 at 01:00:13PM -0400, Sanidhya Kashyap wrote: >> Checking for ENOMEM even for new_opts in reiserfs_remount function as >> there is a possibility of nothing being allocated. > > You don't need to a

Re: [PATCH] reiserfs: kstrdup() memory handling

2015-03-22 Thread Sanidhya Kashyap
On Sat, Mar 21, 2015 at 1:15 PM, Josh Triplett j...@joshtriplett.org wrote: On Sat, Mar 21, 2015 at 01:00:13PM -0400, Sanidhya Kashyap wrote: Checking for ENOMEM even for new_opts in reiserfs_remount function as there is a possibility of nothing being allocated. You don't need to add a new

[PATCH] xfs: use GFP_NOFS argument in radix_tree_preload

2015-03-22 Thread Sanidhya Kashyap
From: Byoungyoung Lee b...@gatech.edu Following the convention of other file systems, GFP_NOFS should be used as an argument for radix_tree_preload() instead of GFP_KERNEL. Signed-off-by: Byoungyoung Lee b...@gatech.edu Signed-off-by: Sanidhya Kashyap sanidhya.gat...@gmail.com --- fs/xfs

[PATCH] ubifs: return err value than 0

2015-03-22 Thread Sanidhya Kashyap
Currently, ubifs_readpage only returns 0 even if ubifs_bulk_read() fails. Like the other file systems, the error value should be propagated further instead of 0. Another check that is missing is ENOMEM for kmalloc. Signed-off-by: Sanidhya Kashyap sanidhya.gat...@gmail.com --- fs/ubifs/file.c

[PATCH] afs: kstrdup() memory handling

2015-03-21 Thread Sanidhya Kashyap
Handling kstrdup() failure in case of memory pressure even for new_opts. Signed-off-by: Sanidhya Kashyap --- fs/afs/super.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/afs/super.c b/fs/afs/super.c index c486155..477f38e 100644 --- a/fs/afs/super.c +++ b/fs/afs

Re: [PATCH] afs: kstrdup() memory handling

2015-03-21 Thread Sanidhya Kashyap
On Sat, Mar 21, 2015 at 1:07 PM, Jeff Epler wrote: > On Sat, Mar 21, 2015 at 12:50:09PM -0400, Sanidhya Kashyap wrote: >> + if (new_opts) >> + goto error_out; > > Missing "!"? > Ohh! Sorry, missed it! Resending the patch? Thanks, Sanid

[PATCH] nfs: kstrdup() memory handling

2015-03-21 Thread Sanidhya Kashyap
nfs4_init_nonuniform_client_string(), nfs4_init_uniform_client_string() and _nfs4_proc_exchange_id(). Signed-off-by: Sanidhya Kashyap --- fs/nfs/nfs4client.c | 9 - fs/nfs/nfs4proc.c | 30 -- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/fs/nfs/nfs4client.c b/fs/nfs

[PATCH] reiserfs: kstrdup() memory handling

2015-03-21 Thread Sanidhya Kashyap
Checking for ENOMEM even for new_opts in reiserfs_remount function as there is a possibility of nothing being allocated. Signed-off-by: Sanidhya Kashyap --- fs/reiserfs/super.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 71fbbe3

[PATCH] affs: kstrdup() memory handling

2015-03-21 Thread Sanidhya Kashyap
There is a possibility of kstrdup() failure upon memory pressure. Therefore, returning ENOMEM even for new_opts. Signed-off-by: Sanidhya Kashyap --- fs/affs/super.c | 4 1 file changed, 4 insertions(+) diff --git a/fs/affs/super.c b/fs/affs/super.c index 4cf0e91..f4d0d36 100644 --- a/fs

[PATCH] hpfs: kstrdup() memory handling

2015-03-21 Thread Sanidhya Kashyap
There is a possibility of nothing being allocated to the new_opts in case of memory pressure, therefore return ENOMEM for such case. Signed-off-by: Sanidhya Kashyap --- fs/hpfs/super.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c index 7cd00d3

[PATCH] ceph: kstrdup() memory handling

2015-03-21 Thread Sanidhya Kashyap
Currently, there is no check for the kstrdup() for r_path2, r_path1 and snapdir_name as various locations as there is a possibility of failure during memory pressure. Therefore, returning ENOMEM where the checks have been missed. Signed-off-by: Sanidhya Kashyap --- fs/ceph/dir.c | 11

[PATCH] afs: kstrdup() memory handling

2015-03-21 Thread Sanidhya Kashyap
Handling kstrdup() failure in case of memory pressure even for new_opts. Signed-off-by: Sanidhya Kashyap --- fs/afs/super.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/afs/super.c b/fs/afs/super.c index c486155..477f38e 100644 --- a/fs/afs/super.c +++ b/fs/afs

[PATCH] afs: kstrdup() memory handling

2015-03-21 Thread Sanidhya Kashyap
Handling kstrdup() failure in case of memory pressure even for new_opts. Signed-off-by: Sanidhya Kashyap sanidhya.gat...@gmail.com --- fs/afs/super.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/afs/super.c b/fs/afs/super.c index c486155..477f38e 100644 --- a/fs

[PATCH] hpfs: kstrdup() memory handling

2015-03-21 Thread Sanidhya Kashyap
There is a possibility of nothing being allocated to the new_opts in case of memory pressure, therefore return ENOMEM for such case. Signed-off-by: Sanidhya Kashyap sanidhya.gat...@gmail.com --- fs/hpfs/super.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/hpfs/super.c b/fs/hpfs

[PATCH] affs: kstrdup() memory handling

2015-03-21 Thread Sanidhya Kashyap
There is a possibility of kstrdup() failure upon memory pressure. Therefore, returning ENOMEM even for new_opts. Signed-off-by: Sanidhya Kashyap sanidhya.gat...@gmail.com --- fs/affs/super.c | 4 1 file changed, 4 insertions(+) diff --git a/fs/affs/super.c b/fs/affs/super.c index 4cf0e91

Re: [PATCH] afs: kstrdup() memory handling

2015-03-21 Thread Sanidhya Kashyap
On Sat, Mar 21, 2015 at 1:07 PM, Jeff Epler jep...@unpythonic.net wrote: On Sat, Mar 21, 2015 at 12:50:09PM -0400, Sanidhya Kashyap wrote: + if (new_opts) + goto error_out; Missing !? Ohh! Sorry, missed it! Resending the patch? Thanks, Sanidhya Jeff -- To unsubscribe

[PATCH] reiserfs: kstrdup() memory handling

2015-03-21 Thread Sanidhya Kashyap
Checking for ENOMEM even for new_opts in reiserfs_remount function as there is a possibility of nothing being allocated. Signed-off-by: Sanidhya Kashyap sanidhya.gat...@gmail.com --- fs/reiserfs/super.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/fs/reiserfs/super.c b/fs/reiserfs

[PATCH] ceph: kstrdup() memory handling

2015-03-21 Thread Sanidhya Kashyap
Currently, there is no check for the kstrdup() for r_path2, r_path1 and snapdir_name as various locations as there is a possibility of failure during memory pressure. Therefore, returning ENOMEM where the checks have been missed. Signed-off-by: Sanidhya Kashyap sanidhya.gat...@gmail.com --- fs

[PATCH] nfs: kstrdup() memory handling

2015-03-21 Thread Sanidhya Kashyap
nfs4_init_nonuniform_client_string(), nfs4_init_uniform_client_string() and _nfs4_proc_exchange_id(). Signed-off-by: Sanidhya Kashyap sanidhya.gat...@gmail.com --- fs/nfs/nfs4client.c | 9 - fs/nfs/nfs4proc.c | 30 -- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/fs/nfs

[PATCH] afs: kstrdup() memory handling

2015-03-21 Thread Sanidhya Kashyap
Handling kstrdup() failure in case of memory pressure even for new_opts. Signed-off-by: Sanidhya Kashyap sanidhya.gat...@gmail.com --- fs/afs/super.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/afs/super.c b/fs/afs/super.c index c486155..477f38e 100644 --- a/fs