mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 07:03:03 +02:00
io_uring-6.13-20241228
-----BEGIN PGP SIGNATURE----- iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmdwJ2QQHGF4Ym9lQGtl cm5lbC5kawAKCRD301j7KXHgpjCzD/49vb6zpF1lhY9i5HTzAPTX2pmGGhKqsZWz a6hMCE2PGVmKfsEyypkJgcqj10en8e9OF/n8T/Bnh2VKOXKnUpDac5tLzLgDivvG a6GbwzIbX18VLL07XyeRDz8iN+Bac9N1B9xFcWdYweRuRc4vDPNaxpDZjxk4KnfU CloCItMSz3KK6CBQXD6UDsRvlgdvH0lEKQi9VzxGs7Zcfv+vv2n+WjN2dDJDoXFd UXpMm4JfeLZPhD+OHqic7jRvIx7ZoYQrtaBTJdQOzpyyrSCogmfDAD8QXVFGrf/i SWQsNJlLKCEcgRRZuI8NaXTM51UtA4J0Ikvi8/XOaJAgAgeBi+e03AC5X1uksali BwFpXMCNICYhYXsqV3Egj1fdAwpgwnfeZ24dt5DZxe4DU3zzaz3zq1qydTS+ZjSx +TWa7HcwELOghG8e7qhYBB63T4PvyX5JQlV+CPLEGarsmB1gsnWtTmVedm5h2+g6 8RVi1NQy/BHTtQCsQtVY2pYfugvU+HrwU3C8kEo1/q5M5LVJJOWNfgK1DWWFjKs/ PrgFbTnLuKmaCwwzdc92O2RLrdaJ0Lz5bTTqdHTXEPShsGj0ZvjnA13wDOPlAFY+ FyQTRXKOE8IZDeMmi06aKSjHWdrYDmg1DTWIftTUaXrWfwAbEFe5z6xvcSdfh+hK N9uDor8wbw== =UkND -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
d19a3ee573
|
|
@ -405,6 +405,7 @@ void io_sqpoll_wait_sq(struct io_ring_ctx *ctx)
|
|||
__cold int io_sq_offload_create(struct io_ring_ctx *ctx,
|
||||
struct io_uring_params *p)
|
||||
{
|
||||
struct task_struct *task_to_put = NULL;
|
||||
int ret;
|
||||
|
||||
/* Retain compatibility with failing for an invalid attach attempt */
|
||||
|
|
@ -480,6 +481,7 @@ __cold int io_sq_offload_create(struct io_ring_ctx *ctx,
|
|||
}
|
||||
|
||||
sqd->thread = tsk;
|
||||
task_to_put = get_task_struct(tsk);
|
||||
ret = io_uring_alloc_task_context(tsk, ctx);
|
||||
wake_up_new_task(tsk);
|
||||
if (ret)
|
||||
|
|
@ -490,11 +492,15 @@ __cold int io_sq_offload_create(struct io_ring_ctx *ctx,
|
|||
goto err;
|
||||
}
|
||||
|
||||
if (task_to_put)
|
||||
put_task_struct(task_to_put);
|
||||
return 0;
|
||||
err_sqpoll:
|
||||
complete(&ctx->sq_data->exited);
|
||||
err:
|
||||
io_sq_thread_finish(ctx);
|
||||
if (task_to_put)
|
||||
put_task_struct(task_to_put);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user