]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Fix NULL dereference in umem.c
authorNeil Brown <neilb@suse.de>
Mon, 10 Dec 2007 23:49:30 +0000 (15:49 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 11 Dec 2007 03:43:55 +0000 (19:43 -0800)
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>
drivers/block/umem.c

index 99806f9ee4ce85910deecfe194462b48cc047b35..5f5095afb06b900b3b70a05837b19d866a9cdd8a 100644 (file)
@@ -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,