Skip to content

Commit

Permalink
Fix NULL dereference in umem.c
Browse files Browse the repository at this point in the history
Fix NULL dereference in umem.c

Signed-off-by: Neil Brown <neilb@suse.de>
Tested-by: Dave Chinner <dgc@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Neil Brown authored and Linus Torvalds committed Dec 11, 2007
1 parent 76832d8 commit 794e64d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/block/umem.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,8 @@ static void process_page(unsigned long data)
page->idx++;
if (page->idx >= bio->bi_vcnt) {
page->bio = bio->bi_next;
page->idx = page->bio->bi_idx;
if (page->bio)
page->idx = page->bio->bi_idx;
}

pci_unmap_page(card->dev, desc->data_dma_handle,
Expand Down

0 comments on commit 794e64d

Please sign in to comment.