linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	linux-xfs@oss.sgi.com, sandeen@sandeen.net,
	Kent Overstreet <kent.overstreet@gmail.com>,
	Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH] bio allocation failure due to bio_get_nr_vecs()
Date: Fri, 11 May 2012 16:45:49 +0200	[thread overview]
Message-ID: <4FAD261D.80102@kernel.dk> (raw)
In-Reply-To: <4FAD25B3.3050802@itwm.fraunhofer.de>

On 05/11/2012 04:44 PM, Bernd Schubert wrote:
> On 05/11/2012 04:36 PM, Jens Axboe wrote:
>> On 05/11/2012 03:49 PM, Bernd Schubert wrote:
>>> The number of bio_get_nr_vecs() is passed down via bio_alloc() to
>>> bvec_alloc_bs(), which fails the bio allocation if
>>> nr_iovecs>  BIO_MAX_PAGES. For the underlying caller this causes an
>>> unexpected bio allocation failure.
>>> Limiting to queue_max_segments() is not sufficient, as max_segments
>>> also might be very large.
>>>
>>> bvec_alloc_bs(gfp_mask, nr_iovecs, ) =>  NULL when nr_iovecs>  BIO_MAX_PAGES
>>> bio_alloc_bioset(gfp_mask, nr_iovecs, ...)
>>> bio_alloc(GFP_NOIO, nvecs)
>>> xfs_alloc_ioend_bio()
>>
>> Thanks, looks sane. Applied.
>>
> 
> Great, thanks! Should we CC linux-stable for commit
> 5abebfdd02450fa1349daacf242e70b3736581e3 and this one, as I got a hard
> kernel panic?

Yes, that's a good idea. I've ammended the commit now to include stable.

-- 
Jens Axboe


      reply	other threads:[~2012-05-11 14:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <jognqm$o21$1@dough.gmane.org>
2012-05-10 16:43 ` kernel panic / NULL pointer dereference Bernd Schubert
2012-05-11 13:49   ` [PATCH] bio allocation failure due to bio_get_nr_vecs() Bernd Schubert
2012-05-11 14:06     ` Jeff Moyer
2012-05-11 14:31       ` Bernd Schubert
2012-05-11 14:36       ` Jens Axboe
2012-05-11 16:29         ` Jeff Moyer
2012-05-11 14:36     ` Jens Axboe
2012-05-11 14:44       ` Bernd Schubert
2012-05-11 14:45         ` Jens Axboe [this message]

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=4FAD261D.80102@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=bernd.schubert@itwm.fraunhofer.de \
    --cc=kent.overstreet@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@oss.sgi.com \
    --cc=sandeen@sandeen.net \
    --cc=tj@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;
as well as URLs for NNTP newsgroup(s).