From: Simon Horman <horms@kernel.org>
To: Aswin Karuvally <aswin@linux.ibm.com>
Cc: David Miller <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
netdev@vger.kernel.org, linux-s390@vger.kernel.org,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Alexandra Winter <wintera@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Aleksei Nikiforov <aleksei.nikiforov@linux.ibm.com>
Subject: Re: [PATCH net-next] s390/ctcm: Fix double-kfree
Date: Mon, 17 Nov 2025 14:53:31 +0000 [thread overview]
Message-ID: <aRs26yy7xkr3Ln54@horms.kernel.org> (raw)
In-Reply-To: <20251112182724.1109474-1-aswin@linux.ibm.com>
On Wed, Nov 12, 2025 at 07:27:24PM +0100, Aswin Karuvally wrote:
> From: Aleksei Nikiforov <aleksei.nikiforov@linux.ibm.com>
>
> The function 'mpc_rcvd_sweep_req(mpcginfo)' is called conditionally
> from function 'ctcmpc_unpack_skb'. It frees passed mpcginfo.
> After that a call to function 'kfree' in function 'ctcmpc_unpack_skb'
> frees it again.
>
> Remove 'kfree' call in function 'mpc_rcvd_sweep_req(mpcginfo)'.
>
> Bug detected by the clang static analyzer.
>
> Fixes: 0c0b20587b9f25a2 ("s390/ctcm: fix potential memory leak")
> Reviewed-by: Aswin Karuvally <aswin@linux.ibm.com>
> Signed-off-by: Aleksei Nikiforov <aleksei.nikiforov@linux.ibm.com>
> Signed-off-by: Aswin Karuvally <aswin@linux.ibm.com>
Thanks,
I agree with this analysis.
And this change brings mpc_rcvd_sweep_req()
into line with other functions that ctcmpc_unpack_skb()
passes mpcginfo - they don't free it either.
Reviewed-by: Simon Horman <horms@kernel.org>
...
next prev parent reply other threads:[~2025-11-17 14:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-12 18:27 [PATCH net-next] s390/ctcm: Fix double-kfree Aswin Karuvally
2025-11-17 14:53 ` Simon Horman [this message]
2025-11-18 1:10 ` patchwork-bot+netdevbpf
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=aRs26yy7xkr3Ln54@horms.kernel.org \
--to=horms@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=aleksei.nikiforov@linux.ibm.com \
--cc=andrew+netdev@lunn.ch \
--cc=aswin@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=svens@linux.ibm.com \
--cc=wintera@linux.ibm.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 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.