Sebastian Andrzej Siewior
95e0d86bad
Revert "kmod: fix race in usermodehelper code"
...
This reverts commit c02e3f361c ("kmod: fix race in usermodehelper code")
The patch is wrong. UMH_WAIT_EXEC is called with VFORK what ensures
that the child finishes prior returing back to the parent. No race.
In fact, the patch makes it even worse because it does the thing it
claims not do:
- It calls ->complete() on UMH_WAIT_EXEC
- the complete() callback may de-allocated subinfo as seen in the
following call chain:
[<c009f904>] (__link_path_walk+0x20/0xeb4) from [<c00a094c>] (path_walk+0x48/0x94)
[<c00a094c>] (path_walk+0x48/0x94) from [<c00a0a34>] (do_path_lookup+0x24/0x4c)
[<c00a0a34>] (do_path_lookup+0x24/0x4c) from [<c00a158c>] (do_filp_open+0xa4/0x83c)
[<c00a158c>] (do_filp_open+0xa4/0x83c) from [<c009ba90>] (open_exec+0x24/0xe0)
[<c009ba90>] (open_exec+0x24/0xe0) from [<c009bfa8>] (do_execve+0x7c/0x2e4)
[<c009bfa8>] (do_execve+0x7c/0x2e4) from [<c0026a80>] (kernel_execve+0x34/0x80)
[<c0026a80>] (kernel_execve+0x34/0x80) from [<c004b514>] (____call_usermodehelper+0x130/0x148)
[<c004b514>] (____call_usermodehelper+0x130/0x148) from [<c0024858>] (kernel_thread_exit+0x0/0x8)
and the path pointer was NULL. Good that ARM's kernel_execve()
doesn't check the pointer for NULL or else I wouldn't notice it.
The only race there might be is with UMH_NO_WAIT but it is too late for
me to investigate it now. UMH_WAIT_PROC could probably also use VFORK
and we could save one exec. So the only race I see is with UMH_NO_WAIT
and recent scheduler changes where the child does not always run first
might have trigger here something but as I said, it is late....
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-23 18:12:10 -07:00
..
gcov
powerpc: Enable GCOV
2009-08-20 10:29:28 +10:00
irq
Merge branch 'irq-threaded-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
2009-09-11 13:21:31 -07:00
power
oom: move oom_killer_enable()/oom_killer_disable to where they belong
2009-09-22 07:17:38 -07:00
time
Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
2009-09-18 09:15:24 -07:00
trace
seq_file: constify seq_operations
2009-09-23 07:39:29 -07:00
.gitignore
acct.c
bsdacct: switch credentials for writing to the accounting file
2009-08-24 11:33:40 +10:00
async.c
async: Fix lack of boot-time console due to insufficient synchronization
2009-06-08 12:31:53 -07:00
audit.c
Fix rule eviction order for AUDIT_DIR
2009-06-24 00:02:38 -04:00
audit.h
Fix rule eviction order for AUDIT_DIR
2009-06-24 00:02:38 -04:00
audit_tree.c
Fix rule eviction order for AUDIT_DIR
2009-06-24 00:02:38 -04:00
audit_watch.c
Audit: clean up all op= output to include string quoting
2009-06-24 00:00:52 -04:00
auditfilter.c
Audit: clean up all op= output to include string quoting
2009-06-24 00:00:52 -04:00
auditsc.c
Fix rule eviction order for AUDIT_DIR
2009-06-24 00:02:38 -04:00
backtracetest.c
bounds.c
capability.c
cgroup.c
seq_file: constify seq_operations
2009-09-23 07:39:29 -07:00
cgroup_debug.c
debug cgroup: remove unneeded cgroup_lock
2009-04-02 19:04:54 -07:00
cgroup_freezer.c
compat.c
signals: implement sys_rt_tgsigqueueinfo
2009-04-30 19:24:24 +02:00
configs.c
cpu.c
Merge branch 'x86-pat-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
2009-09-15 09:19:38 -07:00
cpuset.c
cpuset,mm: update tasks' mems_allowed in time
2009-06-16 19:47:31 -07:00
cred-internals.h
cred.c
creds_are_invalid() needs to be exported for use by modules:
2009-09-23 11:02:26 -07:00
delayacct.c
headers: taskstats_kern.h trim
2009-09-18 09:48:52 -07:00
dma.c
exec_domain.c
Get rid of indirect include of fs_struct.h
2009-03-31 23:00:27 -04:00
exit.c
getrusage: fill ru_maxrss value
2009-09-23 07:39:30 -07:00
extable.c
Merge branch 'tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
2009-04-05 11:04:19 -07:00
fork.c
Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
2009-09-23 09:46:15 -07:00
freezer.c
sched: fix nr_uninterruptible accounting of frozen tasks really
2009-07-18 14:19:53 +02:00
futex.c
Merge branch 'core-futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
2009-09-11 13:16:22 -07:00
futex_compat.c
futex: Fix compat_futex to be same as futex for REQUEUE_PI
2009-08-10 15:41:12 +02:00
groups.c
groups: move code to kernel/groups.c
2009-06-16 19:47:48 -07:00
hrtimer.c
Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
2009-09-23 09:46:15 -07:00
hung_task.c
itimer.c
itimers: Add tracepoints for itimer
2009-08-29 14:10:07 +02:00
kallsyms.c
kallsyms: use new arch_is_kernel_text()
2009-09-23 07:39:30 -07:00
Kconfig.freezer
Kconfig.hz
Kconfig.preempt
kexec.c
kexec: fix omitting offset in extended crashkernel syntax
2009-07-29 19:10:34 -07:00
kfifo.c
kfifo: Use "const" definitions
2009-09-19 13:13:17 -07:00
kgdb.c
sysrq, intel_fb: fix sysrq g collision
2009-05-15 07:56:24 -05:00
kmod.c
Revert "kmod: fix race in usermodehelper code"
2009-09-23 18:12:10 -07:00
kprobes.c
seq_file: constify seq_operations
2009-09-23 07:39:29 -07:00
ksysfs.c
kthread.c
sched: Keep kthreads at default priority
2009-09-09 17:30:06 +02:00
latencytop.c
lockdep.c
lockdep: use new arch_is_kernel_data()
2009-09-23 07:39:30 -07:00
lockdep_internals.h
lockdep: BFS cleanup
2009-07-24 10:53:29 +02:00
lockdep_proc.c
seq_file: constify seq_operations
2009-09-23 07:39:29 -07:00
lockdep_states.h
lockdep: move state bit definitions around
2009-02-14 23:27:59 +01:00
Makefile
Merge branch 'perfcounters-rename-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
2009-09-21 09:15:07 -07:00
module.c
nommu: add support for Memory Protection Units (MPU)
2009-09-22 07:17:43 -07:00
mutex-debug.c
mutex-debug.h
mutex.c
Merge branch 'linus' into perfcounters/core
2009-06-11 17:55:42 +02:00
mutex.h
notifier.c
ns_cgroup.c
cgroups: relax ns_can_attach checks to allow attaching to grandchild cgroups
2009-04-02 19:04:53 -07:00
nsproxy.c
nsproxy: extract create_nsproxy()
2009-06-18 13:03:56 -07:00
panic.c
trivial: Correct print_tainted routine name in comment
2009-09-21 15:14:53 +02:00
params.c
module_param: allow 'bool' module_params to be bool, not just int.
2009-06-12 21:46:58 +09:30
perf_event.c
perf: Tidy up after the big rename
2009-09-21 14:34:11 +02:00
pid.c
mm: also use alloc_large_system_hash() for the PID hash table
2009-09-22 07:17:38 -07:00
pid_namespace.c
pidns: rewrite copy_pid_ns()
2009-06-18 13:03:55 -07:00
pm_qos_params.c
posix-cpu-timers.c
itimers: Add tracepoints for itimer
2009-08-29 14:10:07 +02:00
posix-timers.c
time: Introduce CLOCK_REALTIME_COARSE
2009-08-21 21:43:46 +02:00
printk.c
printk: add printk_delay to make messages readable for some scenarios
2009-09-23 07:39:28 -07:00
profile.c
kernel/profile.c: Switch /proc/irq/prof_cpu_mask to seq_file
2009-09-20 20:15:40 +02:00
ptrace.c
Merge branch 'master' into next
2009-07-14 00:30:40 +10:00
rcupdate.c
rcu: Fix whitespace inconsistencies
2009-09-19 08:53:22 +02:00
rcutorture.c
rcu: Fix whitespace inconsistencies
2009-09-19 08:53:22 +02:00
rcutree.c
rcu: Fix whitespace inconsistencies
2009-09-19 08:53:22 +02:00
rcutree.h
rcu: Fix whitespace inconsistencies
2009-09-19 08:53:22 +02:00
rcutree_plugin.h
rcu: Fix whitespace inconsistencies
2009-09-19 08:53:22 +02:00
rcutree_trace.c
rcu: Fix whitespace inconsistencies
2009-09-19 08:53:22 +02:00
relay.c
Merge branch 'tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
2009-04-05 11:04:19 -07:00
res_counter.c
memcg: add interface to reset limits
2009-06-18 13:03:48 -07:00
resource.c
walk system ram range
2009-09-23 07:39:41 -07:00
rtmutex-debug.c
rtmutex-debug.h
rtmutex-tester.c
rtmutex.c
rtmutex: Avoid deadlock in rt_mutex_start_proxy_lock()
2009-08-06 05:50:21 +02:00
rtmutex.h
rtmutex_common.h
rt_mutex: add proxy lock routines
2009-04-06 11:14:02 +02:00
rwsem.c
sched.c
Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
2009-09-23 09:46:15 -07:00
sched_clock.c
sched_clock: Make it NMI safe
2009-09-18 20:47:30 +02:00
sched_cpupri.c
sched: Add new prio to cpupri before removing old prio
2009-08-02 14:26:09 +02:00
sched_cpupri.h
cpumask: remove cpumask_t from core
2009-03-30 22:05:17 +10:30
sched_debug.c
sched: Add new wakeup preemption mode: WAKEUP_RUNNING
2009-09-17 10:17:25 +02:00
sched_fair.c
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
2009-09-21 09:06:17 -07:00
sched_features.h
sched: Add new wakeup preemption mode: WAKEUP_RUNNING
2009-09-17 10:17:25 +02:00
sched_idletask.c
sched: Simplify sys_sched_rr_get_interval() system call
2009-09-21 09:53:55 +02:00
sched_rt.c
sched: Simplify sys_sched_rr_get_interval() system call
2009-09-21 09:53:55 +02:00
sched_stats.h
sched: remove unused fields from struct rq
2009-03-24 23:16:51 +01:00
seccomp.c
x86-64: seccomp: fix 32/64 syscall hole
2009-03-02 15:41:30 -08:00
semaphore.c
signal.c
do_sigaltstack: small cleanups
2009-08-01 11:18:56 -07:00
slow-work.c
slow-work: use round_jiffies() for thread pool's cull and OOM timers
2009-06-16 19:47:49 -07:00
smp.c
generic-ipi: make struct call_function_data lockless
2009-09-23 07:39:28 -07:00
softirq.c
softirq: add BLOCK_IOPOLL to softirq_to_name
2009-09-17 15:53:44 -04:00
softlockup.c
spinlock.c
locking: Allow arch-inlined spinlocks
2009-08-31 18:08:50 +02:00
srcu.c
stacktrace.c
stop_machine.c
cpumask: remove cpumask_t from core
2009-03-30 22:05:17 +10:30
sys.c
getrusage: fill ru_maxrss value
2009-09-23 07:39:30 -07:00
sys_ni.c
perf: Do the big rename: Performance Counters -> Performance Events
2009-09-21 14:28:04 +02:00
sysctl.c
printk: add printk_delay to make messages readable for some scenarios
2009-09-23 07:39:28 -07:00
sysctl_check.c
taskstats.c
genetlink: make netns aware
2009-07-12 14:03:27 -07:00
test_kprobes.c
time.c
time: Prevent 32 bit overflow with set_normalized_timespec()
2009-09-15 10:17:30 +02:00
timeconst.pl
timer.c
Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
2009-09-23 09:46:15 -07:00
tracepoint.c
trivial: fix typo "to to" in multiple files
2009-09-21 15:14:55 +02:00
tsacct.c
Fix fixpoint divide exception in acct_update_integrals
2009-03-09 08:13:35 -07:00
uid16.c
up.c
user.c
sched: delayed cleanup of user_struct
2009-06-15 21:30:23 -07:00
user_namespace.c
Fix recursive lock in free_uid()/free_user_ns()
2009-02-27 16:26:21 -08:00
utsname.c
utsns: extract creeate_uts_ns()
2009-06-18 13:03:55 -07:00
utsname_sysctl.c
proc_sysctl: use CONFIG_PROC_SYSCTL around ipc and utsname proc_handlers
2009-04-02 19:05:01 -07:00
wait.c
locking, sched: Give waitqueue spinlocks their own lockdep classes
2009-08-10 14:43:09 +02:00
workqueue.c
Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
2009-09-11 13:23:18 -07:00