lkml.org 
[lkml]   [2018]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mm: Replace verify_mm_writelocked() by lockdep_assert_held_exclusive()
From
Date
On 12/13/18 8:38 PM, Waiman Long wrote:
> Using down_read_trylock() to check if a task holds a write lock on
> a rwsem is not reliable. A task can hold a read lock on a rwsem and
> down_read_trylock() can fail if a writer is waiting in the wait queue.
>
> So use lockdep_assert_held_exclusive() instead which can do the right
> check when CONFIG_LOCKDEP is on.
>
> Signed-off-by: Waiman Long <longman@redhat.com>

There's already a patch in mmotm removing this completely:
https://www.ozlabs.org/~akpm/mmots/broken-out/mm-mmap-remove-verify_mm_writelocked.patch

Vlastimil

\
 
 \ /
  Last update: 2018-12-13 20:44    [W:0.035 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site