Skip to content

Commit

Permalink
Audit: audit watch init should not be before fsnotify init
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Eric Paris <[email protected]>
Tested-by : Sachin Sant <[email protected]>
  • Loading branch information
eparis committed Jul 28, 2010
1 parent 939a67f commit 1a3aedb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/audit_watch.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,4 +584,4 @@ static int __init audit_watch_init(void)
}
return 0;
}
subsys_initcall(audit_watch_init);
device_initcall(audit_watch_init);

0 comments on commit 1a3aedb

Please sign in to comment.