]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: lustre: ptlrpc: signedness bug in high_priority_ratio_store()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 5 Jun 2015 09:22:57 +0000 (12:22 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Jun 2015 19:39:01 +0000 (12:39 -0700)
commit58acfd6db66cd692a844896f8d785cdc7312e8d6
treebace3871e115c4961626cfeaeaf4f76df99ca51c
parent4f5e53ed00aae4adf4e07b48a50a94fca7c3fe07
Staging: lustre: ptlrpc: signedness bug in high_priority_ratio_store()

We want to store a non-negative int here.  The original code had a check
for unsigned long less than zero which is a mistake but also casting
from a positive long to an int can result in a negative number.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c