From: Nikanth Karthikesan <knikanth@suse.de>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH 6/6] Handle possible bio_alloc failure in bounce buffer
Date: Tue, 14 Apr 2009 16:36:47 +0530 [thread overview]
Message-ID: <200904141636.47759.knikanth@suse.de> (raw)
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));
}
reply other threads:[~2009-04-14 11:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200904141636.47759.knikanth@suse.de \
--to=knikanth@suse.de \
--cc=akpm@linux-foundation.org \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox