diff options
author | Kent Overstreet <[email protected]> | 2019-09-03 21:25:45 +0800 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2019-09-03 08:08:31 -0600 |
commit | a22a9602b88fabf10847f238ff81fde5f906fef7 (patch) | |
tree | cdda0a4f2abcfaf8627fec61a16de34e19a2223b /lib/test_overflow.c | |
parent | d66c9920c0cf984cf99cab5036fd5f3a1b7fba46 (diff) |
closures: fix a race on wakeup from closure_sync
The race was when a thread using closure_sync() notices cl->s->done == 1
before the thread calling closure_put() calls wake_up_process(). Then,
it's possible for that thread to return and exit just before
wake_up_process() is called - so we're trying to wake up a process that
no longer exists.
rcu_read_lock() is sufficient to protect against this, as there's an rcu
barrier somewhere in the process teardown path.
Signed-off-by: Kent Overstreet <[email protected]>
Acked-by: Coly Li <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions