linux/include/asm-generic
Romain Perier fba7cd681b asm-generic/futex: Re-enable preemption in futex_atomic_cmpxchg_inatomic()
The recent decoupling of pagefault disable and preempt disable added an
explicit preempt_disable/enable() pair to the futex_atomic_cmpxchg_inatomic()
implementation in asm-generic/futex.h. But it forgot to add preempt_enable()
calls to the error handling code pathes, which results in a preemption count
imbalance.

This is observable on boot when the test for atomic_cmpxchg() is calling
futex_atomic_cmpxchg_inatomic() on a NULL pointer.

Add the missing preempt_enable() calls to the error handling code pathes.

[ tglx: Massaged changelog ]

Fixes: d9b9ff8c18 ("sched/preempt, futex: Disable preemption in UP futex_atomic_cmpxchg_inatomic() explicitly")
Signed-off-by: Romain Perier <romain.perier@free-electrons.com>
Cc: linux-arch@vger.kernel.org
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1460640963-690-1-git-send-email-romain.perier@free-electrons.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2016-04-21 11:06:09 +02:00
..
bitops bitops: Do not default to __clear_bit() for __clear_bit_unlock() 2016-03-21 10:50:48 +01:00
4level-fixup.h
Kbuild.asm
asm-offsets.h
atomic-long.h include/asm-generic/atomic-long.h: force inlining of some atomic_long operations 2016-03-17 15:09:34 -07:00
atomic.h
atomic64.h
audit_change_attr.h
audit_dir_write.h
audit_read.h
audit_signal.h
audit_write.h
barrier.h asm-generic: implement virt_xxx memory barriers 2016-01-12 20:46:59 +02:00
bitops.h
bitsperlong.h
bug.h asm-generic changes for 4.6 2016-03-24 23:13:48 -07:00
bugs.h
cache.h
cacheflush.h
checksum.h ipv4: Update parameters for csum_tcpudp_magic to their original types 2016-03-13 23:55:13 -04:00
clkdev.h
cmpxchg-local.h
cmpxchg.h
cputime.h
cputime_jiffies.h
cputime_nsecs.h cputime: Prevent 32bit overflow in time[val|spec]_to_cputime() 2016-02-02 15:24:38 +01:00
current.h
delay.h
device.h
div64.h __div64_32(): make it overridable at compile time 2015-11-16 14:42:12 -05:00
dma-contiguous.h
dma.h
early_ioremap.h
emergency-restart.h
exec.h
fb.h
fixmap.h asm-generic: Fix local variable shadow in __set_fixmap_offset 2016-02-16 15:10:44 +00:00
ftrace.h
futex.h asm-generic/futex: Re-enable preemption in futex_atomic_cmpxchg_inatomic() 2016-04-21 11:06:09 +02:00
getorder.h
gpio.h gpio: allow setting ARCH_NR_GPIOS from Kconfig 2016-02-19 00:22:54 +01:00
hardirq.h
hugetlb.h
hw_irq.h
ide_iops.h
int-ll64.h
io.h
ioctl.h
iomap.h
irq.h
irq_regs.h
irq_work.h
irqflags.h
kdebug.h
kmap_types.h
kvm_para.h
libata-portmap.h
linkage.h
local.h
local64.h
mcs_spinlock.h
memory_model.h mm: add PHYS_PFN, use it in __phys_to_pfn() 2016-01-14 16:00:49 -08:00
mm-arch-hooks.h
mm_hooks.h mm/core, x86/mm/pkeys: Differentiate instruction fetches 2016-02-18 19:46:29 +01:00
mmu.h
mmu_context.h
module.h
msi.h
mutex-dec.h
mutex-null.h
mutex-xchg.h
mutex.h
page.h asm-generic: page.h: Remove useless get_user_page and free_user_page 2016-02-26 15:24:55 +01:00
param.h
parport.h
pci.h
pci_iomap.h
percpu.h
pgalloc.h
pgtable-nopmd.h
pgtable-nopud.h
pgtable.h mm/thp/migration: switch from flush_tlb_range to flush_pmd_tlb_range 2016-03-17 15:09:34 -07:00
preempt.h
ptrace.h
qrwlock.h
qrwlock_types.h
qspinlock.h locking/qspinlock: Move __ARCH_SPIN_LOCK_UNLOCKED to qspinlock_types.h 2016-02-29 10:02:43 +01:00
qspinlock_types.h locking/qspinlock: Move __ARCH_SPIN_LOCK_UNLOCKED to qspinlock_types.h 2016-02-29 10:02:43 +01:00
resource.h
rtc.h
rwsem.h
seccomp.h
sections.h asm/sections: add helpers to check for section data 2016-01-16 11:17:24 -08:00
segment.h
serial.h
siginfo.h
signal.h
simd.h
sizes.h
spinlock.h
statfs.h
string.h
switch_to.h
syscall.h
syscalls.h
termios-base.h
termios.h
timex.h
tlb.h treewide: Remove old email address 2015-11-23 09:44:58 +01:00
tlbflush.h
topology.h
trace_clock.h
uaccess-unaligned.h
uaccess.h
unaligned.h
unistd.h
user.h
vga.h
vmlinux.lds.h arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections 2016-03-25 16:37:42 -07:00
vtime.h
word-at-a-time.h
xor.h