Skip to content

Commit 1a3aedb

Browse files
committed
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>
1 parent 939a67f commit 1a3aedb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/audit_watch.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,4 +584,4 @@ static int __init audit_watch_init(void)
584584
}
585585
return 0;
586586
}
587-
subsys_initcall(audit_watch_init);
587+
device_initcall(audit_watch_init);

0 commit comments

Comments
 (0)