Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp5052310rwn; Mon, 12 Sep 2022 03:46:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR4macswsDpLlJwOvUe3kVIksExNQLOX1ul1fiDDmZ3p9RzytO8rBN36V0mbuPDNG3rl24mv X-Received: by 2002:a62:84c6:0:b0:538:3c39:5819 with SMTP id k189-20020a6284c6000000b005383c395819mr27132564pfd.4.1662979608066; Mon, 12 Sep 2022 03:46:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662979608; cv=none; d=google.com; s=arc-20160816; b=aBKNDGFVCT0NwRNLdwqk3F59dkGLzQIImcWBdZeRVaihYAvSHrsPmmwaOYxXiH7nOW M8St/p5DzPpQ6NKMOkeSubG60d5AgpWUoor/XzN3l9hRx0do2j9K+6MAuti2nftjyjMq c5YvicLA8zctJA5xC3/LBn7Qte2Wu1qNDT17LMEjkBXTaHW8YNlw5itRGkEvhX5+lCqJ chIr9Y3GGObPnxYvsn4+Rj9KiD1ssX851ItiyNmKI/b78DE0qYZlEUQQLcS/cx43dE+m XOzKFAe0PKrFS37KepPugT/IaaZkC59gUh9X+4+156ZilAQQlgarjci67TwEW6hQWVPi NQMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=v3Eh/eKR0FBfjCXQ4G5qBnRLd5vsj27oL8LaxzNRkks=; b=Wp9z13K/EQlBE002PwDivR1MSy05eqCKzJA9spoCcb6eJwfWE3FyaPgdXr8/CpSwjG lbMZW65LYxJptBDQ2EkwfTGjAQ7bspe/vISmbpzveEgsSPSeBnFH2sgbWeQ/2S616f0x VKspOGFHQFZxxv3+9EPFWaGxwaizwqkkOkXSg0vBnFd3XevG63aTs5Lq1EOQPGshURgu iuIvyi77482qs4y5UJA19+T+wk5wNpmtAA15BpkfY1JJABkfaH+e4IIeoaltB32vvaar ZZ4GCWOEIYFeMRAoJwL38XQ2pwky3cHy32YlSkVHsLB1dn8XVbw9mRZ5ZtmJJCuy1UTA SVAQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s20-20020a170902b19400b00176bcd1ccf3si6279503plr.591.2022.09.12.03.46.36; Mon, 12 Sep 2022 03:46:48 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229807AbiILKPV (ORCPT + 99 others); Mon, 12 Sep 2022 06:15:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229643AbiILKPT (ORCPT ); Mon, 12 Sep 2022 06:15:19 -0400 Received: from hi1smtp01.de.adit-jv.com (smtp1.de.adit-jv.com [93.241.18.167]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C86C19C21; Mon, 12 Sep 2022 03:15:18 -0700 (PDT) Received: from hi2exch02.adit-jv.com (hi2exch02.adit-jv.com [10.72.92.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hi1smtp01.de.adit-jv.com (Postfix) with ESMTPS id 9358C520594; Mon, 12 Sep 2022 12:15:16 +0200 (CEST) Received: from lxhi-065 (10.72.94.21) by hi2exch02.adit-jv.com (10.72.92.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Mon, 12 Sep 2022 12:15:15 +0200 Date: Mon, 12 Sep 2022 12:15:08 +0200 From: Eugeniu Rosca To: "gregkh@linuxfoundation.org" CC: Eugeniu Rosca , Trond Myklebust , "neilb@suse.de" , "mrodin@de.adit-jv.com" , "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "roscaeugeniu@gmail.com" Subject: Re: [PATCH 4.14 022/284] SUNRPC: avoid race between mod_timer() and del_timer_sync() Message-ID: <20220912101508.GA5500@lxhi-065> References: <20220418121210.689577360@linuxfoundation.org> <20220418121211.327937970@linuxfoundation.org> <20220907142548.GA9975@lxhi-065> <166259870333.30452.4204968221881228505@noble.neil.brown.name> <20220908120931.GA3480@lxhi-065> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [10.72.94.21] X-ClientProxiedBy: hi2exch02.adit-jv.com (10.72.92.28) To hi2exch02.adit-jv.com (10.72.92.28) X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hello Greg, On So, Sep 11, 2022 at 07:41:02 +0200, gregkh@linuxfoundation.org wrote: > On Thu, Sep 08, 2022 at 02:09:31PM +0200, Eugeniu Rosca wrote: [..] > > Your proposal [*] seems to resolve the issue for me. > > > > Any chance to get a stable patch, to which I will gladly provide > > the Reviewed-by/Tested-by signatures? > > > > > > > > > > NeilBrown > > > > > > > > [*] diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c > > index e7d55d63d4f1..7f9b94acf597 100644 > > --- a/net/sunrpc/xprt.c > > +++ b/net/sunrpc/xprt.c > > @@ -1525,9 +1525,9 @@ static void xprt_destroy(struct rpc_xprt *xprt) > > * is cleared. We use ->transport_lock to ensure the mod_timer() > > * can only run *before* del_time_sync(), never after. > > */ > > - spin_lock(&xprt->transport_lock); > > + spin_lock_bh(&xprt->transport_lock); > > del_timer_sync(&xprt->timer); > > - spin_unlock(&xprt->transport_lock); > > + spin_unlock_bh(&xprt->transport_lock); > > > > /* > > * Destroy sockets etc from the system workqueue so they can > > > > Can you just turn this into a proper patch that we can apply to the > needed stable tree(s)? It has been kindly provided by Neil Brown in https://lore.kernel.org/lkml/166293725263.30452.1720462103844620549@noble.neil.brown.name/ Best Regards, Eugeniu Rosca