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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1538082779.246sm0vb2p.astroid@alex-archsus.none>
Date:   Thu, 27 Sep 2018 17:15:27 -0400
From:   "Alex Xu (Hello71)" <alex_y_xu@...oo.ca>
To:     Dan Streetman <ddstreet@...e.org>, linux-mm@...ck.org
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH v2] mm: fix z3fold warnings on CONFIG_SMP=n

Spinlocks are always lockable on UP systems, even if they were just
locked.

Cc: Dan Streetman <ddstreet@...e.org>
Signed-off-by: Alex Xu (Hello71) <alex_y_xu@...oo.ca>
---
 mm/z3fold.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mm/z3fold.c b/mm/z3fold.c
index 4b366d181..2e8d268ac 100644
--- a/mm/z3fold.c
+++ b/mm/z3fold.c
@@ -277,7 +277,7 @@ static void release_z3fold_page_locked(struct kref *ref)
 {
 	struct z3fold_header *zhdr = container_of(ref, struct z3fold_header,
 						refcount);
-	WARN_ON(z3fold_page_trylock(zhdr));
+	WARN_ON_SMP(z3fold_page_trylock(zhdr));
 	__release_z3fold_page(zhdr, true);
 }
 
@@ -289,7 +289,7 @@ static void release_z3fold_page_locked_list(struct kref *ref)
 	list_del_init(&zhdr->buddy);
 	spin_unlock(&zhdr->pool->lock);
 
-	WARN_ON(z3fold_page_trylock(zhdr));
+	WARN_ON_SMP(z3fold_page_trylock(zhdr));
 	__release_z3fold_page(zhdr, true);
 }
 
@@ -403,7 +403,7 @@ static void do_compact_page(struct z3fold_header *zhdr, bool locked)
 
 	page = virt_to_page(zhdr);
 	if (locked)
-		WARN_ON(z3fold_page_trylock(zhdr));
+		WARN_ON_SMP(z3fold_page_trylock(zhdr));
 	else
 		z3fold_page_lock(zhdr);
 	if (WARN_ON(!test_and_clear_bit(NEEDS_COMPACTING, &page->private))) {
-- 
2.19.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ