Re: [PATCH v2] proc/vmcore: fix possible deadlock on concurrent mmap and read

2022-01-25 Thread Baoquan He
On 01/19/22 at 08:34pm, David Hildenbrand wrote: > Lockdep noticed that there is chance for a deadlock if we have > concurrent mmap, concurrent read, and the addition/removal of a > callback. > > As nicely explained by Boqun: > > " > Lockdep warned about the above sequences because rw_semaphore

Re: [PATCH v2] proc/vmcore: fix possible deadlock on concurrent mmap and read

2022-01-25 Thread Baoquan He
On 01/25/22 at 05:09pm, Andrew Morton wrote: > On Wed, 19 Jan 2022 20:34:17 +0100 David Hildenbrand wrote: > > > Lockdep noticed that there is chance for a deadlock if we have > > concurrent mmap, concurrent read, and the addition/removal of a > > callback. > > > > As nicely explained by Boqun:

Re: [PATCH v2] proc/vmcore: fix possible deadlock on concurrent mmap and read

2022-01-25 Thread Andrew Morton
On Wed, 19 Jan 2022 20:34:17 +0100 David Hildenbrand wrote: > Lockdep noticed that there is chance for a deadlock if we have > concurrent mmap, concurrent read, and the addition/removal of a > callback. > > As nicely explained by Boqun: > > " > Lockdep warned about the above sequences because

[PATCH v2] proc/vmcore: fix possible deadlock on concurrent mmap and read

2022-01-19 Thread David Hildenbrand
Lockdep noticed that there is chance for a deadlock if we have concurrent mmap, concurrent read, and the addition/removal of a callback. As nicely explained by Boqun: " Lockdep warned about the above sequences because rw_semaphore is a fair read-write lock, and the following can cause a