linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* what's going on with aa_destroy_aafs() call in apparmor_init()?
@ 2025-09-21  7:36 Al Viro
  2025-09-22 20:46 ` John Johansen
  0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2025-09-21  7:36 UTC (permalink / raw)
  To: John Johansen; +Cc: linux-fsdevel, linux-security-module

	Correct me if I'm wrong, but as far as I can tell apparmor_init()
ends up being called from security_init(), which is called before the call
of vfs_caches_init(), not to mention fs_initcall stuff.

	If that's the case, what is this doing there?
error:
        aa_destroy_aafs();
	AA_ERROR("Error creating AppArmor securityfs\n");
	return error;

aa_create_aafs() is called via fs_initcall; moreover, it will bail out
if called before apparmor_initialized has become true, so...

While we are at it, what will happen if apparmor_init() succeeds, but
aa_create_fs() fails afterwards?

If nothing else, aa_null_path will be left {NULL, NULL}, which will
immediately oops dentry_open() in aa_inherit_files()...

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-09-22 20:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-21  7:36 what's going on with aa_destroy_aafs() call in apparmor_init()? Al Viro
2025-09-22 20:46 ` John Johansen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).