Thread (2 messages) 2 messages, 2 authors, 2021-02-24

Re: [PATCH 1/1] arm: print alloc free paths for address in registers

From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Date: 2021-02-24 15:06:34
Also in: linux-mm, lkml

On Wed, Feb 24, 2021 at 06:07:34PM +0530, Maninder Singh wrote:
+bool slab_page_object(unsigned long address, void **object, struct kmem_cache **cache)
+{
+	void *addr = (void *)address;
+	struct page *page;
+
+	if ((addr >= (void *)PAGE_OFFSET) &&
+			(addr < high_memory)) {
+		page = virt_to_head_page(addr);
This check is not sufficient. There can be holes in the page array.
You need to use virt_addr_valid() to validate "addr".

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help