Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 07416d29 authored by Jens Axboe's avatar Jens Axboe
Browse files

cfq-iosched: fix RCU race in the cfq io_context destructor handling


put_io_context() drops the RCU read lock before calling into cfq_dtor(),
however we need to hold off freeing there before grabbing and
dereferencing the first object on the list.

So extend the rcu_read_lock() scope to cover the calling of cfq_dtor(),
and optimize cfq_free_io_context() to use a new variant for
call_for_each_cic() that assumes the RCU read lock is already held.

Hit in the wild by Alexey Dobriyan <adobriyan@gmail.com>

Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent aa94b537
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment