mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 19:43:40 +02:00
io_uring-7.1-20260529
-----BEGIN PGP SIGNATURE----- iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmoZxb4QHGF4Ym9lQGtl cm5lbC5kawAKCRD301j7KXHgpgDQEADbTyZ2P1pOKJwr7Gt5HETXXuvsocb7Z+CY qfdfVgTz3aUcIg1ui+2QbpNU6l5zQKlp8IA7igjLHMhiif9nNzZTUPHayBrlhTo2 gS/RNOLtwGEv5oz+7i+2JAl+SyNRLQzK+UH0kmePIZp0bQPr1ciS13Ndb33Eus/K FmtfeRJEsT6fZ+Q+QooxiN5n5jRdcB/WKSX5cwoIOnKJxKCyms/C8hUsG8Tz+0L/ 2Ys8W06as3tE5eWjwpOXo5sb2d0zhr6tiqPUNpwEVbaBzLiBqI2wQW9gAy2ZXa1Z vgCSceKOtt1I9/tf0y3xOy/V6LgUe+fp8X5V4yNPiDOwDTVrTYDOfT0qeqWJpwF+ 4W+ZaIjHCNY2q/lbdeEuHYOOstvc5hShH4AJFQqbhUCXyB/qivO0rwQtZ75pGZRF RhYJ8VdBdC740OyAdHPyTTUxWHAHr3+9lA10DsEw2dMxeDDmqdNTUrnw5b4/OVFl jk2/cC1MmxtnPWPFK4NQGj2BMWpTqNfTykD7WQWOHUwvtCj7ZQHH6g4qfovuu2VR Jt0vQE2uAab440knpQZCbURkgRrlZLLNYImhtbgTUyN/Jsk7vrV5/bevFwGWsA4y CiwHsdztx62J2OsAbNBGw/a4qvMn7X3cLeylEeJiWyQxtkpb8JgdmxDjBGDavwLB H5rtGBToWg== =tYXi -----END PGP SIGNATURE----- Merge tag 'io_uring-7.1-20260529' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux Pull io_uring fix from Jens Axboe: "Just a single fix for a regression introduced in this cycle, where we should ensure the node is visible before the entry is added to the tctx list" * tag 'io_uring-7.1-20260529' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: io_uring/tctx: set ->io_uring before publishing the tctx node
This commit is contained in:
commit
80169db922
|
|
@ -139,12 +139,14 @@ static int io_tctx_install_node(struct io_ring_ctx *ctx,
|
|||
int __io_uring_add_tctx_node(struct io_ring_ctx *ctx)
|
||||
{
|
||||
struct io_uring_task *tctx = current->io_uring;
|
||||
bool new_tctx = false;
|
||||
int ret;
|
||||
|
||||
if (unlikely(!tctx)) {
|
||||
tctx = io_uring_alloc_task_context(current, ctx);
|
||||
if (IS_ERR(tctx))
|
||||
return PTR_ERR(tctx);
|
||||
new_tctx = true;
|
||||
|
||||
if (data_race(ctx->int_flags) & IO_RING_F_IOWQ_LIMITS_SET) {
|
||||
unsigned int limits[2];
|
||||
|
|
@ -168,13 +170,15 @@ int __io_uring_add_tctx_node(struct io_ring_ctx *ctx)
|
|||
if (tctx->io_wq)
|
||||
io_wq_set_exit_on_idle(tctx->io_wq, false);
|
||||
|
||||
ret = io_tctx_install_node(ctx, tctx);
|
||||
if (!ret) {
|
||||
if (new_tctx)
|
||||
current->io_uring = tctx;
|
||||
|
||||
ret = io_tctx_install_node(ctx, tctx);
|
||||
if (!ret)
|
||||
return 0;
|
||||
}
|
||||
if (!current->io_uring) {
|
||||
err_free:
|
||||
if (new_tctx) {
|
||||
current->io_uring = NULL;
|
||||
if (tctx->io_wq) {
|
||||
io_wq_exit_start(tctx->io_wq);
|
||||
io_wq_put_and_exit(tctx->io_wq);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user