summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2020-12-06 23:22:46 +0100
committerJens Axboe <axboe@kernel.dk>2020-12-07 16:43:44 +0100
commite8c954df234145c5765870382c2bc630a48beec9 (patch)
tree7d2aa221c44703939d97de9328729e3caeb7ae38 /fs
parentio_uring: fix recvmsg setup with compat buf-select (diff)
downloadlinux-e8c954df234145c5765870382c2bc630a48beec9.tar.xz
linux-e8c954df234145c5765870382c2bc630a48beec9.zip
io_uring: fix mis-seting personality's creds
After io_identity_cow() copies an work.identity it wants to copy creds to the new just allocated id, not the old one. Otherwise it's akin to req->work.identity->creds = req->work.identity->creds. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs')
-rw-r--r--fs/io_uring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index a2a7c65a77aa..908817cea4f5 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1284,7 +1284,7 @@ static bool io_identity_cow(struct io_kiocb *req)
*/
io_init_identity(id);
if (creds)
- req->work.identity->creds = creds;
+ id->creds = creds;
/* add one for this request */
refcount_inc(&id->count);