Skip to content

Commit

Permalink
[S390] dasd: fix reference counting in display method for proc/dasd/d…
Browse files Browse the repository at this point in the history
…evices

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>
  • Loading branch information
Stefan Weinhuber authored and Martin Schwidefsky committed Mar 5, 2008
1 parent 5c12f24 commit a5e2383
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/s390/block/dasd_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ dasd_devices_show(struct seq_file *m, void *v)
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. */
Expand Down

0 comments on commit a5e2383

Please sign in to comment.