On Wed, 2020-12-23 at 09:31 +0800, Can Guo wrote: > And assume you come up with a better check, > you want to add the check everywhere? You must have noticed the fix > to > the func ufshcd_clk_gate_enable_store() from Jaegeuk Kim. Do you mean lock spin_lock_irqsave(hba->host->host_lock, flags)? It can completely fix race issue, but it is different with here. ufshcd_clkgate_enable_store() doesn't call ufshcd_hold(). If you want using this lock, we should change ufshcd_hold() and ufshcd_query_*(). Bean