summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-09-03 16:25:45 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-05 14:09:54 +0300
commitf0956418d9975fdc83343c12639edcb55310d27b (patch)
tree80d9196d56e6595c648e007f68790d665991c96b /drivers/hwmon
parent9fcfdff61f748e8ab151f9c62a208610e06505f4 (diff)
downloadlinux-f0956418d9975fdc83343c12639edcb55310d27b.tar.xz
closures: fix a race on wakeup from closure_sync
[ Upstream commit a22a9602b88fabf10847f238ff81fde5f906fef7 ] 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 <kent.overstreet@gmail.com> Acked-by: Coly Li <colyli@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/hwmon')
0 files changed, 0 insertions, 0 deletions