Fix NULL dereference in umem.c

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git-commits-head@...>
Date: Tuesday, December 11, 2007 - 1:59 am

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=794e64...
Commit:     794e64d5e9c7f088378e093a48eb36a30091d82d
Parent:     76832d8416430d6dd0575579ca1e00d1a790f4cb
Author:     Neil Brown <neilb@suse.de>
AuthorDate: Mon Dec 10 15:49:30 2007 -0800
Committer:  Linus Torvalds <torvalds@woody.linux-foundation.org>
CommitDate: Mon Dec 10 19:43:55 2007 -0800

    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>
---
 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,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Fix NULL dereference in umem.c, Linux Kernel Mailing List..., (Tue Dec 11, 1:59 am)