aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorLance Roy <ldr709@gmail.com>2018-10-02 22:39:01 -0700
committerJohn Johansen <john.johansen@canonical.com>2018-10-03 06:29:22 -0700
commit0fb871cc42537465e322f727bec6abfd375faa83 (patch)
treeb3d3bab8c5d544e7deae540a70685b49b9545ff0 /security
parentab9f2115081ab7ba63b77a759e0f3eb5d6463d7f (diff)
downloadlinux-stericsson-0fb871cc42537465e322f727bec6abfd375faa83.tar.gz
apparmor: Replace spin_is_locked() with lockdep
lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy <ldr709@gmail.com> Cc: John Johansen <john.johansen@canonical.com> Cc: James Morris <jmorris@namei.org> Cc: "Serge E. Hallyn" <serge@hallyn.com> Cc: <linux-security-module@vger.kernel.org> Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security')
-rw-r--r--security/apparmor/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/file.c b/security/apparmor/file.c
index 4285943f7260..d0afed9ebd0e 100644
--- a/security/apparmor/file.c
+++ b/security/apparmor/file.c
@@ -496,7 +496,7 @@ static void update_file_ctx(struct aa_file_ctx *fctx, struct aa_label *label,
/* update caching of label on file_ctx */
spin_lock(&fctx->lock);
old = rcu_dereference_protected(fctx->label,
- spin_is_locked(&fctx->lock));
+ lockdep_is_held(&fctx->lock));
l = aa_label_merge(old, label, GFP_ATOMIC);
if (l) {
if (l != old) {