]> git.baikalelectronics.ru Git - kernel.git/commit
[S390] cio: fix memleak in resume path
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Mon, 25 Oct 2010 14:10:26 +0000 (16:10 +0200)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Mon, 25 Oct 2010 14:10:18 +0000 (16:10 +0200)
commit15c3bb71067baa605db99ad843e72b050ded5e4b
treee3519c8672226e7951ade85c3efd670bea356415
parentac5af04b5ad537b8e00a51deb7c793610f5f3c17
[S390] cio: fix memleak in resume path

If a ccwdevice is lost during hibernation and a different
ccwdevice is attached to the same subchannel, we will
deregister the old ccw device and register the new one.

Since deregistration is not allowed in this context, we
handle this action later. However, some parts of the
registration process for the new device were started anyway,
so that the old device structure is no longer accessible.

Fix this by deferring both actions to the afterwards
scheduled subchannel event.

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