[PATCH 2/2] security,selinux: get rid of security_delete_hooks()
James Morris
jmorris at namei.org
Wed Jan 8 18:47:47 UTC 2020
On Wed, 8 Jan 2020, Ondrej Mosnacek wrote:
> > > {
> > > const struct cred *cred = current_cred();
> > > struct superblock_security_struct *sbsec = sb->s_security;
> > > - struct dentry *root = sbsec->sb->s_root;
> > > struct selinux_mnt_opts *opts = mnt_opts;
> >
> > Seems like there are a bunch of unrelated cleanups mixed in here.
>
> These are not unrelated - we need to avoid dereferencing the security
> structs before checking selinux_disabled(), because they may be NULL
> or uninitialized when SELinux has been diabled.
Ok.
--
James Morris
<jmorris at namei.org>
More information about the Linux-security-module-archive
mailing list