Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp4595387rwn; Sun, 11 Sep 2022 16:20:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR70aLnEDo1HQrcLosgNtGGZSXiiE53aTb/tf2L6PkckM76+KksaM+tpJigBLpsxJybL/nUc X-Received: by 2002:a63:564b:0:b0:42c:414a:95fd with SMTP id g11-20020a63564b000000b0042c414a95fdmr21077003pgm.5.1662938459792; Sun, 11 Sep 2022 16:20:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662938459; cv=none; d=google.com; s=arc-20160816; b=ymAK2KoJlSxvDtJ6bA92Po8y5ApT7QIZzN4W54nbw3jhK3V01/ngGImoklWlOecKhk RzEwKyFQtew5eITLB8hl5ShREpoDf5Eiysa6XsCyrqHVEe7xhI/SVJyvYxQYLwzUL9VV oHusAV6ordHLjY/LlpVD2Yh6O43ptRC90YipUlxio0u/DXLQL40paBG+S2BbNKJLf6NU W3cC+jVwsLJVYsYpbePaZqrKFBVW3OfvPxXoyCVNS0xAY6zifk5GRtIfeYNitVYceLve 9el4BL1BXZCeyFjfsHIWJm/1UL90ZEfLcI32V0iaRXyXDA414h2HiLCtUdhvZUqd/pQi /jyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:references:in-reply-to:subject :cc:to:from:mime-version:content-transfer-encoding:dkim-signature :dkim-signature; bh=6GyFucV8IpoFY7ympxLT3VA1hGgSyrlaYbBgNDtngws=; b=p6ntmrlJPip3cDvaJGgjx+slZ9p2u/QKLw1opwWu2Ioun2wn+GeXjvigoErmc4Lixc iB6P6mOsDG18FIBFKk++b46UebGIXh/mobyNjhtdQvUqyZKANAW8d8wqIA9WhTpadND9 BvcHbTB4w/fccS/wO/KXWyecy73B5ZcRPz/iyn3MkeiQAYYaLn4qfGqxE4ycvVfeZQIr 7m/ZS6oAX3xt1lNokvDhRZlIQEyxztGFZD67qZ718oQr/O5pAF1eB/HobanMtphJpecg nVUB9rpWvBC4cqpyk4+SYFNtmnbvy2Cw0lemMaKUdwuujUteZU3NDK1TxG5VntYHzyxx mhSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=AapnVKz9; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=drju+b++; 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=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q1-20020a656a81000000b004344b581925si7707268pgu.879.2022.09.11.16.20.41; Sun, 11 Sep 2022 16:20:59 -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=@suse.de header.s=susede2_rsa header.b=AapnVKz9; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=drju+b++; 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=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229809AbiIKXBG (ORCPT + 99 others); Sun, 11 Sep 2022 19:01:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbiIKXBE (ORCPT ); Sun, 11 Sep 2022 19:01:04 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFC6A22BC3; Sun, 11 Sep 2022 16:01:01 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 9E5F41F983; Sun, 11 Sep 2022 23:00:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1662937259; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6GyFucV8IpoFY7ympxLT3VA1hGgSyrlaYbBgNDtngws=; b=AapnVKz9c6auorp4kIOp+Di5TmReoXni7sRNu0PSMenZJjKKcJaR5+mOTSAY2lqRZzH5Yw iCj+9I1nZFGzdnwJZkn5+wNNKhaQ4MN6adAhTgaWpQ72ese3u1Z45kAFn0y3M286vQyqbb KfsKILXMAFrPnJUi7VsaUurDbjjFXHM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1662937259; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6GyFucV8IpoFY7ympxLT3VA1hGgSyrlaYbBgNDtngws=; b=drju+b++gNLD/clfcCSu/WZXKkgAPKWSEVYI0oc3rTF6Zbb2Ix33AW1MPpGdvG6k9CUK4p KfviLz7Unw5tibCQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 27A3F133E6; Sun, 11 Sep 2022 23:00:56 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 7DwFM6hoHmPhDgAAMHmgww (envelope-from ); Sun, 11 Sep 2022 23:00:56 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "NeilBrown" To: "gregkh@linuxfoundation.org" Cc: "Eugeniu Rosca" , "Trond Myklebust" , "mrodin@de.adit-jv.com" , "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "roscaeugeniu@gmail.com" Subject: [PATCH - stable] SUNRPC: use _bh spinlocking on ->transport_lock In-reply-to: References: <20220418121210.689577360@linuxfoundation.org>, <20220418121211.327937970@linuxfoundation.org>, <20220907142548.GA9975@lxhi-065>, <166259870333.30452.4204968221881228505@noble.neil.brown.name>, , <20220908120931.GA3480@lxhi-065>, Date: Mon, 12 Sep 2022 09:00:52 +1000 Message-id: <166293725263.30452.1720462103844620549@noble.neil.brown.name> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Prior to Linux 5.3, ->transport_lock in sunrpc required the _bh style spinlocks (when not called from a bottom-half handler). When upstream 3848e96edf4788f772d83990022fa7023a233d83 was backported to stable kernels, the spin_lock/unlock calls should have been changed to the _bh version, but this wasn't noted in the patch and didn't happen. So convert these lock/unlock calls to the _bh versions. This patch is required for any stable kernel prior to 5.3 to which the above mentioned patch was backported. Namely 4.9.y, 4.14.y, 4.19.y. Signed-off-by: NeilBrown --- net/sunrpc/xprt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index d05fa7c36d00..b1abf4848bbc 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c @@ -1550,9 +1550,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 -- 2.37.1