diff options
author | Liam R. Howlett <Liam.Howlett@Oracle.com> | 2017-01-17 18:59:02 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-31 01:27:53 +0300 |
commit | 7a7dc961a28b965a0d0303c2e989df17b411708b (patch) | |
tree | 6d18264e4ff905ecea9eeb23b83b731b1308a5a1 /arch/sparc/kernel | |
parent | 5d0e7705774dd412a465896d08d59a81a345c1e4 (diff) | |
download | linux-7a7dc961a28b965a0d0303c2e989df17b411708b.tar.xz |
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>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/irq_64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c index 34a7930b76ef..baed4cdeda75 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(); |