[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f874f3d6-2f84-cd3a-a227-43496d8175a7@suse.cz>
Date: Thu, 13 Dec 2018 20:40:44 +0100
From: Vlastimil Babka <vbabka@...e.cz>
To: Waiman Long <longman@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...e.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Yang Shi <yang.shi@...ux.alibaba.com>
Subject: Re: [PATCH] mm: Replace verify_mm_writelocked() by
lockdep_assert_held_exclusive()
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@...hat.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
Powered by blists - more mailing lists