lkml.org 
[lkml]   [2019]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: fs_context-related oops in mainline
Date
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

\
 
 \ /
  Last update: 2019-03-15 15:25    [W:0.043 / U:1.516 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site