Re: [RFC RT v5.10] [rt] repair usage of raw_v6_hashinfo.lock in raw_seq_start()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2021-11-05 18:18:16 [+0100], To Luis Goncalves wrote:
> On 2021-11-04 15:48:46 [-0300], Luis Goncalves wrote:
> > Yes, sure!
> > 
> > Just as a reminder, I was able to reproduce that backtrace in v5.14-rt
> > up to v5.14-rc6-rt11. But starting from v5.14-rc7-rt12 I no longer
> > reproduced the problem.
> 
> So I'm about to this but patch but this mail confused me. Can you bisect
> which change is responsible for that? Based on the arguing, the same
> callchain should exist in v5.15, too. And a diff
> v5.14-rc6-rt11..v5.14-rc7-rt12 didn't show any change in that area.

Just to be clear:
- raw_seq_start() does read_lock(&h->lock) which is fine on its own.
- raw_seq_show() does local_bh_disable() via sock_i_ino() which nests
  into the former lock. So the problem as lockdep says is:
  
   Thread1                           Thread2
  raw_seq_start()
   -> read_lock(&h->lock)
                                     raw_hash_sk()
				     -> write_lock_bh(&h->lock)
				        -> local_bh_disable()
					-> write_lock(&h->lock) // blocks on T1
  raw_seq_show()
  -> sock_i_ino()
     -> local_bh_disable() // blocks on T2

and is valid on the same CPU.

Sebastian



[Index of Archives]     [Linux USB Development]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux