diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2013-01-12 13:27:34 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2013-01-12 13:27:46 +1030 |
commit | 1fb9341ac34825aa40354e74d9a2c69df7d2c304 (patch) | |
tree | ebb2b836673d722845cd0a17c836799d800ae810 /lib | |
parent | 0d21b0e3477395e7ff2acc269f15df6e6a8d356d (diff) | |
download | linux-exynos-1fb9341ac34825aa40354e74d9a2c69df7d2c304.tar.gz linux-exynos-1fb9341ac34825aa40354e74d9a2c69df7d2c304.tar.bz2 linux-exynos-1fb9341ac34825aa40354e74d9a2c69df7d2c304.zip |
module: put modules in list much earlier.
Prarit's excellent bug report:
> In recent Fedora releases (F17 & F18) some users have reported seeing
> messages similar to
>
> [ 15.478160] kvm: Could not allocate 304 bytes percpu data
> [ 15.478174] PERCPU: allocation failed, size=304 align=32, alloc from
> reserved chunk failed
>
> during system boot. In some cases, users have also reported seeing this
> message along with a failed load of other modules.
>
> What is happening is systemd is loading an instance of the kvm module for
> each cpu found (see commit e9bda3b). When the module load occurs the kernel
> currently allocates the modules percpu data area prior to checking to see
> if the module is already loaded or is in the process of being loaded. If
> the module is already loaded, or finishes load, the module loading code
> releases the current instance's module's percpu data.
Now we have a new state MODULE_STATE_UNFORMED, we can insert the
module into the list (and thus guarantee its uniqueness) before we
allocate the per-cpu region.
Reported-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Tested-by: Prarit Bhargava <prarit@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bug.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bug.c b/lib/bug.c index a28c1415357c..d0cdf14c651a 100644 --- a/lib/bug.c +++ b/lib/bug.c @@ -55,6 +55,7 @@ static inline unsigned long bug_addr(const struct bug_entry *bug) } #ifdef CONFIG_MODULES +/* Updates are protected by module mutex */ static LIST_HEAD(module_bug_list); static const struct bug_entry *module_find_bug(unsigned long bugaddr) |