mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 09:02:00 +00:00
[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>
This commit is contained in:
parent
5c12f2406c
commit
a5e2383991
@ -62,8 +62,10 @@ dasd_devices_show(struct seq_file *m, void *v)
|
|||||||
return 0;
|
return 0;
|
||||||
if (device->block)
|
if (device->block)
|
||||||
block = device->block;
|
block = device->block;
|
||||||
else
|
else {
|
||||||
|
dasd_put_device(device);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
/* Print device number. */
|
/* Print device number. */
|
||||||
seq_printf(m, "%s", device->cdev->dev.bus_id);
|
seq_printf(m, "%s", device->cdev->dev.bus_id);
|
||||||
/* Print discipline string. */
|
/* Print discipline string. */
|
||||||
|
Loading…
Reference in New Issue
Block a user