summaryrefslogtreecommitdiffstats
path: root/mm/ksm.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-21 09:48:31 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-21 09:48:31 +0200
commit03e3e31ee5c8d45c62c31035578bab5e90133eff (patch)
tree5cff3fda5bb8278621c27823f52b7e8dd85fb0ef /mm/ksm.c
parentmisc: alcor_pci: fix null-ptr-deref when there is no PCI bridge (diff)
parentMerge tag 'char-misc-5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff)
downloadlinux-03e3e31ee5c8d45c62c31035578bab5e90133eff.tar.xz
linux-03e3e31ee5c8d45c62c31035578bab5e90133eff.zip
Merge 50f09a3dd587 ("Merge tag 'char-misc-5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc") into char-misc-next
We want the char/misc driver fixes in here as well Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/ksm.c')
-rw-r--r--mm/ksm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/ksm.c b/mm/ksm.c
index 6bbe314c5260..2f3aaeb34a42 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -776,11 +776,12 @@ static void remove_rmap_item_from_tree(struct rmap_item *rmap_item)
struct page *page;
stable_node = rmap_item->head;
- page = get_ksm_page(stable_node, GET_KSM_PAGE_NOLOCK);
+ page = get_ksm_page(stable_node, GET_KSM_PAGE_LOCK);
if (!page)
goto out;
hlist_del(&rmap_item->hlist);
+ unlock_page(page);
put_page(page);
if (!hlist_empty(&stable_node->hlist))