Re: [PATCH] powerpc/mm: fix mmap_lock bad unlock

2023-03-06 Thread Suren Baghdasaryan
On Mon, Mar 6, 2023 at 6:09 AM Laurent Dufour wrote: > > On 06/03/2023 15:07:26, David Hildenbrand wrote: > > On 06.03.23 14:55, Laurent Dufour wrote: > >> When page fault is tried holding the per VMA lock, bad_access_pkey() and > >> bad_access() should not be called because it is assuming the mma

[PATCH] powerpc/mm: fix mmap_lock bad unlock

2023-03-06 Thread Laurent Dufour
When page fault is tried holding the per VMA lock, bad_access_pkey() and bad_access() should not be called because it is assuming the mmap_lock is held. In the case a bad access is detected, fall back to the default path, grabbing the mmap_lock to handle the fault and report the error. Fixes: 169d

Re: [PATCH] powerpc/mm: fix mmap_lock bad unlock

2023-03-06 Thread Laurent Dufour
On 06/03/2023 15:07:26, David Hildenbrand wrote: > On 06.03.23 14:55, Laurent Dufour wrote: >> When page fault is tried holding the per VMA lock, bad_access_pkey() and >> bad_access() should not be called because it is assuming the mmap_lock is >> held. >> In the case a bad access is detected, fall

Re: [PATCH] powerpc/mm: fix mmap_lock bad unlock

2023-03-06 Thread David Hildenbrand
On 06.03.23 14:55, Laurent Dufour wrote: When page fault is tried holding the per VMA lock, bad_access_pkey() and bad_access() should not be called because it is assuming the mmap_lock is held. In the case a bad access is detected, fall back to the default path, grabbing the mmap_lock to handle t

[PATCH] powerpc/mm: fix mmap_lock bad unlock

2023-03-06 Thread Laurent Dufour
When page fault is tried holding the per VMA lock, bad_access_pkey() and bad_access() should not be called because it is assuming the mmap_lock is held. In the case a bad access is detected, fall back to the default path, grabbing the mmap_lock to handle the fault and report the error. Fixes: 169d