All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Vasily Gorbik <gor@linux.ibm.com>
Cc: Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>,
	Chaitanya Kulkarni <kch@nvidia.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzkaller-bugs@googlegroups.com,
	syzbot <syzbot+09ddb593eea76a158f42@syzkaller.appspotmail.com>
Subject: Re: [PATCH] block: fix bio_alloc_bioset slowpath GFP handling
Date: Mon, 23 Mar 2026 07:44:17 +0100	[thread overview]
Message-ID: <20260323064417.GA24833@lst.de> (raw)
In-Reply-To: <p01.gc6e9ad5845ad.ttca29g@ub.hpns>

On Sun, Mar 22, 2026 at 03:35:10AM +0100, Vasily Gorbik wrote:
> bio_alloc_bioset() first strips __GFP_DIRECT_RECLAIM from the optimistic
> fast allocation attempt with try_alloc_gfp(). If that fast path fails,
> the slowpath checks saved_gfp to decide whether blocking allocation is
> allowed, but then still calls mempool_alloc() with the stripped gfp mask.
> That can lead to a NULL bio pointer being passed into bio_init().
> 
> Fix the slowpath by using saved_gfp for the bio and bvec mempool
> allocations.

Looks good, thanks:

Reviewed-by: Christoph Hellwig <hch@lst.de>


  reply	other threads:[~2026-03-23  6:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20 22:44 [syzbot] [block?] general protection fault in bio_alloc_bioset syzbot
2026-03-21  8:36 ` [PATCH next] block: mempool alloc fail due to insufficient memory Edward Adam Davis
2026-03-21 14:17   ` Jens Axboe
2026-03-21 22:52 ` [syzbot] [block?] general protection fault in bio_alloc_bioset Vasily Gorbik
2026-03-22  0:18   ` syzbot
2026-03-22  2:23     ` Vasily Gorbik
2026-03-22  2:35 ` [PATCH] block: fix bio_alloc_bioset slowpath GFP handling Vasily Gorbik
2026-03-23  6:44   ` Christoph Hellwig [this message]
2026-03-23 13:58   ` Jens Axboe

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=20260323064417.GA24833@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=gor@linux.ibm.com \
    --cc=kch@nvidia.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=syzbot+09ddb593eea76a158f42@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.