On Wed, Jun 15, 2022 at 08:50:34AM +0200, Christoph Hellwig wrote: > On Wed, Jun 15, 2022 at 02:48:25PM +0800, Ming Lei wrote: > > q->elevator is referred in blk_mq_has_sqsched() without any protection, > > no .q_usage_counter is held, no queue srcu and rcu read lock is held, > > so potential use-after-free may be triggered. > > > > Fix the issue by adding one queue flag for checking if the elevator > > uses single queue style dispatch. Meantime the elevator feature flag > > of ELEVATOR_F_MQ_AWARE isn't needed any more. > > We still need to clear the flag when switching elevators. Indeed, or it can be cleared in initializing none and kyber. Thanks, Ming