Re: 回复: Re: 回复: Re: [PATCH v1] blo ck/mq-deadline: hold elevator_lock in debugfs next_rq show

Bart Van Assche <[email protected]>
Newsgroups org.kernel.vger.linux-block,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On 7/22/26 7:37 PM, 刘喜鑫 wrote:
> That approach did not take effect, so I switched to the current patch.
> 
> I have verified the current patch, and the KASAN crash is gone with it.

The following is missing from your patch:
- An explanation why q->elevator_lock is locked instead of dd->lock. I
   think that you are misunderstanding the purpose of these locks.
- An explanation why locking q->elevator_lock from inside a debugfs
   attribute neither triggers lock inversion nor a deadlock.
- An explanation why the dd and per_prio assignments happen with the
   lock held. This seems unnecessary to me because neither
    e->elevator_data nor the address of dd->per_prio[] are modified while
   the mq-deadline debugfs attributes exist. Did I perhaps overlook
   something?

Bart.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.