summaryrefslogtreecommitdiff
path: root/security/selinux/ima.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2022-02-28 14:57:14 +1000
committerDave Airlie <airlied@redhat.com>2022-02-28 14:57:14 +1000
commit6c64ae228f0826859c56711ce133aff037d6205f (patch)
tree831f7b3c5a4eb3a5ab932edb6ca27780a316e714 /security/selinux/ima.c
parent6d09e5cbc9633fa4df88544952614e9137d274af (diff)
parent7e57714cd0ad2d5bb90e50b5096a0e671dec1ef3 (diff)
Backmerge tag 'v5.17-rc6' into drm-next
This backmerges v5.17-rc6 so I can merge some amdgpu and some tegra changes on top. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'security/selinux/ima.c')
-rw-r--r--security/selinux/ima.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/selinux/ima.c b/security/selinux/ima.c
index 727c4e43219d..ff7aea6b3774 100644
--- a/security/selinux/ima.c
+++ b/security/selinux/ima.c
@@ -77,7 +77,7 @@ void selinux_ima_measure_state_locked(struct selinux_state *state)
size_t policy_len;
int rc = 0;
- WARN_ON(!mutex_is_locked(&state->policy_mutex));
+ lockdep_assert_held(&state->policy_mutex);
state_str = selinux_ima_collect_state(state);
if (!state_str) {
@@ -117,7 +117,7 @@ void selinux_ima_measure_state_locked(struct selinux_state *state)
*/
void selinux_ima_measure_state(struct selinux_state *state)
{
- WARN_ON(mutex_is_locked(&state->policy_mutex));
+ lockdep_assert_not_held(&state->policy_mutex);
mutex_lock(&state->policy_mutex);
selinux_ima_measure_state_locked(state);