diff options
author | Neil Brown <neilb@suse.de> | 2007-12-10 23:49:30 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-12-11 03:43:55 (GMT) |
commit | 794e64d5e9c7f088378e093a48eb36a30091d82d (patch) | |
tree | 426bc4ab1d11a9846a7b88d005db40583704db01 /drivers/block | |
parent | 76832d8416430d6dd0575579ca1e00d1a790f4cb (diff) | |
download | linux-fsl-qoriq-794e64d5e9c7f088378e093a48eb36a30091d82d.tar.xz |
Fix NULL dereference in umem.c
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>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/umem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/umem.c b/drivers/block/umem.c index 99806f9..5f5095a 100644 --- a/drivers/block/umem.c +++ b/drivers/block/umem.c @@ -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, |