KEYS/DNS: Fix ____call_usermodehelper() to not lose the session keyring
[linux-3.10.git] / security / keys / trusted.c
index 83fc92e..0c33e2e 100644 (file)
@@ -8,7 +8,7 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation, version 2 of the License.
  *
- * See Documentation/keys-trusted-encrypted.txt
+ * See Documentation/security/keys-trusted-encrypted.txt
  */
 
 #include <linux/uaccess.h>
@@ -1076,8 +1076,7 @@ static long trusted_read(const struct key *key, char __user *buffer,
        char *bufp;
        int i;
 
-       p = rcu_dereference_protected(key->payload.data,
-                       rwsem_is_locked(&((struct key *)key)->sem));
+       p = rcu_dereference_key(key);
        if (!p)
                return -EINVAL;
        if (!buffer || buflen <= 0)