[PATCH net] net: mctp: Fix bad kfree_skb in bind lookup test
Subsystems:
management component transport protocol (mctp), networking [general], the rest
STALE390d
3 messages,
3 authors,
2025-08-14 · open the first message on its own page
The kunit test's skb_pkt is consumed by mctp_dst_input() so shouldn't be
freed separately.
Fixes: e6d8e7dbc5a3 ("net: mctp: Add bind lookup test")
Reported-by: Alexandre Ghiti <alex@ghiti.fr>
Closes: https://lore.kernel.org/all/734b02a3-1941-49df-a0da-ec14310d41e4@ghiti.fr/
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
---
net/mctp/test/route-test.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/mctp/test/route-test.c b/net/mctp/test/route-test.c
index fb6b46a952cb432163f6adb40bb395d658745efd..69a3ccfc6310cd78d4138f56609f1d83d4082bd1 100644
--- a/net/mctp/test/route-test.c
+++ b/net/mctp/test/route-test.c
@@ -1586,7 +1586,6 @@ static void mctp_test_bind_lookup(struct kunit *test)
cleanup:
kfree_skb(skb_sock);
- kfree_skb(skb_pkt);
/* Drop all binds */
for (size_t i = 0; i < ARRAY_SIZE(lookup_binds); i++)
---
base-commit: 89886abd073489e26614e4d80fb8eb70d3938a0b
change-id: 20250812-fix-mctp-bind-test-5a3582643ae4
Best regards,
--
Matt Johnston [off-list ref]
Hi Matt,
On 8/12/25 07:08, Matt Johnston wrote:
quoted hunk
The kunit test's skb_pkt is consumed by mctp_dst_input() so shouldn't be
freed separately.
Fixes: e6d8e7dbc5a3 ("net: mctp: Add bind lookup test")
Reported-by: Alexandre Ghiti <alex@ghiti.fr>
Closes: https://lore.kernel.org/all/734b02a3-1941-49df-a0da-ec14310d41e4@ghiti.fr/
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
---
net/mctp/test/route-test.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/mctp/test/route-test.c b/net/mctp/test/route-test.c
index fb6b46a952cb432163f6adb40bb395d658745efd..69a3ccfc6310cd78d4138f56609f1d83d4082bd1 100644
--- a/net/mctp/test/route-test.c
+++ b/net/mctp/test/route-test.c
@@ -1586,7 +1586,6 @@ static void mctp_test_bind_lookup(struct kunit *test)
cleanup:
kfree_skb(skb_sock);
- kfree_skb(skb_pkt);
/* Drop all binds */
for (size_t i = 0; i < ARRAY_SIZE(lookup_binds); i++)
---
base-commit: 89886abd073489e26614e4d80fb8eb70d3938a0b
change-id: 20250812-fix-mctp-bind-test-5a3582643ae4
Best regards,
Can't see any warning/oops anymore this morning with this patch, thanks!
Tested-by: Alexandre Ghiti <redacted>
Thanks for the quick fix,
Alex
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski [off-list ref]:
On Tue, 12 Aug 2025 13:08:58 +0800 you wrote:
The kunit test's skb_pkt is consumed by mctp_dst_input() so shouldn't be
freed separately.
Fixes: e6d8e7dbc5a3 ("net: mctp: Add bind lookup test")
Reported-by: Alexandre Ghiti <alex@ghiti.fr>
Closes: https://lore.kernel.org/all/734b02a3-1941-49df-a0da-ec14310d41e4@ghiti.fr/
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
[...]
Here is the summary with links:
- [net] net: mctp: Fix bad kfree_skb in bind lookup test
https://git.kernel.org/netdev/net/c/a58893aa1739
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html