[S390] cio: ensure to hold a reference for deferred deregistration
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Fri, 11 Sep 2009 08:28:20 +0000 (10:28 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 11 Sep 2009 08:29:38 +0000 (10:29 +0200)
commitbe7a2ddce66991c05a1c6ad19790289591e53547
tree89b74961a7da107e7eebe4486f48bb9c4426938e
parente2910bcf8ca762b306767a0894ab1987be014c9e
[S390] cio: ensure to hold a reference for deferred deregistration

Ensure to always hold an extra device reference for scheduling a
subchannel deregistration, by moving the get_device to
ccw_device_schedule_sch_unregister. This fixes an use after free
error in ccw_device_call_sch_unregister where put_device was called
on an already freed device structure.

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