All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: dhowells@redhat.com,
	Dominik Brodowski <linux@dominikbrodowski.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Tejun Heo <tj@kernel.org>, Li Zefan <lizefan@huawei.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	cgroups@vger.kernel.org, fenghua.yu@intel.com,
	linux-kernel@vger.kernel.org
Subject: Re: fs_context-related oops in mainline
Date: Fri, 15 Mar 2019 14:24:30 +0000	[thread overview]
Message-ID: <11428.1552659870@warthog.procyon.org.uk> (raw)
In-Reply-To: <20190315121813.GY2217@ZenIV.linux.org.uk>

Al Viro <viro@zeniv.linux.org.uk> wrote:

> -	if (fc->user_ns)
> -		put_user_ns(fc->user_ns);
> -	fc->user_ns = get_user_ns(netns->user_ns);
> +	if (netns) {
> +		if (fc->user_ns)
> +			put_user_ns(fc->user_ns);
> +		fc->user_ns = get_user_ns(netns->user_ns);
> +	}

This begs the question why is sysfs using the current network namespace's idea
of the user namespace?  Why not just use the one directly from current->cred?

David

  parent reply	other threads:[~2019-03-15 14:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15  7:43 fs_context-related oops in mainline Dominik Brodowski
2019-03-15 11:34 ` Al Viro
2019-03-15 11:46   ` Dominik Brodowski
2019-03-15 11:44 ` David Howells
2019-03-15 11:50   ` Dominik Brodowski
2019-03-15 12:18     ` Al Viro
2019-03-15 12:57       ` Dominik Brodowski
2019-03-15 14:24       ` David Howells [this message]
2019-03-15 14:29         ` Greg Kroah-Hartman
2019-03-15 14:51         ` Al Viro

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=11428.1552659870@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=cgroups@vger.kernel.org \
    --cc=fenghua.yu@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@dominikbrodowski.net \
    --cc=lizefan@huawei.com \
    --cc=tj@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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.