lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220720065744.1006305-1-zengjx95@gmail.com>
Date:   Wed, 20 Jul 2022 14:57:44 +0800
From:   zengjx95@...il.com
To:     vitaly.wool@...sulko.com, linmiaohe@...wei.com,
        akpm@...ux-foundation.org
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Zeng Jingxiang <linuszeng@...cent.com>
Subject: [PATCH] mm/z3fold: do not unlock in z3fold_page_putback()

From: Zeng Jingxiang <linuszeng@...cent.com>

z3fold_page_lock() will lock zhdr->page_lock
1630	z3fold_page_lock(zhdr);

return without unlocking zhdr->page_lock
1634	if (kref_put(&zhdr->refcount, release_z3fold_page_locked))
1635		return;

Signed-off-by: Zeng Jingxiang <linuszeng@...cent.com>
---
 mm/z3fold.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/z3fold.c b/mm/z3fold.c
index f41f8b0d9e9a..03785832ad47 100644
--- a/mm/z3fold.c
+++ b/mm/z3fold.c
@@ -1632,13 +1632,14 @@ static void z3fold_page_putback(struct page *page)
 		list_del_init(&zhdr->buddy);
 	INIT_LIST_HEAD(&page->lru);
 	if (kref_put(&zhdr->refcount, release_z3fold_page_locked))
-		return;
+		goto ret;
 	spin_lock(&pool->lock);
 	list_add(&page->lru, &pool->lru);
 	spin_unlock(&pool->lock);
 	if (list_empty(&zhdr->buddy))
 		add_to_unbuddied(pool, zhdr);
 	clear_bit(PAGE_CLAIMED, &page->private);
+ret:
 	z3fold_page_unlock(zhdr);
 }
 
-- 
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ