mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 11:03:43 +02:00
io_uring-5.13-2021-05-22
-----BEGIN PGP SIGNATURE----- iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmCpPQcQHGF4Ym9lQGtl cm5lbC5kawAKCRD301j7KXHgptBfD/0XV2+UXT7GTq3zfAgeCRojxzjH8YSh/fu1 uSYA2fME0J7B2lpgxwHmDwgW/JkxkQ9oal+QxoNUJnmTF4CN3c7edQYxaA+QAnb/ XiEY6s5slpBtopJCXQqPlE6dUnn1yjc0wNIm3EjvmmMaFjb6MVfMZWqWn9AANNTd yiRtk8a7KQuYdBeQMPVQG4v1ue37VTL5B9D9tM3p03W2ngNhtWw2Yxy5k/ePseip HYhPm+SKcbpmSFS+KN/a4aBLHyW89FRnhBWZF50sBmdUD+HLgz09IyFdSqyo9s2f wb7h3u3FbzTk3JofcJhYfqoQXkwmYhHrwNGCMjhK/zy+qloCIOu8Nw4jkcH+VYwK Rf7cFu+CZDRgcIu4Op/W5CPHNPY680Rxd/yBKlG/n4aZ/zxuuOu08992Z5BSaxfw UpIFMOWMuDvbBRUk71R34ME0o1wNhWL75Rljh97dAMRZLez1h8CmGdktT9g4keuo 71Swq51AQk7fWXW0yQK2kIpbTjazfh6+AEvdF4c/Njss83K7PHCq00xeKI9PeNXN aQvPBpFifTeN1B1IENH5wEHO8F7e38eU45WHPwgNJUuSEpuBoXQGoLBlf6WXzNUS sIt6UjGDCFTZddIYwVfVISl7+DLBLCxYRYnw0Mx99x1shUpH+6q0HdpPgOxiKmoH ZgdG/q8rVg== =tipG -----END PGP SIGNATURE----- Merge tag 'io_uring-5.13-2021-05-22' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "One fix for a regression with poll in this merge window, and another just hardens the io-wq exit path a bit" * tag 'io_uring-5.13-2021-05-22' of git://git.kernel.dk/linux-block: io_uring: fortify tctx/io_wq cleanup io_uring: don't modify req->poll for rw
This commit is contained in:
commit
b9231dfbcb
|
|
@ -5019,10 +5019,10 @@ static void __io_queue_proc(struct io_poll_iocb *poll, struct io_poll_table *pt,
|
||||||
* Can't handle multishot for double wait for now, turn it
|
* Can't handle multishot for double wait for now, turn it
|
||||||
* into one-shot mode.
|
* into one-shot mode.
|
||||||
*/
|
*/
|
||||||
if (!(req->poll.events & EPOLLONESHOT))
|
if (!(poll_one->events & EPOLLONESHOT))
|
||||||
req->poll.events |= EPOLLONESHOT;
|
poll_one->events |= EPOLLONESHOT;
|
||||||
/* double add on the same waitqueue head, ignore */
|
/* double add on the same waitqueue head, ignore */
|
||||||
if (poll->head == head)
|
if (poll_one->head == head)
|
||||||
return;
|
return;
|
||||||
poll = kmalloc(sizeof(*poll), GFP_ATOMIC);
|
poll = kmalloc(sizeof(*poll), GFP_ATOMIC);
|
||||||
if (!poll) {
|
if (!poll) {
|
||||||
|
|
@ -9035,15 +9035,15 @@ static void io_uring_del_task_file(unsigned long index)
|
||||||
|
|
||||||
static void io_uring_clean_tctx(struct io_uring_task *tctx)
|
static void io_uring_clean_tctx(struct io_uring_task *tctx)
|
||||||
{
|
{
|
||||||
|
struct io_wq *wq = tctx->io_wq;
|
||||||
struct io_tctx_node *node;
|
struct io_tctx_node *node;
|
||||||
unsigned long index;
|
unsigned long index;
|
||||||
|
|
||||||
|
tctx->io_wq = NULL;
|
||||||
xa_for_each(&tctx->xa, index, node)
|
xa_for_each(&tctx->xa, index, node)
|
||||||
io_uring_del_task_file(index);
|
io_uring_del_task_file(index);
|
||||||
if (tctx->io_wq) {
|
if (wq)
|
||||||
io_wq_put_and_exit(tctx->io_wq);
|
io_wq_put_and_exit(wq);
|
||||||
tctx->io_wq = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static s64 tctx_inflight(struct io_uring_task *tctx, bool tracked)
|
static s64 tctx_inflight(struct io_uring_task *tctx, bool tracked)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user