[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251112182724.1109474-1-aswin@linux.ibm.com>
Date: Wed, 12 Nov 2025 19:27:24 +0100
From: Aswin Karuvally <aswin@...ux.ibm.com>
To: David Miller <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>,
Andrew Lunn <andrew+netdev@...n.ch>
Cc: netdev@...r.kernel.org, linux-s390@...r.kernel.org,
Heiko Carstens <hca@...ux.ibm.com>, Vasily Gorbik <gor@...ux.ibm.com>,
Alexander Gordeev <agordeev@...ux.ibm.com>,
Alexandra Winter <wintera@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ux.ibm.com>,
Sven Schnelle <svens@...ux.ibm.com>, Simon Horman <horms@...nel.org>,
Aleksei Nikiforov <aleksei.nikiforov@...ux.ibm.com>
Subject: [PATCH net-next] s390/ctcm: Fix double-kfree
From: Aleksei Nikiforov <aleksei.nikiforov@...ux.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@...ux.ibm.com>
Signed-off-by: Aleksei Nikiforov <aleksei.nikiforov@...ux.ibm.com>
Signed-off-by: Aswin Karuvally <aswin@...ux.ibm.com>
---
drivers/s390/net/ctcm_mpc.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/s390/net/ctcm_mpc.c b/drivers/s390/net/ctcm_mpc.c
index 0aeafa772fb1..407b7c516658 100644
--- a/drivers/s390/net/ctcm_mpc.c
+++ b/drivers/s390/net/ctcm_mpc.c
@@ -701,7 +701,6 @@ static void mpc_rcvd_sweep_req(struct mpcg_info *mpcginfo)
grp->sweep_req_pend_num--;
ctcmpc_send_sweep_resp(ch);
- kfree(mpcginfo);
return;
}
--
2.48.1
Powered by blists - more mailing lists