From: Keith Busch <kbusch@kernel.org>
To: Maurizio Lombardi <mlombard@redhat.com>
Cc: hch@lst.de, linux-nvme@lists.infradead.org, dwagner@suse.de,
mlombard@bsdbackstore.eu
Subject: Re: [PATCH] nvme: fix memory leak in quirks_param_set()
Date: Wed, 11 Feb 2026 19:35:26 -0700 [thread overview]
Message-ID: <aY08bqdX9aoxtp5O@kbusch-mbp> (raw)
In-Reply-To: <20260211163028.76913-1-mlombard@redhat.com>
On Wed, Feb 11, 2026 at 05:30:28PM +0100, Maurizio Lombardi wrote:
> When loading the nvme module, if the 'quirks' parameter is specified
> via both the kernel command line (e.g., nvme.quirks=...) and the
> modprobe command line (e.g., modprobe nvme quirks=...), the
> quirks_param_set() callback is invoked twice.
>
> Currently, in the double-invocation scenario, the second call
> overwrites the nvme_pci_quirk_list pointer, causing the memory
> allocated in the first call to leak.
>
> Fix this by freeing the existing list before assigning the new one.
Thanks applied to nvme-7.0.
prev parent reply other threads:[~2026-02-12 2:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-11 16:30 [PATCH] nvme: fix memory leak in quirks_param_set() Maurizio Lombardi
2026-02-11 16:41 ` Christoph Hellwig
2026-02-11 17:01 ` Daniel Wagner
2026-02-12 2:35 ` Keith Busch [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=aY08bqdX9aoxtp5O@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=dwagner@suse.de \
--cc=hch@lst.de \
--cc=linux-nvme@lists.infradead.org \
--cc=mlombard@bsdbackstore.eu \
--cc=mlombard@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox