stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "sparc64: Zero pages on allocation for mondo and error queues." has been added to the 4.9-stable tree
@ 2017-07-03  9:03 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-07-03  9:03 UTC (permalink / raw)
  To: Liam.Howlett, alexander.levin, davem, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    sparc64: Zero pages on allocation for mondo and error queues.

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     sparc64-zero-pages-on-allocation-for-mondo-and-error-queues.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Mon Jul  3 11:00:33 CEST 2017
From: "Liam R. Howlett" <Liam.Howlett@Oracle.com>
Date: Tue, 23 May 2017 21:54:11 -0400
Subject: sparc64: Zero pages on allocation for mondo and error queues.

From: "Liam R. Howlett" <Liam.Howlett@Oracle.com>


[ Upstream commit 7a7dc961a28b965a0d0303c2e989df17b411708b ]

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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/sparc/kernel/irq_64.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/sparc/kernel/irq_64.c
+++ b/arch/sparc/kernel/irq_64.c
@@ -1021,7 +1021,7 @@ static void __init alloc_one_queue(unsig
 	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();


Patches currently in stable-queue which might be from Liam.Howlett@Oracle.com are

queue-4.9/sparc64-handle-pio-mem-non-resumable-errors.patch
queue-4.9/sparc64-zero-pages-on-allocation-for-mondo-and-error-queues.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-03  9:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-03  9:03 Patch "sparc64: Zero pages on allocation for mondo and error queues." has been added to the 4.9-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).