FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 01-10-2011, 05:06 PM
Andy Whitcroft
 
Default UBUNTU: SAUCE: ensure root is ready before running usermodehelpers in it

Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
include/linux/init.h | 2 --
include/linux/kmod.h | 4 ++++
init/initramfs.c | 6 ++++++
init/main.c | 2 +-
4 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/include/linux/init.h b/include/linux/init.h
index f3fbb95..f37d7c6 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -216,8 +216,6 @@ extern int initcall_debug;
static initcall_t __initcall_##fn
__used __section(.security_initcall.init) = fn

-extern struct list_head populate_rootfs_domain;
-
struct obs_kernel_param {
const char *str;
int (*setup_func)(char *);
diff --git a/include/linux/kmod.h b/include/linux/kmod.h
index 6efd7a7..989fa3b 100644
--- a/include/linux/kmod.h
+++ b/include/linux/kmod.h
@@ -83,6 +83,8 @@ int call_usermodehelper_exec(struct subprocess_info *info, enum umh_wait wait);
to call call_usermodehelper_exec */
void call_usermodehelper_freeinfo(struct subprocess_info *info);

+extern void populate_rootfs_wait(void);
+
static inline int
call_usermodehelper_fns(char *path, char **argv, char **envp,
enum umh_wait wait,
@@ -92,6 +94,8 @@ call_usermodehelper_fns(char *path, char **argv, char **envp,
struct subprocess_info *info;
gfp_t gfp_mask = (wait == UMH_NO_WAIT) ? GFP_ATOMIC : GFP_KERNEL;

+ populate_rootfs_wait();
+
info = call_usermodehelper_setup(path, argv, envp, gfp_mask);

if (info == NULL)
diff --git a/init/initramfs.c b/init/initramfs.c
index 8fed7ea..e7a4ef0 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -571,6 +571,12 @@ static void __init clean_rootfs(void)

LIST_HEAD(populate_rootfs_domain);

+void populate_rootfs_wait(void)
+{
+ async_synchronize_full_domain(&populate_rootfs_dom ain);
+}
+EXPORT_SYMBOL(populate_rootfs_wait);
+
static void __init async_populate_rootfs(void)
{
char *err = unpack_to_rootfs(__initramfs_start,
diff --git a/init/main.c b/init/main.c
index 3fe1a78..605735c 100644
--- a/init/main.c
+++ b/init/main.c
@@ -930,7 +930,7 @@ static int __init kernel_init(void * unused)
* We need to ensure that the filesystem is ready by this point, wait for
* async_populate_rootfs to complete.
*/
- async_synchronize_full_domain(&populate_rootfs_dom ain);
+ populate_rootfs_wait();

/*
* check if there is an early userspace init. If yes, let it do all
--
1.7.2.3


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 01-10-2011, 05:47 PM
Stefan Bader
 
Default UBUNTU: SAUCE: ensure root is ready before running usermodehelpers in it

The contents seem to be reasonable. Only I probably would like a bit more
verbosity of explanation in the commit message. It reads a bit like only having
the sob in...

Otherwise
Acked-by: Stefan Bader <stefan.bader@canonical.com>

On 01/10/2011 12:06 PM, Andy Whitcroft wrote:
> Signed-off-by: Andy Whitcroft <apw@canonical.com>
> ---
> include/linux/init.h | 2 --
> include/linux/kmod.h | 4 ++++
> init/initramfs.c | 6 ++++++
> init/main.c | 2 +-
> 4 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/init.h b/include/linux/init.h
> index f3fbb95..f37d7c6 100644
> --- a/include/linux/init.h
> +++ b/include/linux/init.h
> @@ -216,8 +216,6 @@ extern int initcall_debug;
> static initcall_t __initcall_##fn
> __used __section(.security_initcall.init) = fn
>
> -extern struct list_head populate_rootfs_domain;
> -
> struct obs_kernel_param {
> const char *str;
> int (*setup_func)(char *);
> diff --git a/include/linux/kmod.h b/include/linux/kmod.h
> index 6efd7a7..989fa3b 100644
> --- a/include/linux/kmod.h
> +++ b/include/linux/kmod.h
> @@ -83,6 +83,8 @@ int call_usermodehelper_exec(struct subprocess_info *info, enum umh_wait wait);
> to call call_usermodehelper_exec */
> void call_usermodehelper_freeinfo(struct subprocess_info *info);
>
> +extern void populate_rootfs_wait(void);
> +
> static inline int
> call_usermodehelper_fns(char *path, char **argv, char **envp,
> enum umh_wait wait,
> @@ -92,6 +94,8 @@ call_usermodehelper_fns(char *path, char **argv, char **envp,
> struct subprocess_info *info;
> gfp_t gfp_mask = (wait == UMH_NO_WAIT) ? GFP_ATOMIC : GFP_KERNEL;
>
> + populate_rootfs_wait();
> +
> info = call_usermodehelper_setup(path, argv, envp, gfp_mask);
>
> if (info == NULL)
> diff --git a/init/initramfs.c b/init/initramfs.c
> index 8fed7ea..e7a4ef0 100644
> --- a/init/initramfs.c
> +++ b/init/initramfs.c
> @@ -571,6 +571,12 @@ static void __init clean_rootfs(void)
>
> LIST_HEAD(populate_rootfs_domain);
>
> +void populate_rootfs_wait(void)
> +{
> + async_synchronize_full_domain(&populate_rootfs_dom ain);
> +}
> +EXPORT_SYMBOL(populate_rootfs_wait);
> +
> static void __init async_populate_rootfs(void)
> {
> char *err = unpack_to_rootfs(__initramfs_start,
> diff --git a/init/main.c b/init/main.c
> index 3fe1a78..605735c 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -930,7 +930,7 @@ static int __init kernel_init(void * unused)
> * We need to ensure that the filesystem is ready by this point, wait for
> * async_populate_rootfs to complete.
> */
> - async_synchronize_full_domain(&populate_rootfs_dom ain);
> + populate_rootfs_wait();
>
> /*
> * check if there is an early userspace init. If yes, let it do all


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 10:35 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org