Skip to contentSkip to conversation

rsxx: Fixes DLPAR add kernel panic if partition still mounted.

PATCH New Philip J. Kelleher 1 participant 1 message Jun 18, 2013 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 7/11 rsxx: Fixes DLPAR add kernel panic if partition still mounted.

From: Philip J Kelleher <[email protected]>

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.

-------------------------------------------------------------------------------

drivers/block/rsxx/dev.c +4 -0
diff -uprN -X linux-block-vanilla/Documentation/dontdiff linux-block-vanilla/drivers/block/rsxx/dev.c linux-block/drivers/block/rsxx/dev.c
@@ -171,6 +171,9 @@ static void rsxx_make_request(struct req
 
 	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_cardin
 	card->gendisk = NULL;
 
 	blk_cleanup_queue(card->queue);
+	card->queue->queuedata = NULL;
 	unregister_blkdev(card->major, DRIVER_NAME);
 }