diff options
author | 2021-03-14 20:57:09 +0000 | |
---|---|---|
committer | 2021-03-15 09:32:24 -0600 | |
commit | 180f829fe4026bd192447d261e712b6cb84f6202 (patch) | |
tree | 0e3dd92a7f5d7ae9951ea247c8320be12e9d7c5e /tools/perf/scripts/python/export-to-postgresql.py | |
parent | io_uring: fix ->flags races by linked timeouts (diff) | |
download | wireguard-linux-180f829fe4026bd192447d261e712b6cb84f6202.tar.xz wireguard-linux-180f829fe4026bd192447d261e712b6cb84f6202.zip |
io_uring: fix complete_post use ctx after free
If io_req_complete_post() put not a final ref, we can't rely on the
request's ctx ref, and so ctx may potentially be freed while
complete_post() is in io_cqring_ev_posted()/etc.
In that case get an additional ctx reference, and put it in the end, so
protecting following io_cqring_ev_posted(). And also prolong ctx
lifetime until spin_unlock happens, as we do with mutexes, so added
percpu_ref_get() doesn't race with ctx free.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions