All of lore.kernel.org
 help / color / mirror / Atom feed
From: "NeilBrown" <neilb@suse.de>
To: "Daire Byrne" <daire@dneg.com>
Cc: "Trond Myklebust" <trond.myklebust@hammerspace.com>,
	"Anna Schumaker" <Anna.Schumaker@netapp.com>,
	"linux-nfs" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH/rfc v2] NFS: introduce NFS namespaces.
Date: Thu, 08 Jul 2021 09:18:55 +1000	[thread overview]
Message-ID: <162569993532.31036.942509527308749032@noble.neil.brown.name> (raw)
In-Reply-To: <CAPt2mGPSeK6YHPQ8r6Z0UJv4mJnRAcEEc4VmLaENo91-K8P=fQ@mail.gmail.com>

On Thu, 08 Jul 2021, Daire Byrne wrote:
> On Wed, 7 Jul 2021 at 22:25, NeilBrown <neilb@suse.de> 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
> 
> 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?
> 
> 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, struct fs_context *src_fc)
 	ctx->nfs_server.export_path	= NULL;
 	ctx->nfs_server.hostname	= NULL;
 	ctx->fscache_uniq		= NULL;
+	ctx->namespace			= NULL;
 	ctx->clone_data.fattr		= NULL;
 	fc->fs_private = ctx;
 	return 0;


  reply	other threads:[~2021-07-07 23:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25  1:32 [PATCH/rfc] NFS: introduce NFS namespaces NeilBrown
2021-06-25 13:07 ` kernel test robot
2021-06-25 13:37   ` Dan Carpenter
2021-06-28  0:14   ` NeilBrown
2021-06-28  6:35     ` Dan Carpenter
2021-06-28  6:35       ` Dan Carpenter
2021-07-01  0:54 ` [PATCH/rfc v2] " NeilBrown
2021-07-01  9:32   ` Daire Byrne
2021-07-01 11:39     ` NeilBrown
2021-07-03 12:45       ` Daire Byrne
2021-07-03 23:03         ` NeilBrown
2021-07-06 16:22           ` Daire Byrne
2021-07-07  1:12             ` NeilBrown
2021-07-07 10:57               ` Daire Byrne
2021-07-07 21:25                 ` NeilBrown
2021-07-07 22:21                   ` Daire Byrne
2021-07-07 23:18                     ` NeilBrown [this message]
2021-07-13 12:27                       ` Daire Byrne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=162569993532.31036.942509527308749032@noble.neil.brown.name \
    --to=neilb@suse.de \
    --cc=Anna.Schumaker@netapp.com \
    --cc=daire@dneg.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@hammerspace.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.