diff options
author | Stefan Weinhuber <wein@de.ibm.com> | 2008-03-05 06:37:11 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-03-05 06:37:18 -0500 |
commit | a5e2383991ee985332854b721ba3e5abbbabf0f2 (patch) | |
tree | 6dee7e87d0fd0a93a041e773684724e6ca9af418 /drivers/s390 | |
parent | 5c12f2406cea24a2c885a8d3e5aa7ab94c65f0d5 (diff) |
[S390] dasd: fix reference counting in display method for proc/dasd/devices
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>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/block/dasd_proc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c index 28a86f070048..556063e8f7a9 100644 --- a/drivers/s390/block/dasd_proc.c +++ b/drivers/s390/block/dasd_proc.c | |||
@@ -62,8 +62,10 @@ dasd_devices_show(struct seq_file *m, void *v) | |||
62 | return 0; | 62 | return 0; |
63 | if (device->block) | 63 | if (device->block) |
64 | block = device->block; | 64 | block = device->block; |
65 | else | 65 | else { |
66 | dasd_put_device(device); | ||
66 | return 0; | 67 | return 0; |
68 | } | ||
67 | /* Print device number. */ | 69 | /* Print device number. */ |
68 | seq_printf(m, "%s", device->cdev->dev.bus_id); | 70 | seq_printf(m, "%s", device->cdev->dev.bus_id); |
69 | /* Print discipline string. */ | 71 | /* Print discipline string. */ |