staging: lustre: potential underflow in libcfs_kkuc_group_add()
commit54cc3794cec410ec2f7daa00089777562218780a
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 29 Oct 2015 13:51:23 +0000 (29 16:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Nov 2015 04:02:47 +0000 (15 20:02 -0800)
tree29220080595fb3bcabb48c958fcd1665a051919a
parentdf18a80af3d77d58223d8d88c1660c51108106e8
staging: lustre: potential underflow in libcfs_kkuc_group_add()

My static checker says that "group" is a user controlled number that can
be negative leading to an array underflow.  I have looked at it, and I'm
not an expert enough in lustre to say for sure if it is really a bug.
Anyway, it's simple enough to make the variable unsigned which pleases
the static checker and makes it easier to audit.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/libcfs_kernelcomm.h
drivers/staging/lustre/lustre/libcfs/kernel_user_comm.c