diff options
| author | Jann Horn <[email protected]> | 2018-06-29 00:39:54 +0000 |
|---|---|---|
| committer | Paul Moore <[email protected]> | 2018-06-29 00:39:54 +0000 |
| commit | 0da74120c5341389b97c4ee27487a97224999ee1 (patch) | |
| tree | cef6a54c640bb2ddfcc927d8d869b6e390057102 /drivers/gpu/drm/amd/amdgpu/amdgpu_test.c | |
| parent | audit: normalize MAC_POLICY_LOAD record (diff) | |
| download | kernel-0da74120c5341389b97c4ee27487a97224999ee1.tar.gz kernel-0da74120c5341389b97c4ee27487a97224999ee1.zip | |
selinux: move user accesses in selinuxfs out of locked regions
If a user is accessing a file in selinuxfs with a pointer to a userspace
buffer that is backed by e.g. a userfaultfd, the userspace access can
stall indefinitely, which can block fsi->mutex if it is held.
For sel_read_policy(), remove the locking, since this method doesn't seem
to access anything that requires locking.
For sel_read_bool(), move the user access below the locked region.
For sel_write_bool() and sel_commit_bools_write(), move the user access
up above the locked region.
Cc: [email protected]
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Jann Horn <[email protected]>
Acked-by: Stephen Smalley <[email protected]>
[PM: removed an unused variable in sel_read_policy()]
Signed-off-by: Paul Moore <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_test.c')
0 files changed, 0 insertions, 0 deletions
