Skip to content

Commit

Permalink
drbd: Null pointer deref fix to the large "multi bio rewrite"
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Philipp Reisner authored and Jens Axboe committed May 21, 2010
1 parent fc8ce19 commit 23ce422
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/block/drbd/drbd_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 23ce422

Please sign in to comment.