Merge tag 'keys-request-20190626' of git://git.kernel.org/pub/scm/linux/kernel/git...
[platform/kernel/linux-rpi.git] / security / keys / proc.c
index 4e3266a..7f15550 100644 (file)
@@ -175,7 +175,9 @@ static int proc_keys_show(struct seq_file *m, void *v)
         * skip if the key does not indicate the possessor can view it
         */
        if (key->perm & KEY_POS_VIEW) {
-               skey_ref = search_my_process_keyrings(&ctx);
+               rcu_read_lock();
+               skey_ref = search_cred_keyrings_rcu(&ctx);
+               rcu_read_unlock();
                if (!IS_ERR(skey_ref)) {
                        key_ref_put(skey_ref);
                        key_ref = make_key_ref(key, 1);