Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'io_uring-6.13-20241228' of git://git.kernel.dk/linux

Pull io_uring fix from Jens Axboe:
"Just a single fix for a theoretical issue with SQPOLL setup"

* tag 'io_uring-6.13-20241228' of git://git.kernel.dk/linux:
io_uring/sqpoll: fix sqpoll error handling races

+6
+6
io_uring/sqpoll.c
··· 405 405 __cold int io_sq_offload_create(struct io_ring_ctx *ctx, 406 406 struct io_uring_params *p) 407 407 { 408 + struct task_struct *task_to_put = NULL; 408 409 int ret; 409 410 410 411 /* Retain compatibility with failing for an invalid attach attempt */ ··· 481 480 } 482 481 483 482 sqd->thread = tsk; 483 + task_to_put = get_task_struct(tsk); 484 484 ret = io_uring_alloc_task_context(tsk, ctx); 485 485 wake_up_new_task(tsk); 486 486 if (ret) ··· 492 490 goto err; 493 491 } 494 492 493 + if (task_to_put) 494 + put_task_struct(task_to_put); 495 495 return 0; 496 496 err_sqpoll: 497 497 complete(&ctx->sq_data->exited); 498 498 err: 499 499 io_sq_thread_finish(ctx); 500 + if (task_to_put) 501 + put_task_struct(task_to_put); 500 502 return ret; 501 503 } 502 504