Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: mctp: mctp_test_route_extaddr_input cleanup

The sock was not being released. Other than leaking, the stale socket
will conflict with subsequent bind() calls in unrelated MCTP tests.

Fixes: 46ee16462fed ("net: mctp: test: Add extaddr routing output test")
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Link: https://patch.msgid.link/20250710-mctp-bind-v4-1-8ec2f6460c56@codeconstruct.com.au
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Matt Johnston and committed by
Paolo Abeni
3558ab79 a8594c95

+2 -4
+2 -4
net/mctp/test/route-test.c
··· 1164 1164 rc = mctp_dst_input(&dst, skb); 1165 1165 KUNIT_ASSERT_EQ(test, rc, 0); 1166 1166 1167 - mctp_test_dst_release(&dst, &tpq); 1168 - 1169 1167 skb2 = skb_recv_datagram(sock->sk, MSG_DONTWAIT, &rc); 1170 1168 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, skb2); 1171 1169 KUNIT_ASSERT_EQ(test, skb2->len, len); ··· 1177 1179 KUNIT_EXPECT_EQ(test, cb2->halen, sizeof(haddr)); 1178 1180 KUNIT_EXPECT_MEMEQ(test, cb2->haddr, haddr, sizeof(haddr)); 1179 1181 1180 - skb_free_datagram(sock->sk, skb2); 1181 - mctp_test_destroy_dev(dev); 1182 + kfree_skb(skb2); 1183 + __mctp_route_test_fini(test, dev, &dst, &tpq, sock); 1182 1184 } 1183 1185 1184 1186 static void mctp_test_route_gw_lookup(struct kunit *test)