Commit 1a3aedbce416dfdbd5d5ac14a0edbcf21a62ee50

Authored by Eric Paris
1 parent 939a67fc4c

Audit: audit watch init should not be before fsnotify init

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

kernel/audit_watch.c
... ... @@ -584,5 +584,5 @@
584 584 }
585 585 return 0;
586 586 }
587   -subsys_initcall(audit_watch_init);
  587 +device_initcall(audit_watch_init);