]> git.baikalelectronics.ru Git - kernel.git/commit
futex: futex_wake_op, fix sign_extend32 sign bits
authorJiri Slaby <jslaby@suse.cz>
Thu, 30 Nov 2017 14:35:44 +0000 (15:35 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 10 Dec 2017 20:50:57 +0000 (12:50 -0800)
commitd9b57aa0d61946bb5ddeb78dce4a92122f49ebcc
tree8a650ea3b1fe83e418607e5c8c40f7ec24e1eef8
parent6e5fdfe0d3df32f4338e3a587d674e3a3e3e980e
futex: futex_wake_op, fix sign_extend32 sign bits

sign_extend32 counts the sign bit parameter from 0, not from 1.  So we
have to use "11" for 12th bit, not "12".

This mistake means we have not allowed negative op and cmp args since
commit 52ffa19b4560 ("futex: Remove duplicated code and fix undefined
behaviour") till now.

Fixes: 52ffa19b4560 ("futex: Remove duplicated code and fix undefined behaviour")
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Darren Hart <dvhart@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/futex.c