From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Maninder Singh <maninder1.s@samsung.com>
Cc: cl@linux.com, penberg@kernel.org, rientjes@google.com,
iamjoonsoo.kim@lge.com, akpm@linux-foundation.org,
vbabka@suse.cz, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
a.sahrawat@samsung.com, Vaneet Narang <v.narang@samsung.com>
Subject: Re: [PATCH 1/1] arm: print alloc free paths for address in registers
Date: Wed, 24 Feb 2021 14:03:47 +0000 [thread overview]
Message-ID: <20210224140347.GS1463@shell.armlinux.org.uk> (raw)
In-Reply-To: <1614170254-3207-1-git-send-email-maninder1.s@samsung.com>
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!
prev parent reply other threads:[~2021-02-24 14:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20210224123759epcas5p1c1143b69537467c5135283d590c89bf7@epcas5p1.samsung.com>
2021-02-24 12:37 ` Maninder Singh
2021-02-24 14:03 ` Russell King - ARM Linux admin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210224140347.GS1463@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=a.sahrawat@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=maninder1.s@samsung.com \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=v.narang@samsung.com \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox