Patch "parisc: fix kernel BUG at arch/parisc/include/asm/mmzone.h:50" has been added to the 3.9-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

    parisc: fix kernel BUG at arch/parisc/include/asm/mmzone.h:50

to the 3.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:
     parisc-fix-kernel-bug-at-arch-parisc-include-asm-mmzone.h-50.patch
and it can be found in the queue-3.9 subdirectory.

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


>From ae249b5fa27f9fba25aa59664d4338efc2dd2394 Mon Sep 17 00:00:00 2001
From: Helge Deller <deller@xxxxxx>
Date: Tue, 28 May 2013 20:35:54 +0000
Subject: parisc: fix kernel BUG at arch/parisc/include/asm/mmzone.h:50

From: Helge Deller <deller@xxxxxx>

commit ae249b5fa27f9fba25aa59664d4338efc2dd2394 upstream.

With CONFIG_DISCONTIGMEM=y and multiple physical memory areas,
cat /proc/kpageflags triggers this kernel bug:

kernel BUG at arch/parisc/include/asm/mmzone.h:50!
CPU: 2 PID: 7848 Comm: cat Tainted: G      D W 3.10.0-rc3-64bit #44
 IAOQ[0]: kpageflags_read0x128/0x238
 IAOQ[1]: kpageflags_read0x12c/0x238
 RP(r2): proc_reg_read0xbc/0x130
Backtrace:
 [<00000000402ca2d4>] proc_reg_read0xbc/0x130
 [<0000000040235bcc>] vfs_read0xc4/0x1d0
 [<0000000040235f0c>] SyS_read0x94/0xf0
 [<0000000040105fc0>] syscall_exit0x0/0x14

kpageflags_read() walks through the whole memory, even if some memory
areas are physically not available. So, we should better not BUG on an
unavailable pfn in pfn_to_nid() but just return the expected value -1 or
0.

Signed-off-by: Helge Deller <deller@xxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 arch/parisc/include/asm/mmzone.h |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/arch/parisc/include/asm/mmzone.h
+++ b/arch/parisc/include/asm/mmzone.h
@@ -39,17 +39,14 @@ extern unsigned char pfnnid_map[PFNNID_M
 static inline int pfn_to_nid(unsigned long pfn)
 {
 	unsigned int i;
-	unsigned char r;
 
 	if (unlikely(pfn_is_io(pfn)))
 		return 0;
 
 	i = pfn >> PFNNID_SHIFT;
 	BUG_ON(i >= ARRAY_SIZE(pfnnid_map));
-	r = pfnnid_map[i];
-	BUG_ON(r == 0xff);
 
-	return (int)r;
+	return (int)pfnnid_map[i];
 }
 
 static inline int pfn_valid(int pfn)


Patches currently in stable-queue which might be from deller@xxxxxx are

queue-3.9/parisc-tlb-flush-counting-fix-for-smp-and-up.patch
queue-3.9/parisc-show-number-of-fpe-and-unaligned-access-handler-calls-in-proc-interrupts.patch
queue-3.9/parisc-parport0-fix-this-legacy-no-device-port-driver.patch
queue-3.9/parisc-fix-kernel-bug-at-arch-parisc-include-asm-mmzone.h-50.patch
queue-3.9/parisc-kernel-using-strlcpy-instead-of-strcpy.patch
queue-3.9/parisc-implement-irq-stacks.patch
queue-3.9/parisc-provide-pci_mmap_page_range-for-parisc.patch
queue-3.9/parisc-more-irq-statistics-in-proc-interrupts.patch
queue-3.9/parisc-fix-serial-ports-on-c8000-workstation.patch
queue-3.9/parisc-remove-the-second-argument-of-kmap_atomic.patch
queue-3.9/parisc-add-kernel-stack-overflow-check.patch
queue-3.9/parisc-memory-overflow-name-length-is-too-short-for-using.patch
queue-3.9/parisc-implement-irq-stacks-part-2-v2.patch
queue-3.9/parisc-fix-irq-stack-on-up-and-smp.patch
queue-3.9/parisc-rename-config_pa7100-to-config_pa7000.patch
queue-3.9/parisc-make-interrupt-and-interruption-stack-allocation-reentrant.patch
queue-3.9/parisc-fix-kernel-bug-at-arch-parisc-include-asm-mmzone.h-50-part-2.patch
queue-3.9/parisc-add-rp5470-entry-to-machine-database.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]