From: Neil Brown Date: Mon, 10 Dec 2007 23:49:30 +0000 (-0800) Subject: Fix NULL dereference in umem.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=794e64d5e9c7f088378e093a48eb36a30091d82d;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git Fix NULL dereference in umem.c Fix NULL dereference in umem.c Signed-off-by: Neil Brown Tested-by: Dave Chinner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/block/umem.c b/drivers/block/umem.c index 99806f9ee4c..5f5095afb06 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,