]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
USB: pid_ns: ensure pid is not freed during kill_pid_info_as_uid
authorSerge Hallyn <serge.hallyn@canonical.com>
Mon, 26 Sep 2011 15:18:29 +0000 (10:18 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 7 Nov 2011 21:47:17 +0000 (13:47 -0800)
commit03c47d73c14c9859e092a2c6346c278942876caa
tree5926861b13f6b135fa9337898a00f9411219b573
parentedd9f053b52d5882c9c37432939e03db8634ebc0
USB: pid_ns: ensure pid is not freed during kill_pid_info_as_uid

commit aec01c5895051849ed842dc5b8794017a7751f28 upstream.

Alan Stern points out that after spin_unlock(&ps->lock) there is no
guarantee that ps->pid won't be freed.  Since kill_pid_info_as_uid() is
called after the spin_unlock(), the pid passed to it must be pinned.

Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/devio.c