From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Mikhail Arkhipov <m.arhipov@rosa.ru>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Felipe Balbi" <balbi@ti.com>,
"Mike Frysinger" <vapier@gentoo.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.org
Subject: Re: [PATCH v2] usb: gadget: r8a66597-udc: Fix double free in r8a66597_probe
Date: Thu, 26 Sep 2024 10:22:51 +0200 [thread overview]
Message-ID: <20240926082251.5jacwNgE@linutronix.de> (raw)
In-Reply-To: <20240923202019.37875-1-m.arhipov@rosa.ru>
On 2024-09-23 23:20:19 [+0300], Mikhail Arkhipov wrote:
> The function r8a66597_free_request is already called in the err_add_udc
> block, and freeing r8a66597->ep0_req twice may lead to a double free error.
>
> If the probe process fails and the r8a66597_probe function subsequently
> goes through its error handling path. Since r8a66597_free_request is called
> multiple times in different error handling sections, it leads to an attempt
> to free the same memory twice.
>
> Remove the redundant call to r8a66597_free_request in the clean_up2 block.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 0f91349b89f3 ("usb: gadget: convert all users to the new udc infrastructure")
> Signed-off-by: Mikhail Arkhipov <m.arhipov@rosa.ru>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Sebastian
prev parent reply other threads:[~2024-09-26 8:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-23 20:20 Mikhail Arkhipov
2024-09-26 8:22 ` Sebastian Andrzej Siewior [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=20240926082251.5jacwNgE@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=m.arhipov@rosa.ru \
--cc=u.kleine-koenig@pengutronix.de \
--cc=vapier@gentoo.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
all inboxes | Powered by JetHome®