[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6203a9e6-8dc1-4b36-aa2c-41c29487812c@redhat.com>
Date: Tue, 1 Apr 2025 10:14:39 +0200
From: David Hildenbrand <david@...hat.com>
To: Baoquan He <bhe@...hat.com>, akpm@...ux-foundation.org
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org, yanjun.zhu@...ux.dev
Subject: Re: [PATCH v2 3/7] mm/gup: Fix the outdated code comments above
get_user_pages_unlocked()
On 31.03.25 10:13, Baoquan He wrote:
> Since commit f0818f472d8d ("mm: gup: add get_user_pages_locked
> and get_user_pages_unlocked"), get_user_pages() doesn't need to have
> mmap_lock held anymore. It calls __get_user_pages_locked() which
> can acquire and drop the mmap_lock internaly.
s/internaly/internally/
But your statement is wrong. get_user_pages() must be called with the
mmap_lock held, because it sets "int locked = 1;" when calling
__get_user_pages_locked().
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists