Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp5966157pxv; Wed, 7 Jul 2021 16:19:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7ADtwp5DjseFuAZsy5h3tTcUg75JDOPQQOVsTc44mjv9HcUtID4IA8slIgZEZ3l7z6sGu X-Received: by 2002:a92:a304:: with SMTP id a4mr20797055ili.197.1625699963893; Wed, 07 Jul 2021 16:19:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625699963; cv=none; d=google.com; s=arc-20160816; b=A4ieRoVtOWCSuAcjHTkUEcSjALbPA+n818e4BA1w9AjHWxJ9XD59U8gmZ57Q8dxWl+ BM0yjBlPBt78pmw2RWlcwBS1+wjT/zjkqAZCyiMEveiWjos2/o8SVDXl8/TH5pJCkXCT xmiiHLNKMFg8Y/WPXjHK5iwOId5EtbLTl4/x287DMxwODf2IKmRE8UTEsVgwOwawOmLh Yw/Kg3T/CbyeWOWJkfwO3/pRBS6BkDgct6GPx4/Zi9eYbGJl6fupDlcV2ragDHY4Zb6F tn9lGxZyPWzbonpxJss8FsWxtFcF9vr5W0phNJk/Yb1ITLHAfDerIn8IOxan1U1yc11l +NSA== 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=AOi6N9HLzqA6yFpmumrD0uLY4aONCxJ20wIMR1x8aBs=; b=GZEPiV7pEMz1/yqmkTna2uMBEQ5GglhFpUJWTkYJZf05c9bIFow4ctXsAHV3Z+fkQi AUGXlAYMwgfibdazwRaojq2LZF545kiqldw6I/9wV5id6bpr49OUrb8/RwROG4PHI25U 0ccp6m7TGL7S/CS7c+2QWdloN+CkVkWaB0oH4k9MfXKYZsGnycqtOwnRwREEDoNR0yyC l7V5fqVB/NGQHiKs1qH5nm0ktKUy+C5uS/gZ8emfgy4z3rKCPEKWWENEpgYuBX6j+rnV JhggYzu7T0PksmZ70kjKcIGz/dSajZq8E7EmUPBuE87jr69ogMTYJKy1d03+lbKwH44e aGXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=ADCvoXrJ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=CZLBfB85; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g3si455498ilc.117.2021.07.07.16.19.10; Wed, 07 Jul 2021 16:19:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=@suse.de header.s=susede2_rsa header.b=ADCvoXrJ; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=CZLBfB85; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230019AbhGGXVt (ORCPT + 99 others); Wed, 7 Jul 2021 19:21:49 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:38180 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230189AbhGGXVs (ORCPT ); Wed, 7 Jul 2021 19:21:48 -0400 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 479202218A; Wed, 7 Jul 2021 23:19:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1625699940; 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=AOi6N9HLzqA6yFpmumrD0uLY4aONCxJ20wIMR1x8aBs=; b=ADCvoXrJzDGpXMnDQBjKmrWoDhghMSrDj1wW1Z+nTq/9hV2nW2FxkB8HGTC6nSdrXQPtsz ZExIP5R5PAQFLetGL0Mhy3vFTLAT/Hfs4rr5/f1keUkx3hiHAXT6/zdMTV5wglvDm37QSU qCPJfGduRxL0ATto88mYRUG83JR4wuk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1625699940; 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=AOi6N9HLzqA6yFpmumrD0uLY4aONCxJ20wIMR1x8aBs=; b=CZLBfB85vooNs5tSkdCrQmtVvgabKQIX81b68JkWBX0Nc6kWzNqXqg9SPqXMGZEuIOwtsf vq6KZSyzKGuwGFCA== 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 AB37013AE6; Wed, 7 Jul 2021 23:18:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id LYLCFmI25mC6KAAAMHmgww (envelope-from ); Wed, 07 Jul 2021 23:18:58 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 From: "NeilBrown" To: "Daire Byrne" Cc: "Trond Myklebust" , "Anna Schumaker" , "linux-nfs" Subject: Re: [PATCH/rfc v2] NFS: introduce NFS namespaces. In-reply-to: References: <162458475606.28671.1835069742861755259@noble.neil.brown.name>, <162510089174.7211.449831430943803791@noble.neil.brown.name>, , <162513954601.3001.5763461156445846045@noble.neil.brown.name>, , <162535340922.16506.4184249866230493262@noble.neil.brown.name>, , <162562036711.12832.7541413783945987660@noble.neil.brown.name>, , <162569314954.31036.11087071768390664533@noble.neil.brown.name>, Date: Thu, 08 Jul 2021 09:18:55 +1000 Message-id: <162569993532.31036.942509527308749032@noble.neil.brown.name> Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, 08 Jul 2021, Daire Byrne wrote: > On Wed, 7 Jul 2021 at 22:25, NeilBrown wrote: > > > > That's pretty solid evidence! > > > > I just realized that the stack trace you reported mentions > > "kfree_const()". > > My latest patch doesn't include that, and nfs doesn't use it at all. > > Might you still be using the older patch? > > > > NeilBrown >=20 > Oh... the last stack trace, the readdir one? I don't see kfree_const > myself but I may have a case of word blindness. The first one I > reported definitely has kfree_const but after your latest patch, this > last one around readdir doesn't seem to? >=20 > I'm pretty sure I have your latest patch (with kfree instead of > kfree_const) correctly applied. Though, I will double check that the > correct kernel and modules were then installed properly on my test VM. sorry - my bad.. I think I've found it. Rather than sending the whole patch, here is the incremental fix. But not clearing this pointer, I risk the value in it being freed twice. That might lead to what you saw. Thanks, NeilBrown diff --git a/fs/nfs/fs_context.c b/fs/nfs/fs_context.c index 7c644a31d304..9e34af223ce6 100644 --- a/fs/nfs/fs_context.c +++ b/fs/nfs/fs_context.c @@ -1451,6 +1451,7 @@ static int nfs_fs_context_dup(struct fs_context *fc, st= ruct fs_context *src_fc) ctx->nfs_server.export_path =3D NULL; ctx->nfs_server.hostname =3D NULL; ctx->fscache_uniq =3D NULL; + ctx->namespace =3D NULL; ctx->clone_data.fattr =3D NULL; fc->fs_private =3D ctx; return 0;