Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4468329rwb; Tue, 6 Sep 2022 07:59:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR6VCfRPIDCB6C3ie7TYbsu3kvJAyV6A0Ya9ZnggC2DhQgeV459UgaYwrMq+Q2JlHbrl8v/E X-Received: by 2002:a63:81c1:0:b0:434:aeab:7b42 with SMTP id t184-20020a6381c1000000b00434aeab7b42mr2521685pgd.619.1662476392479; Tue, 06 Sep 2022 07:59:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662476392; cv=none; d=google.com; s=arc-20160816; b=sgbiR0B2dNCkELZjv2d+cY7nufo/n2uqWrwJPFB4Rh3lSIcCIiMwcl7KFJ8+s1cTMn xOoem511qspN//IsuJhkqluusYXtsUCJAM6mhEZqPLl0cO1ScLwsMljQE7lPMdfrk/TR Kw1AP9VTA0w2dr+O42m8HndMeRHMM7hjueNHG2kvJ1oDmUAMYJrNZ21JpefP09w7H0Q1 yLb20lPwvg+cHym7tnFDbE/7IUQOycPXCntqBS3XfssVkZiwWcx9IL3Q6BNO+eDKrS0/ tQVwCitIAPe0QVrIxtQ6WbsYgokRpgi+MTCrDiA1EJhEnaV3BoqsnwiuxxLhY3epKRSN uPQA== 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=SGNeE66Dvlcepl2rSig9pOlzfAHSfsomCT8ZABWitr4=; b=qtK3xvYiUDqrL2oaj9m1qY1ySBc8YfB4fs8Lsrqp2rkAApgZCuvunqBiUSYK+peIdV 1NTUoiOS+imP8m1G1dHWuiNK3ifGbvBufK9jy1IxiFTLCLk5dVzMGIHQnrE+EHirR+iR ElaoOuW7jjpKfCojmzQybLiLFx0qOkvfefI8xsQVRL6PLyimQ+BGoM0Q0L4VavDwNj0m IQZ9OOTjYgkB+SQbT5WmSMetZpbO0E9ymFhjUE4K71AL+5T3L3/CxU+GTscdewOlSaBr kSlAP5KySRu4wMHJzaUXm+QraIdFcKKIpzjCeVk6HiID+yvRv0TYcOEHbJQVMFmm01ji 6tBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Vr9m17lM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y23-20020a631817000000b004298268026fsi115014pgl.142.2022.09.06.07.59.23; Tue, 06 Sep 2022 07:59:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Vr9m17lM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S240744AbiIFNhH (ORCPT + 99 others); Tue, 6 Sep 2022 09:37:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240725AbiIFNfx (ORCPT ); Tue, 6 Sep 2022 09:35:53 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B9267647A; Tue, 6 Sep 2022 06:34:13 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id 4B06AB8162F; Tue, 6 Sep 2022 13:34:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6361C433C1; Tue, 6 Sep 2022 13:34:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662471250; bh=DN65y0+/J8uvp6T4PDh7gjmmWeRoYezdsHkqbInMSDs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vr9m17lMsGtBL9Rfe6XcWTQDRqJDI+chUtJ9Xx5svjGSRgOuIMl+0HgtLMjB2+VSR F8A/RSlgcxrxfHAWi/jDBHI6DBf3wG3jyUpKK5HjVyqyru89orvmXW5zCzEJ8wfLXa tao8HSqEd9JiVVvnDhcB7RyYyvFJajdCCgXFmni4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yacan Liu , Tony Lu , Paolo Abeni , Sasha Levin Subject: [PATCH 5.10 20/80] net/smc: Remove redundant refcount increase Date: Tue, 6 Sep 2022 15:30:17 +0200 Message-Id: <20220906132817.801471342@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220906132816.936069583@linuxfoundation.org> References: <20220906132816.936069583@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yacan Liu [ Upstream commit a8424a9b4522a3ab9f32175ad6d848739079071f ] For passive connections, the refcount increment has been done in smc_clcsock_accept()-->smc_sock_alloc(). Fixes: 3b2dec2603d5 ("net/smc: restructure client and server code in af_smc") Signed-off-by: Yacan Liu Reviewed-by: Tony Lu Link: https://lore.kernel.org/r/20220830152314.838736-1-liuyacan@corp.netease.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin --- net/smc/af_smc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c index 5d7710dd95145..41cbc7c89c9d2 100644 --- a/net/smc/af_smc.c +++ b/net/smc/af_smc.c @@ -1325,7 +1325,6 @@ static void smc_listen_out_connected(struct smc_sock *new_smc) { struct sock *newsmcsk = &new_smc->sk; - sk_refcnt_debug_inc(newsmcsk); if (newsmcsk->sk_state == SMC_INIT) newsmcsk->sk_state = SMC_ACTIVE; -- 2.35.1