diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2010-05-20 13:35:31 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-05-21 21:12:01 +0200 |
commit | 23ce422748def9652fdc019f740cd7900fa2fe3b (patch) | |
tree | d3a4a74ad648d2b242ed0a41402fd817cac66bb6 /drivers/block/drbd/drbd_receiver.c | |
parent | fc8ce1941d668c70e57a07f13f5a63e73e5dbff3 (diff) | |
download | op-kernel-dev-23ce422748def9652fdc019f740cd7900fa2fe3b.zip op-kernel-dev-23ce422748def9652fdc019f740cd7900fa2fe3b.tar.gz |
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/drbd/drbd_receiver.c')
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) |