Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5489724iog; Wed, 22 Jun 2022 22:06:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tQTZxbMTcCTsLKRL/3r4D1lA0mwQZo/R3nKw1JNjnFpnOPbwGAHooN58iTJAqDqMo9vpWJ X-Received: by 2002:a62:4ed3:0:b0:525:5a10:d5ac with SMTP id c202-20020a624ed3000000b005255a10d5acmr597964pfb.65.1655960805734; Wed, 22 Jun 2022 22:06:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655960805; cv=none; d=google.com; s=arc-20160816; b=UHG2DPzPs9+8ccxIqCj/TCeLmwKuTgy4J3kmR8hBcfw6qI5DmYuNRQ9+N9Hdg8Ds+X +cQb4CHKcfj6Zh1cFW381NejfuqwST24/O36gb9w1hAQlfV2PlJJcXz9Ny5K4l6qy535 ANsfQ8/mvkDFAGVU9aMQFpYXd01WugAmOGO9ECLFrHYJIS1fjrlOxE9ZZ5BuAfVJWfRF MYlsvFfTffKrdJgDe9m58weXJIJ9LAjcyVIVLvYy3IR7ZnqIUN22hzwxp9TFOhRQuj5D Dd0SUNPmxPcqWVrY6EQq1pl4Lw6AlNJekjx066MVtgEvRC4f56da9gJWe4uQ7QnKdtJL it7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:mime-version :content-transfer-encoding:dkim-signature:dkim-signature; bh=g0OVDl6RRnwAonWjBgsU4+NvONbHQclUUrv8a2IZHos=; b=ZCMxMyg4ab7lOZ5BXxXEi1I/9vL7ISRe9CLKTVBcvs/ad72foBJEMEWd/X9EOUoMYq 2WViyGpkOXglJp91Wx7mMmtvyKd6BpAU56ygN5nI23poYBdMZq0Ll0f0gdzuRPG04r56 TyXba9+2RhweOe27u6Tt/nzmQIKEB4ewv9FS0A7TQpW53uiwLSfpGK8DRkkGmEVfKCvX KVIsTq3OpLkGy1aAJYavQA/mUx/1uRUUWPAU5Ys+1/pMsmmhriMCy1rwo9OJXsljVNvF OJlTyMLLPPiGcJcbh+ScCRZnBLZ7GprbRBVez/SIgXydV6Te+CQHrsNSIBC77L7mzFqc /1mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=YlOlVqx2; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=IlF1GtaK; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-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 s24-20020a63dc18000000b003a9f9442c80si26615585pgg.508.2022.06.22.22.06.20; Wed, 22 Jun 2022 22:06:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=YlOlVqx2; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=IlF1GtaK; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-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 S229815AbiFWFEw (ORCPT + 99 others); Thu, 23 Jun 2022 01:04:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229700AbiFWFEf (ORCPT ); Thu, 23 Jun 2022 01:04:35 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97F9C4BFCE for ; Wed, 22 Jun 2022 21:47:49 -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-out1.suse.de (Postfix) with ESMTPS id C28B721B99; Thu, 23 Jun 2022 04:47:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1655959658; 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; bh=g0OVDl6RRnwAonWjBgsU4+NvONbHQclUUrv8a2IZHos=; b=YlOlVqx2TF8QNiiqeEn2+Cu4KaKXKwv5WHdcKwoZSL/yupD6SYZo80eRpNPBmgkFX6ULh/ 9gYvJ8ozWjUtmuExbQ7w6wOGXbJmq4B5G2/q19VaWf9CuHpvRTIAyUnjl8knEL0Fj7tFw6 NZYtX2DLPMuRxvCbLUy4Q/ailZHLuQc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1655959658; 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; bh=g0OVDl6RRnwAonWjBgsU4+NvONbHQclUUrv8a2IZHos=; b=IlF1GtaKwHJpbKPp+TRZFaR8Z55K04tcKIU5nVchlcIH6qE9ZqiE32tkW0Kj+Qgcol188u 9miDMqddd1pOFaDQ== 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 6355C13461; Thu, 23 Jun 2022 04:47:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 5OEECGnws2L/GAAAMHmgww (envelope-from ); Thu, 23 Jun 2022 04:47:37 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 From: "NeilBrown" To: Trond Myklebust , Anna Schumaker Cc: Chuck Lever III , linux-nfs Subject: [PATCH] NFS: restore module put when manager exits. Date: Thu, 23 Jun 2022 14:47:34 +1000 Message-id: <165595965412.4786.12578338276708392878@noble.neil.brown.name> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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-nfs@vger.kernel.org Commit f49169c97fce ("NFSD: Remove svc_serv_ops::svo_module") removed calls to module_put_and_kthread_exit() from threads that acted as SUNRPC servers and had a related svc_serv_ops structure. This was correct. It ALSO removed the module_put_and_kthread_exit() call from nfs4_run_state_manager() which is NOT a SUNRPC service. Consequently every time the NFSv4 state manager runs the module count increments and won't be decremented. So the nfsv4 module cannot be unloaded. So restore the module_put_and_kthread_exit() call. Fixes: f49169c97fce ("NFSD: Remove svc_serv_ops::svo_module") Signed-off-by: NeilBrown --- fs/nfs/nfs4state.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 2540b35ec187..9bab3e9c702a 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -2753,5 +2753,6 @@ static int nfs4_run_state_manager(void *ptr) goto again; nfs_put_client(clp); + module_put_and_kthread_exit(0); return 0; } -- 2.36.1