[patch 02/10] 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: Andreas Gruenbacher <[EMAIL PROTECTED]> Signed-off-by: Jan Blunck <[EMAIL PROTECTED]> Acked-by: Christoph Hellwig <[EMAIL PROTECTED]> Acked-by: Greg KH <[EMAIL PROTECTED]> --- 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; -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[patch 02/10] 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: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: Jan Blunck [EMAIL PROTECTED] Acked-by: Christoph Hellwig [EMAIL PROTECTED] Acked-by: Greg KH [EMAIL PROTECTED] --- 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; -- - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 02/10] Dont touch fs_struct in usermodehelper
On Thu, Sep 27, 2007 at 04:12:02PM +0200, [EMAIL PROTECTED] wrote: > This test seems to be unnecessary since we always have rootfs mounted before > calling a usermodehelper. Ok. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 02/10] Dont touch fs_struct in usermodehelper
On Thu, Sep 27, 2007 at 04:12:02PM +0200, [EMAIL PROTECTED] wrote: This test seems to be unnecessary since we always have rootfs mounted before calling a usermodehelper. Ok. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 02/10] Dont touch fs_struct in usermodehelper
On Thu, Sep 27, 2007 at 10:39:22PM +0200, Christoph Hellwig wrote: > On Thu, Sep 27, 2007 at 10:46:04AM -0700, Greg KH wrote: > > On Thu, Sep 27, 2007 at 04:12:02PM +0200, [EMAIL PROTECTED] wrote: > > > This test seems to be unnecessary since we always have rootfs mounted > > > before > > > calling a usermodehelper. > > > > Are you sure this is true? I thought we called the usermode helper for > > hotplug _very_ early in the boot sequence when the device tree starts to > > get populated. > > rootfs is mounted by init_mount_tree, and curret->fs is set up for init > there aswell. This is called by mnt_init, which is called by > vfs_caches_init, which is called by start_kernel far before we go to > rest_init which finally creates a thread to call kernel_init which then > calls do_basic_setup which calls do_initcalls to initialize drivers and > afterwards runs the initrd/initramfs. > > While the actual function names in main.c changed quite a bit we've > initialized the initial namespace very early on since the 2.5 days. Ah, ok, great, thanks for correcting me. I have no objection to this patch then. thanks, greg k-h - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 02/10] Dont touch fs_struct in usermodehelper
On Thu, Sep 27, 2007 at 10:46:04AM -0700, Greg KH wrote: > On Thu, Sep 27, 2007 at 04:12:02PM +0200, [EMAIL PROTECTED] wrote: > > This test seems to be unnecessary since we always have rootfs mounted before > > calling a usermodehelper. > > Are you sure this is true? I thought we called the usermode helper for > hotplug _very_ early in the boot sequence when the device tree starts to > get populated. rootfs is mounted by init_mount_tree, and curret->fs is set up for init there aswell. This is called by mnt_init, which is called by vfs_caches_init, which is called by start_kernel far before we go to rest_init which finally creates a thread to call kernel_init which then calls do_basic_setup which calls do_initcalls to initialize drivers and afterwards runs the initrd/initramfs. While the actual function names in main.c changed quite a bit we've initialized the initial namespace very early on since the 2.5 days. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 02/10] Dont touch fs_struct in usermodehelper
On Thu, Sep 27, 2007 at 04:12:02PM +0200, [EMAIL PROTECTED] wrote: > This test seems to be unnecessary since we always have rootfs mounted before > calling a usermodehelper. Are you sure this is true? I thought we called the usermode helper for hotplug _very_ early in the boot sequence when the device tree starts to get populated. But things could have changed from the 2.5 days when this was first added, if so, nevermind me :) thanks, greg k-h - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[patch 02/10] 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: Andreas Gruenbacher <[EMAIL PROTECTED]> Signed-off-by: Jan Blunck <[EMAIL PROTECTED]> --- 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; -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[patch 02/10] 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: Andreas Gruenbacher [EMAIL PROTECTED] Signed-off-by: Jan Blunck [EMAIL PROTECTED] --- 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; -- - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 02/10] Dont touch fs_struct in usermodehelper
On Thu, Sep 27, 2007 at 04:12:02PM +0200, [EMAIL PROTECTED] wrote: This test seems to be unnecessary since we always have rootfs mounted before calling a usermodehelper. Are you sure this is true? I thought we called the usermode helper for hotplug _very_ early in the boot sequence when the device tree starts to get populated. But things could have changed from the 2.5 days when this was first added, if so, nevermind me :) thanks, greg k-h - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 02/10] Dont touch fs_struct in usermodehelper
On Thu, Sep 27, 2007 at 10:46:04AM -0700, Greg KH wrote: On Thu, Sep 27, 2007 at 04:12:02PM +0200, [EMAIL PROTECTED] wrote: This test seems to be unnecessary since we always have rootfs mounted before calling a usermodehelper. Are you sure this is true? I thought we called the usermode helper for hotplug _very_ early in the boot sequence when the device tree starts to get populated. rootfs is mounted by init_mount_tree, and curret-fs is set up for init there aswell. This is called by mnt_init, which is called by vfs_caches_init, which is called by start_kernel far before we go to rest_init which finally creates a thread to call kernel_init which then calls do_basic_setup which calls do_initcalls to initialize drivers and afterwards runs the initrd/initramfs. While the actual function names in main.c changed quite a bit we've initialized the initial namespace very early on since the 2.5 days. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [patch 02/10] Dont touch fs_struct in usermodehelper
On Thu, Sep 27, 2007 at 10:39:22PM +0200, Christoph Hellwig wrote: On Thu, Sep 27, 2007 at 10:46:04AM -0700, Greg KH wrote: On Thu, Sep 27, 2007 at 04:12:02PM +0200, [EMAIL PROTECTED] wrote: This test seems to be unnecessary since we always have rootfs mounted before calling a usermodehelper. Are you sure this is true? I thought we called the usermode helper for hotplug _very_ early in the boot sequence when the device tree starts to get populated. rootfs is mounted by init_mount_tree, and curret-fs is set up for init there aswell. This is called by mnt_init, which is called by vfs_caches_init, which is called by start_kernel far before we go to rest_init which finally creates a thread to call kernel_init which then calls do_basic_setup which calls do_initcalls to initialize drivers and afterwards runs the initrd/initramfs. While the actual function names in main.c changed quite a bit we've initialized the initial namespace very early on since the 2.5 days. Ah, ok, great, thanks for correcting me. I have no objection to this patch then. thanks, greg k-h - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/