]> Pileus Git - ~andy/linux/commitdiff
rsxx: Fixes DLPAR add kernel panic if partition still mounted.
authorPhilip J Kelleher <pjk1939@linux.vnet.ibm.com>
Tue, 18 Jun 2013 19:46:04 +0000 (14:46 -0500)
committerJens Axboe <axboe@kernel.dk>
Wed, 19 Jun 2013 11:52:09 +0000 (13:52 +0200)
A kernel panic would occur on a DLPAR add if there was a partition
still mounted during the DLPAR remove. This bug fix will allow the
user to unmount the partition and bring the driver back into a
good state after the DLPAR add.

Signed-off-by: Philip J Kelleher <pjk1939@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/rsxx/dev.c

index 1fa7cccd6866f294b8cb0c18650f70e474501fa7..a092f58db2124bcf0d5560bd3e4c443dc47e93fa 100644 (file)
@@ -171,6 +171,9 @@ static void rsxx_make_request(struct request_queue *q, struct bio *bio)
 
        might_sleep();
 
+       if (!card)
+               goto req_err;
+
        if (unlikely(card->halt)) {
                st = -EFAULT;
                goto req_err;
@@ -331,6 +334,7 @@ void rsxx_destroy_dev(struct rsxx_cardinfo *card)
        card->gendisk = NULL;
 
        blk_cleanup_queue(card->queue);
+       card->queue->queuedata = NULL;
        unregister_blkdev(card->major, DRIVER_NAME);
 }