Commit 431b5678 authored by Patrick Farrell's avatar Patrick Farrell Committed by Greg Kroah-Hartman

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: default avatarPatrick Farrell <paf@cray.com>
Reviewed-on: http://review.whamcloud.com/12459
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5817Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Reviewed-by: default avatarfrank zago <fzago@cray.com>
Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c67587a7
...@@ -1553,6 +1553,11 @@ ll_get_grouplock(struct inode *inode, struct file *file, unsigned long arg) ...@@ -1553,6 +1553,11 @@ ll_get_grouplock(struct inode *inode, struct file *file, unsigned long arg)
struct ccc_grouplock grouplock; struct ccc_grouplock grouplock;
int rc; int rc;
if (arg == 0) {
CWARN("group id for group lock must not be 0\n");
return -EINVAL;
}
if (ll_file_nolock(file)) if (ll_file_nolock(file))
return -EOPNOTSUPP; return -EOPNOTSUPP;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment