Merge tag 'fixes-v5.17-lsm-ceph-null' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 29 Jan 2022 06:52:27 +0000 (08:52 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 29 Jan 2022 06:52:27 +0000 (08:52 +0200)
Pull security sybsystem fix from James Morris:
 "Fix NULL pointer crash in LSM via Ceph, from Vivek Goyal"

* tag 'fixes-v5.17-lsm-ceph-null' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  security, lsm: dentry_init_security() Handle multi LSM registration

1  2 
include/linux/lsm_hook_defs.h
security/security.c

@@@ -78,9 -78,11 +78,9 @@@ LSM_HOOK(int, 0, sb_set_mnt_opts, struc
  LSM_HOOK(int, 0, sb_clone_mnt_opts, const struct super_block *oldsb,
         struct super_block *newsb, unsigned long kern_flags,
         unsigned long *set_kern_flags)
 -LSM_HOOK(int, 0, sb_add_mnt_opt, const char *option, const char *val,
 -       int len, void **mnt_opts)
  LSM_HOOK(int, 0, move_mount, const struct path *from_path,
         const struct path *to_path)
- LSM_HOOK(int, 0, dentry_init_security, struct dentry *dentry,
+ LSM_HOOK(int, -EOPNOTSUPP, dentry_init_security, struct dentry *dentry,
         int mode, const struct qstr *name, const char **xattr_name,
         void **ctx, u32 *ctxlen)
  LSM_HOOK(int, 0, dentry_create_files_as, struct dentry *dentry, int mode,
Simple merge