sched, autogroup: Fix potential access to freed memory
authorMike Galbraith <efault@gmx.de>
Thu, 16 Dec 2010 14:09:52 +0000 (15:09 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 4 Jan 2011 14:10:34 +0000 (15:10 +0100)
commit4f8219875a0dad2cfad9e93a3fafcd9626db98d2
tree050e09c752c2b0f6045f85247c64890cf5d4ec48
parent6706125e291bd3dddd269e043323a6ab93ccd5fb
sched, autogroup: Fix potential access to freed memory

Oleg pointed out that the /proc interface kref_get() useage may race with
the final put during autogroup_move_group().  A signal->autogroup assignment
may be in flight when the /proc interface dereference, leaving them taking
a reference to an already dead group.

Reported-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1292508592.5940.28.camel@maggy.simson.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_autogroup.c