linux/kernel
David Gibson 796f8d9b98 [PATCH] FUTEX_WAKE_OP: enhanced error handling
The code for FUTEX_WAKE_OP calls an arch callback,
futex_atomic_op_inuser().  That callback can return an error code, but
currently the caller assumes any error is EFAULT, and will try various
things to resolve the fault before eventually giving up with EFAULT
(regardless of the original error code).  This is not a theoretical case -
arch callbacks currently return -ENOSYS if the opcode they are given is
bogus.

This patch alters the code to detect non-EFAULT errors and return them
directly to the user.

Of course, whether -ENOSYS is the correct return value for the bogus opcode
case, or whether EINVAL would be more appropriate is another question.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jamie Lokier <jamie@shareable.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:53:38 -08:00
..
irq Don't call a NULL ack function in the generic IRQ code. 2005-09-28 20:29:44 +10:00
power [PATCH] swsusp: remove unused variable 2005-11-07 07:53:29 -08:00
acct.c [PATCH] mm: rss = file_rss + anon_rss 2005-10-29 21:40:38 -07:00
audit.c [PATCH] gfp_t: kernel/* 2005-10-28 08:16:49 -07:00
auditsc.c [PATCH] gfp_t: kernel/* 2005-10-28 08:16:49 -07:00
capability.c [PATCH] kernel/capability.c: add kerneldoc 2005-07-27 16:26:06 -07:00
compat.c [PATCH] kernel: fix-up schedule_timeout() usage 2005-09-10 10:06:37 -07:00
configs.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cpu.c [PATCH] create and destroy cpufreq sysfs entries based on cpu notifiers 2005-10-30 17:37:14 -08:00
cpuset.c [PATCH] cpusets: automatic numa mempolicy rebinding 2005-10-30 17:37:22 -08:00
crash_dump.c [PATCH] kernel/crash_dump.c: add kerneldoc 2005-07-27 16:26:06 -07:00
dma.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
exec_domain.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
exit.c [PATCH] Process Events Connector 2005-11-07 07:53:35 -08:00
extable.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
fork.c [PATCH] Process Events Connector 2005-11-07 07:53:35 -08:00
futex.c [PATCH] FUTEX_WAKE_OP: enhanced error handling 2005-11-07 07:53:38 -08:00
intermodule.c [PATCH] introduce and use kzalloc 2005-09-07 16:57:45 -07:00
itimer.c [PATCH] itimer fixes 2005-07-27 16:25:51 -07:00
kallsyms.c [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
Kconfig.hz [PATCH] i386: Selectable Frequency of the Timer Interrupt 2005-06-23 09:45:10 -07:00
Kconfig.preempt [PATCH] sched: voluntary kernel preemption 2005-06-25 16:24:45 -07:00
kexec.c [PATCH] mm: split page table lock 2005-10-29 21:40:42 -07:00
kfifo.c [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
kmod.c [PATCH] Keys: Get rid of warning in kmod.c if keys disabled 2005-10-30 17:37:23 -08:00
kprobes.c [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
ksysfs.c [PATCH] Kdump: Export crash notes section address through sysfs 2005-06-25 16:24:51 -07:00
kthread.c [PATCH] Add kthread_stop_sem() 2005-10-30 17:37:17 -08:00
Makefile [PATCH] RCU torture-testing kernel module 2005-10-30 17:37:27 -08:00
module.c [PATCH] use add_taint() for setting tainted bit flags 2005-09-13 08:22:29 -07:00
panic.c [PATCH] Call emergency_reboot from panic 2005-07-26 14:35:43 -07:00
params.c [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
pid.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
posix-cpu-timers.c [PATCH] posix-timers `unlikely' rejig 2005-11-07 07:53:24 -08:00
posix-timers.c [PATCH] posix-timers: use schedule_timeout() in common_nsleep() 2005-10-30 17:37:20 -08:00
printk.c [PATCH] cleanup for kernel/printk.c 2005-10-30 17:37:23 -08:00
profile.c [PATCH] mostly_read data section 2005-07-07 18:23:46 -07:00
ptrace.c [PATCH] ptrace/coredump/exit_group deadlock 2005-10-30 17:37:22 -08:00
rcupdate.c [PATCH] RCU torture-testing kernel module 2005-10-30 17:37:27 -08:00
rcutorture.c [PATCH] RCU torture-testing kernel module 2005-10-30 17:37:27 -08:00
resource.c [PATCH] introduce and use kzalloc 2005-09-07 16:57:45 -07:00
sched.c [PATCH] cpu hoptlug: avoid usage of smp_processor_id() in preemptible code 2005-11-07 07:53:29 -08:00
seccomp.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
signal.c [PATCH] Remove duplicate code in signal.c 2005-10-30 17:37:32 -08:00
softirq.c [PATCH] cpu hoptlug: avoid usage of smp_processor_id() in preemptible code 2005-11-07 07:53:29 -08:00
softlockup.c [PATCH] cpu hoptlug: avoid usage of smp_processor_id() in preemptible code 2005-11-07 07:53:29 -08:00
spinlock.c [PATCH] spinlock consolidation 2005-09-10 10:06:21 -07:00
stop_machine.c [PATCH] smp_processor_id() cleanup 2005-06-21 18:46:13 -07:00
sys_ni.c [PATCH] remove sys_set_zone_reclaim() 2005-08-01 10:03:56 -07:00
sys.c [PATCH] Process Events Connector 2005-11-07 07:53:35 -08:00
sysctl.c [PATCH] aio: remove aio_max_nr accounting race 2005-11-07 07:53:38 -08:00
time.c [PATCH] NTP shift_right cleanup 2005-10-30 17:37:18 -08:00
timer.c [PATCH] jiffies_64 cleanup 2005-10-30 17:37:25 -08:00
uid16.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
user.c [PATCH] inotify 2005-07-12 20:38:38 -07:00
wait.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
workqueue.c [PATCH] cpu hoptlug: avoid usage of smp_processor_id() in preemptible code 2005-11-07 07:53:29 -08:00