From: Christoph Hellwig <hch@infradead.org>
To: Naohiro Aota <naohiro.aota@wdc.com>
Cc: linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
martin.petersen@oracle.com
Subject: Re: [PATCH] scsi: target: pscsi: fix bio_put for error case
Date: Wed, 14 Feb 2024 21:24:57 -0800 [thread overview]
Message-ID: <Zc2gKZmCSYsFpi7f@infradead.org> (raw)
In-Reply-To: <20240214144356.101814-1-naohiro.aota@wdc.com>
On Wed, Feb 14, 2024 at 11:43:56PM +0900, Naohiro Aota wrote:
> As of commit 066ff571011d ("block: turn bio_kmalloc into a simple kmalloc
> wrapper"), a bio allocated by bio_kmalloc() must be freed by bio_uninit()
> and kfree(). That is not done properly for the error case, hitting WARN and
> NULL pointer dereference in bio_free().
>
> Fixes: 066ff571011d ("block: turn bio_kmalloc into a simple kmalloc wrapper")
> CC: stable@vger.kernel.org # 6.1+
> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2024-02-15 5:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-14 14:43 [PATCH] scsi: target: pscsi: fix bio_put for error case Naohiro Aota
2024-02-15 5:24 ` Christoph Hellwig [this message]
2024-02-15 11:33 ` Johannes Thumshirn
2024-02-15 20:39 ` Martin K. Petersen
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=Zc2gKZmCSYsFpi7f@infradead.org \
--to=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=naohiro.aota@wdc.com \
--cc=target-devel@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