Commit 1a6dbfc0 authored by Arjan van de Ven's avatar Arjan van de Ven Committed by Linus Torvalds

[PATCH] Fix fs/locks.c init order

The patch below fixes an interesting oddity we're seeing with fedora core
development (where we recently started using udev heavily); basically right
now filelock_init() is a module_init(), eg runs late.  However that breaks
down because there are earlier /sbin/hotplug callouts, which with udev, do
locking operations.  When that happens the kernel oopses because the slabs
for file locks aren't initialized yet.

Solution: initialize this way early.  It's only a kmem_cache_create after
all, so can happen early.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 78425d0d
...@@ -2063,4 +2063,4 @@ static int __init filelock_init(void) ...@@ -2063,4 +2063,4 @@ static int __init filelock_init(void)
return 0; return 0;
} }
module_init(filelock_init) core_initcall(filelock_init);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment