From: Jens Axboe <[email protected]>
To: io-uring <[email protected]>
Subject: [PATCH] io-wq: ensure work->task_pid is cleared on init
Date: Tue, 25 Feb 2020 11:55:11 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
We use ->task_pid for exit cancellation, but we need to ensure it's
cleared to zero for io_req_work_grab_env() to do the right thing.
Fixes: 36282881a795 ("io-wq: add io_wq_cancel_pid() to cancel based on a specific pid")
Signed-off-by: Jens Axboe <[email protected]>
---
diff --git a/fs/io-wq.h b/fs/io-wq.h
index ccc7d84af57d..9e9419c08bc1 100644
--- a/fs/io-wq.h
+++ b/fs/io-wq.h
@@ -88,6 +88,7 @@ struct io_wq_work {
(work)->creds = NULL; \
(work)->fs = NULL; \
(work)->flags = 0; \
+ (work)->task_pid = 0; \
} while (0) \
typedef void (get_work_fn)(struct io_wq_work *);
--
Jens Axboe
next reply other threads:[~2020-02-25 18:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-25 18:55 Jens Axboe [this message]
2020-02-25 19:38 ` [PATCH] io-wq: ensure work->task_pid is cleared on init Bart Van Assche
2020-02-25 19:56 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox