]> git.karo-electronics.de Git - linux-beck.git/commit
sched/preempt, futex: Disable preemption in UP futex_atomic_op_inuser() explicitly
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Mon, 11 May 2015 15:52:13 +0000 (17:52 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 19 May 2015 06:39:16 +0000 (08:39 +0200)
commitf3dae07e442a8131a5485b6a38db2aa22a7a48cf
tree93ef299661eab70bbdf2dd70eabe093aa1fb66e6
parent32d8206725bcf6e3ce7832ac39e61a6ecfd558db
sched/preempt, futex: Disable preemption in UP futex_atomic_op_inuser() explicitly

Let's explicitly disable/enable preemption in the !CONFIG_SMP version
of futex_atomic_op_inuser, to prepare for pagefault_disable() not
touching preemption anymore.

Otherwise we might break mutual exclusion when relying on a get_user()/
put_user() implementation.

Reviewed-and-tested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: David.Laight@ACULAB.COM
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: airlied@linux.ie
Cc: akpm@linux-foundation.org
Cc: benh@kernel.crashing.org
Cc: bigeasy@linutronix.de
Cc: borntraeger@de.ibm.com
Cc: daniel.vetter@intel.com
Cc: heiko.carstens@de.ibm.com
Cc: herbert@gondor.apana.org.au
Cc: hocko@suse.cz
Cc: hughd@google.com
Cc: mst@redhat.com
Cc: paulus@samba.org
Cc: ralf@linux-mips.org
Cc: schwidefsky@de.ibm.com
Cc: yang.shi@windriver.com
Link: http://lkml.kernel.org/r/1431359540-32227-9-git-send-email-dahi@linux.vnet.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/asm-generic/futex.h