]> git.baikalelectronics.ru Git - kernel.git/commit
[S390] cio: move final put_device to ccw_device_unregister
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Fri, 11 Sep 2009 08:28:26 +0000 (10:28 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 11 Sep 2009 08:29:40 +0000 (10:29 +0200)
commit3bcf9501aa8f91fc30cc8d5a4d45716f796428fe
treea01fc109cd60297d404e0e21f7457bd8e15f372b
parent6d30affe7c3a48037fa198a21331f68619da5e64
[S390] cio: move final put_device to ccw_device_unregister

We use a test_and_clear_bit to prevent a device from being
unregistered twice. Unfortunately in this cases the "final"
put_device (from device_initialize) was issued more than once,
resulting in an use after free error. Fix this by moving this
put_device to ccw_device_unregister.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/device.c