提交 db74ece9 编写于 作者: J Jan Blunck 提交者: Linus Torvalds

Dont touch fs_struct in usermodehelper

This test seems to be unnecessary since we always have rootfs mounted before
calling a usermodehelper.
Signed-off-by: NAndreas Gruenbacher <agruen@suse.de>
Signed-off-by: NJan Blunck <jblunck@suse.de>
Acked-by: NChristoph Hellwig <hch@lst.de>
Acked-by: NGreg KH <greg@kroah.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 0d63e4f9
...@@ -173,10 +173,7 @@ static int ____call_usermodehelper(void *data) ...@@ -173,10 +173,7 @@ static int ____call_usermodehelper(void *data)
*/ */
set_user_nice(current, 0); set_user_nice(current, 0);
retval = -EPERM; retval = kernel_execve(sub_info->path, sub_info->argv, sub_info->envp);
if (current->fs->root)
retval = kernel_execve(sub_info->path,
sub_info->argv, sub_info->envp);
/* Exec failed? */ /* Exec failed? */
sub_info->retval = retval; sub_info->retval = retval;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册