aboutsummaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2010-05-20 13:35:31 +0200
committerJens Axboe <jens.axboe@oracle.com>2010-05-21 21:12:01 +0200
commit23ce422748def9652fdc019f740cd7900fa2fe3b (patch)
treed3a4a74ad648d2b242ed0a41402fd817cac66bb6 /drivers/block
parentfc8ce1941d668c70e57a07f13f5a63e73e5dbff3 (diff)
drbd: Null pointer deref fix to the large "multi bio rewrite"
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/drbd/drbd_receiver.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 461d9872d4d..bc9ab7fb2cc 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -98,6 +98,10 @@ static struct page *page_chain_del(struct page **head, int n)
BUG_ON(!head);
page = *head;
+
+ if (!page)
+ return NULL;
+
while (page) {
tmp = page_chain_next(page);
if (--n == 0)