]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/madvise: fix madvise_[un]lock() issue
authorLorenzo Stoakes <lorenzo.stoakes@oracle.com>
Tue, 11 Feb 2025 10:44:26 +0000 (10:44 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 28 Feb 2025 00:59:46 +0000 (16:59 -0800)
commit94e8abb980ada78798cb9b5e7468190267883cb4
treef03667faeab70eaf8a48d9771fe99875efc2f972
parentf654009c899cef46fc9bf4f39d81285e6eac093b
mm/madvise: fix madvise_[un]lock() issue

We are asymmetric in our locking/unlocking in the case of memory failure
madvise() behaviour options, correct this and abstract the memory failure
check.

Link: https://lkml.kernel.org/r/2f448f7b-1da7-4099-aa9e-0179d47fde40@lucifer.local
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reported-by: "Lai, Yi" <yi1.lai@linux.intel.com>
Closes: https://lore.kernel.org/Z6rgiVp7221r4JZ5@ly-workstation
Reviewed-by: SeongJae Park <sj@kernel.org>
Tested-by: SeongJae Park <sj@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Liam R. Howlett <howlett@gmail.com>
Cc: Naresh Kamboju <naresh.kamboju@linaro.org>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/madvise.c