]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
Audit: audit watch init should not be before fsnotify init
authorEric Paris <eparis@redhat.com>
Fri, 18 Dec 2009 01:12:06 +0000 (20:12 -0500)
committerEric Paris <eparis@redhat.com>
Wed, 28 Jul 2010 13:58:19 +0000 (09:58 -0400)
Audit watch init and fsnotify init both use subsys_initcall() but since the
audit watch code is linked in before the fsnotify code the audit watch code
would be using the fsnotify srcu struct before it was initialized.  This
patch fixes that problem by moving audit watch init to device_initcall() so
it happens after fsnotify is ready.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Eric Paris <eparis@redhat.com>
Tested-by : Sachin Sant <sachinp@in.ibm.com>

kernel/audit_watch.c

index c44de0c4fc474e0723e078826231225be2aeb2fd..f8543a41115b909d032e604c004528a84de78e76 100644 (file)
@@ -584,4 +584,4 @@ static int __init audit_watch_init(void)
        }
        return 0;
 }
-subsys_initcall(audit_watch_init);
+device_initcall(audit_watch_init);