summaryrefslogtreecommitdiffstats
path: root/net/mctp
diff options
context:
space:
mode:
authorJeremy Kerr <jk@codeconstruct.com.au>2021-11-18 14:57:23 +0800
committerDavid S. Miller <davem@davemloft.net>2021-11-18 12:01:14 +0000
commitf6ef47e5bdc6f652176e433b02317fc83049f8d7 (patch)
treecae72195959909ce060801674a21767159632800 /net/mctp
parent4cdf85ef2371e851d2a93602b7965fd5758e3ac4 (diff)
downloadlinux-f6ef47e5bdc6f652176e433b02317fc83049f8d7.tar.gz
linux-f6ef47e5bdc6f652176e433b02317fc83049f8d7.tar.bz2
linux-f6ef47e5bdc6f652176e433b02317fc83049f8d7.zip
mctp/test: Update refcount checking in route fragment tests
In 99ce45d5e, 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: 99ce45d5e7db ("mctp: Implement extended addressing") Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mctp')
-rw-r--r--net/mctp/test/route-test.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/net/mctp/test/route-test.c b/net/mctp/test/route-test.c
index 36fac3daf86a..86ad15abf897 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);