diff options
author | Vivek Goyal <[email protected]> | 2012-02-08 20:03:38 +0100 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2012-02-08 20:03:38 +0100 |
commit | 3f9a5aabd0a9fe0e0cd308506f48963d79169aa7 (patch) | |
tree | 89dd32775e498dcb50da8cfc5388400c637725c5 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | cdccaa9467b982d57b139818d15e1e994feca372 (diff) |
floppy: Cleanup disk->queue before caling put_disk() if add_disk() was never called
add_disk() takes gendisk reference on request queue. If driver failed during
initialization and never called add_disk() then that extra reference is not
taken. That reference is put in put_disk(). floppy driver allocates the
disk, allocates queue, sets disk->queue and then relizes that floppy
controller is not present. It tries to tear down everything and tries to
put a reference down in put_disk() which was never taken.
In such error cases cleanup disk->queue before calling put_disk() so that
we never try to put down a reference which was never taken in first place.
Reported-and-tested-by: Suresh Jayaraman <[email protected]>
Tested-by: Dirk Gouders <[email protected]>
Signed-off-by: Vivek Goyal <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions