diff options
author | Patrick Farrell <[email protected]> | 2015-02-01 21:52:18 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2015-02-07 17:32:34 +0800 |
commit | 431b567856875536c7f574f30cd870d758aa6c2f (patch) | |
tree | e2078bb913eaa75ef8bf5a631aa46b81db3d417b | |
parent | c67587a74847a27965ca1c6a4362c3b39e9943e1 (diff) |
staging/lustre/clio: Do not allow group locks with gid 0
When a group lock with GID=0 is released (put_grouplock is
called), an assertion in cl_put_grouplock is hit.
We should not allow group lock requests with GID=0, instead
we should return -EINVAL.
Signed-off-by: Patrick Farrell <[email protected]>
Reviewed-on: http://review.whamcloud.com/12459
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5817
Reviewed-by: Andreas Dilger <[email protected]>
Reviewed-by: frank zago <[email protected]>
Signed-off-by: Oleg Drokin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/staging/lustre/lustre/llite/file.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index ca270f49e6aa..7c7ef7ec908e 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -1553,6 +1553,11 @@ ll_get_grouplock(struct inode *inode, struct file *file, unsigned long arg) struct ccc_grouplock grouplock; int rc; + if (arg == 0) { + CWARN("group id for group lock must not be 0\n"); + return -EINVAL; + } + if (ll_file_nolock(file)) return -EOPNOTSUPP; |