Li Jinyue fbe0e839d1 futex: Prevent overflow by strengthen input validation
UBSAN reports signed integer overflow in kernel/futex.c:

 UBSAN: Undefined behaviour in kernel/futex.c:2041:18
 signed integer overflow:
 0 - -2147483648 cannot be represented in type 'int'

Add a sanity check to catch negative values of nr_wake and nr_requeue.

Signed-off-by: Li Jinyue <lijinyue@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: peterz@infradead.org
Cc: dvhart@infradead.org
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/1513242294-31786-1-git-send-email-lijinyue@huawei.com
2018-01-14 18:55:03 +01:00
..
2017-05-23 10:01:37 +02:00
2017-08-16 16:48:34 -07:00
2017-11-15 13:28:48 -08:00
2017-11-15 13:28:48 -08:00
2017-05-18 10:30:19 -06:00
2017-12-14 16:00:48 -08:00
2017-10-20 11:02:29 +02:00
2017-11-17 16:10:04 -08:00
2017-11-17 16:10:04 -08:00
2017-11-15 18:21:05 -08:00
2017-11-15 10:56:56 -08:00
2017-11-17 16:10:03 -08:00
2017-10-31 17:22:58 -05:00