diff --git a/fs/io_uring.c b/fs/io_uring.c
index 3d489cf319267f63c9d1972b2faf75bf4eb6495b..29f1417690d55a1768f4d4a4ea86f48f1cf94f99 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -8974,7 +8974,8 @@ out_fput:
 #ifdef CONFIG_PROC_FS
 static int io_uring_show_cred(int id, void *p, void *data)
 {
-	const struct cred *cred = p;
+	struct io_identity *iod = p;
+	const struct cred *cred = iod->creds;
 	struct seq_file *m = data;
 	struct user_namespace *uns = seq_user_ns(m);
 	struct group_info *gi;