]> www.infradead.org Git - users/jedix/linux-maple.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)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 8 Dec 2011 19:17:48 +0000 (11:17 -0800)
commit30e85b09cd0c5a8077ee0c0fa4cd2e288a72d22f
treeafb0baacaed99314dd13443ad42975057cd5bab9
parentef65d0b3a27d6fb3cdde4fa2de20a0b614343fa9
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