From 0d0162cef3ab38a5d58b5cef8fbf681d8bc870fb Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Thu, 18 Nov 2021 14:57:23 +0800 Subject: [PATCH] mctp/test: Update refcount checking in route fragment tests In d36e1fe55, we moved a route refcount decrement from mctp_do_fragment_route into the caller. This invalidates the assumption that the route test makes about refcount behaviour, so the route tests fail. This change fixes the test case to suit the new refcount behaviour. Fixes: d36e1fe55d72 ("mctp: Implement extended addressing") Signed-off-by: Jeremy Kerr Signed-off-by: David S. Miller --- net/mctp/test/route-test.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/net/mctp/test/route-test.c b/net/mctp/test/route-test.c index 36fac3daf86a4..86ad15abf8978 100644 --- a/net/mctp/test/route-test.c +++ b/net/mctp/test/route-test.c @@ -150,11 +150,6 @@ static void mctp_test_fragment(struct kunit *test) rt = mctp_test_create_route(&init_net, NULL, 10, mtu); KUNIT_ASSERT_TRUE(test, rt); - /* The refcount would usually be incremented as part of a route lookup, - * but we're setting the route directly here. - */ - refcount_inc(&rt->rt.refs); - rc = mctp_do_fragment_route(&rt->rt, skb, mtu, MCTP_TAG_OWNER); KUNIT_EXPECT_FALSE(test, rc); -- 2.39.5