All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix Null pointer Exception
@ 2008-09-08 15:40 Stefan Raspl
  2008-09-09  0:21 ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Raspl @ 2008-09-08 15:40 UTC (permalink / raw)
  To: device-mapper development, agk; +Cc: akpm, h.carstens, martin.schwidefsky

Here's a trivial patch for the kernel panics that we reported last week
when testing various ways to forcefully disconnect or temporarily disable
DASD disks from an IBM System z machine. We ran into NULL pointer exceptions
at the respective places.


Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>


---
 drivers/md/dm-table.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -943,7 +943,8 @@ int dm_table_any_congested(struct dm_tab
 
 	list_for_each_entry(dd, devices, list) {
 		struct request_queue *q = bdev_get_queue(dd->bdev);
-		r |= bdi_congested(&q->backing_dev_info, bdi_bits);
+		if (q)
+			r |= bdi_congested(&q->backing_dev_info, bdi_bits);
 	}
 
 	return r;
@@ -957,7 +958,8 @@ void dm_table_unplug_all(struct dm_table
 	list_for_each_entry(dd, devices, list) {
 		struct request_queue *q = bdev_get_queue(dd->bdev);
 
-		blk_unplug(q);
+		if (q)
+			blk_unplug(q);
 	}
 }
 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-10-10  7:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-08 15:40 [PATCH] Fix Null pointer Exception Stefan Raspl
2008-09-09  0:21 ` Andrew Morton
2008-09-23 16:56   ` Alasdair G Kergon
2008-09-24 13:17     ` Stefan Raspl
2008-10-07 21:18       ` Alasdair G Kergon
2008-10-09 15:17         ` Alasdair G Kergon
2008-10-10  7:23           ` Stefan Raspl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.