Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3694093pxb; Mon, 24 Jan 2022 15:33:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJw7g1R6OVl9M2fDJkQUOa93T0YGicTd4/yc4FrAofAqb13ofMARUxW89S5Airmxbq+tnmvZ X-Received: by 2002:aa7:91d1:0:b0:4c0:27ac:4d6b with SMTP id z17-20020aa791d1000000b004c027ac4d6bmr15537703pfa.85.1643067237063; Mon, 24 Jan 2022 15:33:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643067237; cv=none; d=google.com; s=arc-20160816; b=sVudFBJeAAbtwHJfdRNjlYjH1LpfW5k5b32GXg3e/FPlzM5vVj5r6AG9ZN9KgqMWei 8nftvL7bCagPwU4QvNx7J2veuM26NY7WBovIjLOQ3n3D3Fyluq44hDCe7HIGrKkSC8UJ 46AQRASjpIFxfof4V1I+M/1bHDPSvWjO9jAqeuYetxcTIjQ8f06szA2pdXkq6gduCI+H f59QhPCYC0RPGyC+rUdhd7A/PEhRM8mLipe8sW90WoRwt/MBU30HX2U8lpxa6k1gYquZ ecx907z//eU5dndBVEMDSS89UuibFz9z9w2+/qKokgucGjQQAylctWx74LKIeEPZodpt RTOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Ev6ksIDy2YkvBG4cp4XIuxhIJZrw75NLdiA7L0nqtRU=; b=MaVEa2BAcpBYhtsU2PdJbJ+kUYiWNKV2RVDibctLUKu/nKfeFH7e5PbydeAk+GUnYC +2pmy4H7tsgTqM+FW7FrJ6pmwROn9bGpAkY78Vzoogfe1MAg598JNudqx16+T+xtryKx 33j/cupDVQ54Ry0fcKhNserTRGss9ec/3VD8l8No9uK6LVP4zJ60A2xFBtQJqfS6UZv9 H21P7sqKfST3Ccq7nvk5OYjh0sFPblOVucJH4CRuGudfQZ2QPvZaZchQ1lQFP01OgVs+ o5zkptlqpHk9v6KgzGSdzM75YlBWuM8+2nHN3kdxS/orOnS38BNoN4DtKn0dEiVBHDNB ke3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NJjIRKV1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c17si12992058pls.596.2022.01.24.15.33.31; Mon, 24 Jan 2022 15:33:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NJjIRKV1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1849705AbiAXX0b (ORCPT + 99 others); Mon, 24 Jan 2022 18:26:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1835944AbiAXWht (ORCPT ); Mon, 24 Jan 2022 17:37:49 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2A03C0E9BB6; Mon, 24 Jan 2022 13:00:09 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7209360B03; Mon, 24 Jan 2022 21:00:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52773C340E7; Mon, 24 Jan 2022 21:00:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058008; bh=ZJHWMUCWg6+N2cEePcY7AEKzfwzAQ9WRJqqZIo2gEFk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NJjIRKV1uz5AoJ2tLkOM91W9VAyNtNLQhghQ7C+04UeiL3vD1038Fm3td41VcVLvB GxmY3ji/I2aE5WzBQcYrlT4eRE1kiIU2hQjnrAhcwZMyI6/Ii2gTcDxyR4ynOd3PvV y7OVkqGTsA65SAm5og6G0jW9l0N0uQfMhzHFRZc8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jeremy Kerr , "David S. Miller" , Sasha Levin Subject: [PATCH 5.16 0150/1039] mctp/test: Update refcount checking in route fragment tests Date: Mon, 24 Jan 2022 19:32:19 +0100 Message-Id: <20220124184130.204931581@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jeremy Kerr [ Upstream commit f6ef47e5bdc6f652176e433b02317fc83049f8d7 ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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.34.1