netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>,
	Christian Brauner <christian.brauner@ubuntu.com>,
	Andrea Righi <andrea.righi@canonical.com>,
	stable <stable@vger.kernel.org>,
	linux-netdev <netdev@vger.kernel.org>
Subject: Re: NetworkManager fails to start
Date: Tue, 15 Jun 2021 20:45:40 +0300	[thread overview]
Message-ID: <YMjnRLdctAzzP0Fi@unreal> (raw)
In-Reply-To: <CAHk-=wiucGtZQHpyfm5bK1xp9vepu9dA_OBE-A1-Gr=Neo8b2Q@mail.gmail.com>

On Tue, Jun 15, 2021 at 09:26:19AM -0700, Linus Torvalds wrote:
> On Tue, Jun 15, 2021 at 9:21 AM Leon Romanovsky <leon@kernel.org> wrote:
> >
> > The commit 591a22c14d3f ("proc: Track /proc/$pid/attr/ opener mm_struct")
> > that we got in v5.13-rc6 broke our regression to pieces. The NIC interfaces
> > fail to start when using NetworkManager.
> 
> Does the attached patch fix it?

Yes, this patch fixed the issue.
Tested-by: Leon Romanovsky <leonro@nvidia.com>

Thanks

> 
> It just makes the open always succeed, and then the private_data that
> the open did (that may or may not then have been filled in) is only
> used on write.
> 
>                Linus

>  fs/proc/base.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/proc/base.c b/fs/proc/base.c
> index 7118ebe38fa6..9cbd915025ad 100644
> --- a/fs/proc/base.c
> +++ b/fs/proc/base.c
> @@ -2676,7 +2676,9 @@ static int proc_pident_readdir(struct file *file, struct dir_context *ctx,
>  #ifdef CONFIG_SECURITY
>  static int proc_pid_attr_open(struct inode *inode, struct file *file)
>  {
> -	return __mem_open(inode, file, PTRACE_MODE_READ_FSCREDS);
> +	file->private_data = NULL;
> +	__mem_open(inode, file, PTRACE_MODE_READ_FSCREDS);
> +	return 0;
>  }
>  
>  static ssize_t proc_pid_attr_read(struct file * file, char __user * buf,


  parent reply	other threads:[~2021-06-15 17:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15 16:21 NetworkManager fails to start Leon Romanovsky
2021-06-15 16:26 ` Linus Torvalds
2021-06-15 16:49   ` Leon Romanovsky
2021-06-15 17:45   ` Leon Romanovsky [this message]
2021-06-15 18:06     ` Linus Torvalds

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=YMjnRLdctAzzP0Fi@unreal \
    --to=leon@kernel.org \
    --cc=andrea.righi@canonical.com \
    --cc=christian.brauner@ubuntu.com \
    --cc=keescook@chromium.org \
    --cc=netdev@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).