public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Blunck <jblunck@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: Linux-Kernel Mailinglist <linux-kernel@vger.kernel.org>,
	Christoph Hellwig <hch@lst.de>,
	Andreas Gruenbacher <agruen@suse.de>
Subject: [patch 02/10] Dont touch fs_struct in usermodehelper
Date: Tue, 09 Oct 2007 20:05:05 +0200	[thread overview]
Message-ID: <20071009180512.277617567@X40.localnet> (raw)
In-Reply-To: 20071009180503.075306583@X40.localnet

[-- Attachment #1: vfs/dont-touch-current-fs-usermodehelper.diff --]
[-- Type: text/plain, Size: 843 bytes --]

This test seems to be unnecessary since we always have rootfs mounted before
calling a usermodehelper.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Jan Blunck <jblunck@suse.de>
Acked-by: Christoph Hellwig <hch@lst.de>
Acked-by: Greg KH <greg@kroah.com>
---
 kernel/kmod.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Index: b/kernel/kmod.c
===================================================================
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -173,10 +173,7 @@ static int ____call_usermodehelper(void 
 	 */
 	set_user_nice(current, 0);
 
-	retval = -EPERM;
-	if (current->fs->root)
-		retval = kernel_execve(sub_info->path,
-				sub_info->argv, sub_info->envp);
+	retval = kernel_execve(sub_info->path, sub_info->argv, sub_info->envp);
 
 	/* Exec failed? */
 	sub_info->retval = retval;

-- 


  parent reply	other threads:[~2007-10-09 18:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-09 18:05 [patch 00/10] Use struct path in struct nameidata Jan Blunck
2007-10-09 18:05 ` [patch 01/10] Dont touch fs_struct in drivers Jan Blunck
2007-10-09 18:05 ` Jan Blunck [this message]
2007-10-09 18:05 ` [patch 03/10] Remove path_release_on_umount() Jan Blunck
2007-10-09 18:05 ` [patch 04/10] Move struct path into its own header Jan Blunck
2007-10-09 18:05 ` [patch 05/10] Embed a struct path into struct nameidata instead of nd->{dentry,mnt} Jan Blunck
2007-10-09 18:05 ` [patch 06/10] Introduce path_put() Jan Blunck
2007-10-09 18:05 ` [patch 07/10] Use path_put() in a few places instead of {mnt,d}put() Jan Blunck
2007-10-09 18:05 ` [patch 08/10] Introduce path_get() Jan Blunck
2007-10-09 18:05 ` [patch 09/10] Use struct path in fs_struct Jan Blunck
2007-10-09 18:05 ` [patch 10/10] Make set_fs_{root,pwd} take a struct path Jan Blunck
  -- strict thread matches above, loose matches on Subject: below --
2007-09-27 14:12 [patch 00/10] Use struct path in struct nameidata jblunck
2007-09-27 14:12 ` [patch 02/10] Dont touch fs_struct in usermodehelper jblunck
2007-09-27 17:46   ` Greg KH
2007-09-27 20:39     ` Christoph Hellwig
2007-09-27 21:36       ` Greg KH
2007-09-28 18:33   ` Christoph Hellwig

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=20071009180512.277617567@X40.localnet \
    --to=jblunck@suse.de \
    --cc=agruen@suse.de \
    --cc=akpm@osdl.org \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.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