diff options
author | Stefan Weinhuber <wein@de.ibm.com> | 2013-11-29 15:37:20 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-12-02 15:31:06 +0100 |
commit | b2b0154e49e2b9470ae0d082128b5549cbe71152 (patch) | |
tree | 6259d0944460c1597ed0406436d5aea88a38a84f /drivers/s390 | |
parent | af91706d5ddecb4a9858cca9e90d463037cfd498 (diff) | |
download | op-kernel-dev-b2b0154e49e2b9470ae0d082128b5549cbe71152.zip op-kernel-dev-b2b0154e49e2b9470ae0d082128b5549cbe71152.tar.gz |
s390/dasd: fix memory leak caused by dangling references to request_queue
After the call to del_gendisk, the gendisk still holds a reference to
its request_queue. We must not modify the gendisks queue pointer
before the put_disk call, or the gendisk_release function cannot
release the reference and the memory for the request_queue structure
is lost.
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_genhd.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c index f649217..f224d59 100644 --- a/drivers/s390/block/dasd_genhd.c +++ b/drivers/s390/block/dasd_genhd.c @@ -87,7 +87,6 @@ void dasd_gendisk_free(struct dasd_block *block) { if (block->gdp) { del_gendisk(block->gdp); - block->gdp->queue = NULL; block->gdp->private_data = NULL; put_disk(block->gdp); block->gdp = NULL; |