Skip to content

Convert isec->lock into a spinlock fixing deadlock on GFS2

Alexander Grund stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6selinux: Minor cleanupssecurity/selinux/hooks.c security/selinux/selinuxfs.c+4 -30 replies
2/6proc: Pass file mode to proc_pid_make_inodefs/proc/base.c fs/proc/fd.c fs/proc/internal.h +2 more+14 -210 replies
3/6selinux: Clean up initialization of isec->sclasssecurity/selinux/hooks.c+4 -60 replies
4/6selinux: Convert isec->lock into a spinlocksecurity/selinux/hooks.c security/selinux/include/objsec.h+66 -400 replies
5/6selinux: fix error initialization in inode_doinit_with_dentry()security/selinux/hooks.c+16 -30 replies
6/6selinux: fix inode_doinit_with_dentry() LABEL_INVALID error handlingsecurity/selinux/hooks.c+13 -180 replies

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchSven SchnelleOndrej Mosnacek
1/6
2/6
3/6
4/6
5/6
6/6T-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 4.9 0/6] Convert isec->lock into a spinlock fixing deadlock on GFS2

This patchset backports basically upstream commit 9287aed2
(selinux: Convert isec->lock into a spinlock). This
"fixes a deadlock between selinux and GFS2 when GFS2 invalidates a security label", see the original discussion at
https://lore.kernel.org/all/[email protected]/T/
It also contains the follow-up fixes to make this correct.

The first 3 commits (by Andreas) are valuable on their own too as they fix a documentation bug, avoid partially initialized structs and (slightly) improve performance while making the code cleaner.

Andreas Gruenbacher (4):
selinux: Minor cleanups
proc: Pass file mode to proc_pid_make_inode
selinux: Clean up initialization of isec->sclass
selinux: Convert isec->lock into a spinlock

Paul Moore (1):
selinux: fix inode_doinit_with_dentry() LABEL_INVALID error handling

Tianyue Ren (1):
selinux: fix error initialization in inode_doinit_with_dentry()

 fs/proc/base.c                    |  23 +++---
 fs/proc/fd.c                      |   6 +-
 fs/proc/internal.h                |   2 +-
 fs/proc/namespaces.c              |   3 +-
 security/selinux/hooks.c          | 123 +++++++++++++++++++-----------
 security/selinux/include/objsec.h |   5 +-
 security/selinux/selinuxfs.c      |   4 +-
 7 files changed, 96 insertions(+), 70 deletions(-)
Signature · 1 line
2.25.1