aboutsummaryrefslogtreecommitdiffstats
path: root/security/keys/trusted.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/keys/trusted.c')
-rw-r--r--security/keys/trusted.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/security/keys/trusted.c b/security/keys/trusted.c
index 83fc92e297cd..c99b9368368c 100644
--- a/security/keys/trusted.c
+++ b/security/keys/trusted.c
@@ -1076,8 +1076,7 @@ static long trusted_read(const struct key *key, char __user *buffer,
1076 char *bufp; 1076 char *bufp;
1077 int i; 1077 int i;
1078 1078
1079 p = rcu_dereference_protected(key->payload.data, 1079 p = rcu_dereference_key(key);
1080 rwsem_is_locked(&((struct key *)key)->sem));
1081 if (!p) 1080 if (!p)
1082 return -EINVAL; 1081 return -EINVAL;
1083 if (!buffer || buflen <= 0) 1082 if (!buffer || buflen <= 0)