]> 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>
Tue, 4 Mar 2025 05:49:37 +0000 (21:49 -0800)
commitc6322d38c4ea2b999e12bf0c6a0f93ae67467d28
treeaeea801ccdea6374f7b7d6b4bd8884dbbae1cb7f
parent39c5eeebee4681bc1d2510a657ef4fd39fd62cdc
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