From: Philipp Reisner Date: Thu, 20 May 2010 11:35:31 +0000 (+0200) Subject: drbd: Null pointer deref fix to the large "multi bio rewrite" X-Git-Tag: v2.6.35-rc1~442^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=23ce422748def9652fdc019f740cd7900fa2fe3b;p=profile%2Fcommon%2Fkernel-common.git drbd: Null pointer deref fix to the large "multi bio rewrite" Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe --- diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 461d987..bc9ab7f 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)