Skip to content

Commit

Permalink
rsxx: Fixes DLPAR add kernel panic if partition still mounted.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Philip J Kelleher authored and Jens Axboe committed Jun 19, 2013
1 parent f730e3d commit 66bc600
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/block/rsxx/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 66bc600

Please sign in to comment.