Message ID | 20230405000827.2250965-6-cascardo@canonical.com |
---|---|
State | New |
Headers | show |
Series | CVE-2023-0468 | expand |
diff --git a/fs/io_uring.c b/fs/io_uring.c index 14a12f8ccd97..13d7c625513f 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -5601,7 +5601,8 @@ static int io_poll_check_events(struct io_kiocb *req, bool locked) * Release all references, retry if someone tried to restart * task_work while we were executing it. */ - } while (atomic_sub_return(v & IO_POLL_REF_MASK, &req->poll_refs)); + } while (atomic_sub_return(v & IO_POLL_REF_MASK, &req->poll_refs) & + IO_POLL_REF_MASK); return 1; }