diff options
author | Jens Axboe <axboe@kernel.dk> | 2019-10-09 14:40:13 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-17 13:47:33 -0700 |
commit | 9392e3a7beef809bf244470ddffc4ef24c43c40f (patch) | |
tree | 94b70e90644de2babd67e0d7376740118c1aed0b | |
parent | 58cd9be912c3f8c2d29f3a8bb73badfbe739dfb6 (diff) |
io_uring: only flush workqueues on fileset removal
commit 8a99734081775c012a4a6c442fdef0379fe52bdf upstream.
We should not remove the workqueue, we just need to ensure that the
workqueues are synced. The workqueues are torn down on ctx removal.
Cc: stable@vger.kernel.org
Fixes: 6b06314c47e1 ("io_uring: add file set registration")
Reported-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/io_uring.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 06d048341fa4..30149652c379 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2566,7 +2566,8 @@ static void io_destruct_skb(struct sk_buff *skb) { struct io_ring_ctx *ctx = skb->sk->sk_user_data; - io_finish_async(ctx); + if (ctx->sqo_wq) + flush_workqueue(ctx->sqo_wq); unix_destruct_scm(skb); } |