Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Kashyap Desai <kashyap.desai@broadcom.com>,
	Sumit Saxena <sumit.saxena@broadcom.com>,
	Shivasharan S <shivasharan.srikanteshwara@broadcom.com>,
	Chandrakanth patil <chandrakanth.patil@broadcom.com>,
	"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Arnd Bergmann <arnd@arndb.de>, Dan Carpenter <error27@gmail.com>,
	megaraidlinux.pdl@broadcom.com, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: megaraid_mbox: avoid double kfree()
Date: Mon, 01 Jun 2026 21:55:33 -0400	[thread overview]
Message-ID: <yq1tsrl904u.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20260601210216.846809-1-arnd@kernel.org> (Arnd Bergmann's message of "Mon, 1 Jun 2026 23:02:04 +0200")


Arnd,

> Smatch found a double-free after my recent change:
>
> 	drivers/scsi/megaraid/megaraid_mbox.c:3474 megaraid_cmm_register()
> 	error: double free of 'adp' (line 3468)
>
> Since the object is no longer allocated in megaraid_cmm_register(),
> remove the kfree() as well.

Applied to 7.2/scsi-staging, thanks!

-- 
Martin K. Petersen

      reply	other threads:[~2026-06-02  1:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-01 21:02 [PATCH] scsi: megaraid_mbox: avoid double kfree() Arnd Bergmann
2026-06-02  1:55 ` Martin K. Petersen [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=yq1tsrl904u.fsf@ca-mkp.ca.oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=chandrakanth.patil@broadcom.com \
    --cc=error27@gmail.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=megaraidlinux.pdl@broadcom.com \
    --cc=shivasharan.srikanteshwara@broadcom.com \
    --cc=sumit.saxena@broadcom.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