diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2010-05-20 07:35:31 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-05-21 15:12:01 -0400 |
commit | 23ce422748def9652fdc019f740cd7900fa2fe3b (patch) | |
tree | d3a4a74ad648d2b242ed0a41402fd817cac66bb6 /drivers/block | |
parent | fc8ce1941d668c70e57a07f13f5a63e73e5dbff3 (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.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 461d9872d4d3..bc9ab7fb2cc7 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) | |||
98 | BUG_ON(!head); | 98 | BUG_ON(!head); |
99 | 99 | ||
100 | page = *head; | 100 | page = *head; |
101 | |||
102 | if (!page) | ||
103 | return NULL; | ||
104 | |||
101 | while (page) { | 105 | while (page) { |
102 | tmp = page_chain_next(page); | 106 | tmp = page_chain_next(page); |
103 | if (--n == 0) | 107 | if (--n == 0) |