[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git-commits-head
Subject:    sparc64: Zero pages on allocation for mondo and error queues.
From:       "Linux Kernel Mailing List" <linux-kernel () vger ! kernel ! org>
Date:       2017-01-30 23:49:34
Message-ID: 20170130234934.A1E396608F9 () gitolite ! kernel ! org
[Download RAW message or body]

Web:        https://git.kernel.org/torvalds/c/7a7dc961a28b965a0d0303c2e989df17b411708b
Commit:     7a7dc961a28b965a0d0303c2e989df17b411708b
Parent:     5d0e7705774dd412a465896d08d59a81a345c1e4
Refname:    refs/heads/master
Author:     Liam R. Howlett <Liam.Howlett@Oracle.com>
AuthorDate: Tue Jan 17 10:59:02 2017 -0500
Committer:  David S. Miller <davem@davemloft.net>
CommitDate: Mon Jan 30 14:27:53 2017 -0800

    sparc64: Zero pages on allocation for mondo and error queues.
    
    Error queues use a non-zero first word to detect if the queues are full.
    Using pages that have not been zeroed may result in false positive
    overflow events.  These queues are set up once during boot so zeroing
    all mondo and error queue pages is safe.
    
    Note that the false positive overflow does not always occur because the
    page allocation for these queues is so early in the boot cycle that
    higher number CPUs get fresh pages.  It is only when traps are serviced
    with lower number CPUs who were given already used pages that this issue
    is exposed.
    
    Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
---
 arch/sparc/kernel/irq_64.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c
index 34a7930..baed4cd 100644
--- a/arch/sparc/kernel/irq_64.c
+++ b/arch/sparc/kernel/irq_64.c
@@ -1021,7 +1021,7 @@ static void __init alloc_one_queue(unsigned long *pa_ptr, unsigned long qmask)
 	unsigned long order = get_order(size);
 	unsigned long p;
 
-	p = __get_free_pages(GFP_KERNEL, order);
+	p = __get_free_pages(GFP_KERNEL | __GFP_ZERO, order);
 	if (!p) {
 		prom_printf("SUN4V: Error, cannot allocate queue.\n");
 		prom_halt();
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic