Skip to content

Commit e8c954d

Browse files
isilenceaxboe
authored andcommitted
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 <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 2d280bc commit e8c954d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/io_uring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ static bool io_identity_cow(struct io_kiocb *req)
12841284
*/
12851285
io_init_identity(id);
12861286
if (creds)
1287-
req->work.identity->creds = creds;
1287+
id->creds = creds;
12881288

12891289
/* add one for this request */
12901290
refcount_inc(&id->count);

0 commit comments

Comments
 (0)