]> git.baikalelectronics.ru Git - kernel.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, 26 Sep 2011 23:12:26 +0000 (16:12 -0700)
commita24d0593862a4b32ae909024450b45d5c12e2839
tree0dcf873f047c48a7f3513349c13998b048e4e0fd
parent67e9307797c0f980097c1f9926991a0e1bdaa29d
USB: pid_ns: ensure pid is not freed during kill_pid_info_as_uid

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>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/devio.c