]> git.baikalelectronics.ru Git - kernel.git/commit
[S390] cio: fix ccwgroup unregistration race condition
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>
Wed, 5 Jan 2011 11:48:13 +0000 (12:48 +0100)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Wed, 5 Jan 2011 11:47:31 +0000 (12:47 +0100)
commitee47f378fc41567937a0327a40094ae581e24d79
tree4321b487b2c6826aa2c6f6247696d86001b96082
parent6900b098b675c873e9bf000f80774e4233f0708a
[S390] cio: fix ccwgroup unregistration race condition

A race condition exists in the ccwgroup device unregistration code
which can cause a kernel panic due to a use-after-free bug. This
race condition might be triggered when all ccw devices associated with
a ccwgroup device are removed at the same time (e.g. because the
corresponding channel path becomes no longer available).

Fix this race condition by clearing the references from the associated
ccw devices to the ccw group device during unregistration of the
ccw group device.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/ccwgroup.c