Messages in this thread Patch in this message | | | Date | Wed, 05 Mar 2008 12:54:37 +0100 | From | Martin Schwidefsky <> | Subject | [patch 05/10] dasd: fix reference counting in display method for proc/dasd/devices |
| |
From: Stefan Weinhuber <wein@de.ibm.com>
Using the /proc/dasd/devices interface leaves the reference counter of alias devices in an inconsistent state. A process that tries to set such a device offline afterwards will hang. The dasd_devices_show function returns immediately for alias devices and this code path was missing a dasd_put_device call.
Signed-off-by: Stefan Weinhuber <wein@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> ---
drivers/s390/block/dasd_proc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Index: quilt-2.6/drivers/s390/block/dasd_proc.c =================================================================== --- quilt-2.6.orig/drivers/s390/block/dasd_proc.c +++ quilt-2.6/drivers/s390/block/dasd_proc.c @@ -62,8 +62,10 @@ dasd_devices_show(struct seq_file *m, vo return 0; if (device->block) block = device->block; - else + else { + dasd_put_device(device); return 0; + } /* Print device number. */ seq_printf(m, "%s", device->cdev->dev.bus_id); /* Print discipline string. */ -- blue skies, Martin.
"Reality continues to ruin my life." - Calvin.
| |