diff mbox series

[net-next] mctp/test: Update refcount checking in route fragment tests

Message ID 20211118065723.2808020-1-jk@codeconstruct.com.au (mailing list archive)
State Accepted
Commit f6ef47e5bdc6f652176e433b02317fc83049f8d7
Delegated to: Netdev Maintainers
Headers show
Series [net-next] mctp/test: Update refcount checking in route fragment tests | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 5 of 5 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 11 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Jeremy Kerr Nov. 18, 2021, 6:57 a.m. UTC
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>
---
 net/mctp/test/route-test.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Nov. 18, 2021, 12:10 p.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Thu, 18 Nov 2021 14:57:23 +0800 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [net-next] mctp/test: Update refcount checking in route fragment tests
    https://git.kernel.org/netdev/net-next/c/f6ef47e5bdc6

You are awesome, thank you!
diff mbox series

Patch

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);