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: <20141029115107.23071.26065.stgit@buzz>
Date:	Wed, 29 Oct 2014 14:51:07 +0400
From:	Konstantin Khlebnikov <k.khlebnikov@...sung.com>
To:	linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
	Matt Mullins <mmullins@...x.us>, linux-kernel@...r.kernel.org,
	Rafael Aquini <aquini@...hat.com>
Cc:	Sasha Levin <sasha.levin@...cle.com>, stable@...r.kernel.org
Subject: [PATCH] mm/balloon_compaction: fix deflation when compaction is
 disabled

Fix for commit d6d86c0a7f8ddc5b38cf089222cb1d9540762dc2
("mm/balloon_compaction: redesign ballooned pages management").

If CONFIG_BALLOON_COMPACTION=n balloon_page_insert() does not link
pages with balloon and doesn't set PagePrivate flag, as a result
balloon_page_dequeue cannot get any pages because it thinks that
all of them are isolated. Without balloon compaction nobody can
isolate ballooned pages, it's safe to remove this check.

Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@...sung.com>
Reported-by: Matt Mullins <mmullins@...x.us>
Cc: Stable <stable@...r.kernel.org>	(v3.17)
---
 mm/balloon_compaction.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/balloon_compaction.c b/mm/balloon_compaction.c
index b3cbe19..fcad832 100644
--- a/mm/balloon_compaction.c
+++ b/mm/balloon_compaction.c
@@ -68,11 +68,13 @@ struct page *balloon_page_dequeue(struct balloon_dev_info *b_dev_info)
 		 * to be released by the balloon driver.
 		 */
 		if (trylock_page(page)) {
+#ifdef CONFIG_BALLOON_COMPACTION
 			if (!PagePrivate(page)) {
 				/* raced with isolation */
 				unlock_page(page);
 				continue;
 			}
+#endif
 			spin_lock_irqsave(&b_dev_info->pages_lock, flags);
 			balloon_page_delete(page);
 			__count_vm_event(BALLOON_DEFLATE);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ