Bläddra i källkod

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>
Eric Paris 15 år sedan
förälder
incheckning
1a3aedbce4
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      kernel/audit_watch.c

+ 1 - 1
kernel/audit_watch.c

@@ -584,4 +584,4 @@ static int __init audit_watch_init(void)
 	}
 	}
 	return 0;
 	return 0;
 }
 }
-subsys_initcall(audit_watch_init);
+device_initcall(audit_watch_init);