From: Anatolij Gustschin <agust@denx.de>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>,
Grant Likely <grant.likely@secretlab.ca>,
John Bonesio <bones@secretlab.ca>,
linuxppc-dev@lists.ozlabs.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc: platforms: 52xx: Fix a resource leak in an error handling path
Date: Sat, 29 Jan 2022 10:50:07 +0100 [thread overview]
Message-ID: <20220129105007.6dfdea45@crub> (raw)
In-Reply-To: <dec1496d46ccd5311d0f6e9f9ca4238be11bf6a6.1643440531.git.christophe.jaillet@wanadoo.fr>
On Sat, 29 Jan 2022 08:16:04 +0100
Christophe JAILLET christophe.jaillet@wanadoo.fr wrote:
>The error handling path of mpc52xx_lpbfifo_probe() and a request_irq() is
>not balanced by a corresponding free_irq().
>
>Add the missing call, as already done in the remove function.
>
>Fixes: 3c9059d79f5e ("powerpc/5200: add LocalPlus bus FIFO device driver")
>Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>---
>Another strange thing is that the remove function has:
> /* Release the bestcomm transmit task */
> free_irq(bcom_get_task_irq(lpbfifo.bcom_tx_task), &lpbfifo);
>but I've not been able to find a corresponding request_irq().
This driver does not request the tx task irq itself, but a fifo
client driver can request/free tx interrupts for submitted
fifo write tasks, like mpc5200 fec and pata drivers do, so
it is okay.
>Is it dead code? Is there something missing in the probe?
No.
--
Anatolij
WARNING: multiple messages have this Message-ID (diff)
From: Anatolij Gustschin <agust@denx.de>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
Paul Mackerras <paulus@samba.org>,
John Bonesio <bones@secretlab.ca>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc: platforms: 52xx: Fix a resource leak in an error handling path
Date: Sat, 29 Jan 2022 10:50:07 +0100 [thread overview]
Message-ID: <20220129105007.6dfdea45@crub> (raw)
In-Reply-To: <dec1496d46ccd5311d0f6e9f9ca4238be11bf6a6.1643440531.git.christophe.jaillet@wanadoo.fr>
On Sat, 29 Jan 2022 08:16:04 +0100
Christophe JAILLET christophe.jaillet@wanadoo.fr wrote:
>The error handling path of mpc52xx_lpbfifo_probe() and a request_irq() is
>not balanced by a corresponding free_irq().
>
>Add the missing call, as already done in the remove function.
>
>Fixes: 3c9059d79f5e ("powerpc/5200: add LocalPlus bus FIFO device driver")
>Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>---
>Another strange thing is that the remove function has:
> /* Release the bestcomm transmit task */
> free_irq(bcom_get_task_irq(lpbfifo.bcom_tx_task), &lpbfifo);
>but I've not been able to find a corresponding request_irq().
This driver does not request the tx task irq itself, but a fifo
client driver can request/free tx interrupts for submitted
fifo write tasks, like mpc5200 fec and pata drivers do, so
it is okay.
>Is it dead code? Is there something missing in the probe?
No.
--
Anatolij
next prev parent reply other threads:[~2022-01-29 9:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-29 7:16 [PATCH] powerpc: platforms: 52xx: Fix a resource leak in an error handling path Christophe JAILLET
2022-01-29 7:16 ` Christophe JAILLET
2022-01-29 9:50 ` Anatolij Gustschin [this message]
2022-01-29 9:50 ` Anatolij Gustschin
2022-02-01 6:44 ` Dan Carpenter
2022-02-01 6:44 ` Dan Carpenter
2022-11-30 9:23 ` Michael Ellerman
2022-11-30 9:23 ` Michael Ellerman
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=20220129105007.6dfdea45@crub \
--to=agust@denx.de \
--cc=benh@kernel.crashing.org \
--cc=bones@secretlab.ca \
--cc=christophe.jaillet@wanadoo.fr \
--cc=grant.likely@secretlab.ca \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.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 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.