lkml.org 
[lkml]   [2009]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 6/6] Handle possible bio_alloc failure in bounce buffer
Date
Handle possible bio_alloc failure in bounce buffer.

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>

---

Index: linux-2.6/mm/bounce.c
===================================================================
--- linux-2.6.orig/mm/bounce.c
+++ linux-2.6/mm/bounce.c
@@ -202,6 +202,9 @@ static void __blk_queue_bounce(struct re
unsigned int cnt = (*bio_orig)->bi_vcnt;

bio = bio_alloc(GFP_NOIO, cnt);
+ if (unlikely(!bio))
+ panic("Unable to allocate bios\n");
+
memset(bio->bi_io_vec, 0, cnt * sizeof(struct bio_vec));
}




\
 
 \ /
  Last update: 2009-04-14 13:15    [W:0.023 / U:1.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site