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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1292519440-26763-1-git-send-email-pholasek@redhat.com>
Date:	Thu, 16 Dec 2010 18:10:40 +0100
From:	Petr Holasek <pholasek@...hat.com>
To:	linux-kernel@...r.kernel.org
Cc:	tiwai@...e.de, akpm@...ux-foundation.org,
	Petr Holasek <pholasek@...hat.com>
Subject: [PATCH] kpagecount: added slab page checking because of _mapcount in union

PageSlab macro check was added before putting of _mapcount value
to /kpagecount. page->_mapcount is in union with SLAB structure
so for pages controlled by SLAB page_mapcount() returns nonsenses.

Signed-off-by: Petr Holasek <pholasek@...hat.com>
---
 fs/proc/page.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/proc/page.c b/fs/proc/page.c
index 3b8b456..b06c674 100644
--- a/fs/proc/page.c
+++ b/fs/proc/page.c
@@ -40,7 +40,7 @@ static ssize_t kpagecount_read(struct file *file, char __user *buf,
 			ppage = pfn_to_page(pfn);
 		else
 			ppage = NULL;
-		if (!ppage)
+		if (!ppage || PageSlab(ppage))
 			pcount = 0;
 		else
 			pcount = page_mapcount(ppage);
--
1.7.2.3

--
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