]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 years agoselinux: fix sel_netnode_insert() suspicious rcu dereference
Dave Jones [Thu, 15 Nov 2012 02:37:02 +0000 (13:37 +1100)]
selinux: fix sel_netnode_insert() suspicious rcu dereference

===============================
[ INFO: suspicious RCU usage. ]
3.5.0-rc1+ #63 Not tainted
-------------------------------
security/selinux/netnode.c:178 suspicious rcu_dereference_check() usage!

other info that might help us debug this:

rcu_scheduler_active = 1, debug_locks = 0
1 lock held by trinity-child1/8750:
 #0:  (sel_netnode_lock){+.....}, at: [<ffffffff812d8f8a>] sel_netnode_sid+0x16a/0x3e0

stack backtrace:
Pid: 8750, comm: trinity-child1 Not tainted 3.5.0-rc1+ #63
Call Trace:
 [<ffffffff810cec2d>] lockdep_rcu_suspicious+0xfd/0x130
 [<ffffffff812d91d1>] sel_netnode_sid+0x3b1/0x3e0
 [<ffffffff812d8e20>] ? sel_netnode_find+0x1a0/0x1a0
 [<ffffffff812d24a6>] selinux_socket_bind+0xf6/0x2c0
 [<ffffffff810cd1dd>] ? trace_hardirqs_off+0xd/0x10
 [<ffffffff810cdb55>] ? lock_release_holdtime.part.9+0x15/0x1a0
 [<ffffffff81093841>] ? lock_hrtimer_base+0x31/0x60
 [<ffffffff812c9536>] security_socket_bind+0x16/0x20
 [<ffffffff815550ca>] sys_bind+0x7a/0x100
 [<ffffffff816c03d5>] ? sysret_check+0x22/0x5d
 [<ffffffff810d392d>] ? trace_hardirqs_on_caller+0x10d/0x1a0
 [<ffffffff8133b09e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [<ffffffff816c03a9>] system_call_fastpath+0x16/0x1b

This patch below does what Paul McKenney suggested in the previous thread.

Signed-off-by: Dave Jones <davej@redhat.com>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Cc: Eric Paris <eparis@parisplace.org>
Cc: James Morris <jmorris@namei.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoCRIS: Fix I/O macros
Corey Minyard [Thu, 15 Nov 2012 02:37:02 +0000 (13:37 +1100)]
CRIS: Fix I/O macros

The inb/outb macros for CRIS are broken from a number of points of view,
missing () around parameters and they have an unprotected if statement in
them.  This was breaking the compile of IPMI on CRIS and thus I was being
annoyed by build regressions, so I fixed them.

Plus I don't think they would have worked at all, since the data values
were missing "&" and the outsl had a "3" instead of a "4" for the size.
From what I can tell, this stuff is not used at all, so this can't be any
more broken than it was before, anyway.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <starvik@axis.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agomm: revert "mm: vmscan: scale number of pages reclaimed by reclaim/compaction based...
Mel Gorman [Thu, 15 Nov 2012 02:37:01 +0000 (13:37 +1100)]
mm: revert "mm: vmscan: scale number of pages reclaimed by reclaim/compaction based on failures"

Jiri Slaby reported the following:

(It's an effective revert of "mm: vmscan: scale number of pages
reclaimed by reclaim/compaction based on failures".) Given kswapd
had hours of runtime in ps/top output yesterday in the morning
and after the revert it's now 2 minutes in sum for the last 24h,
I would say, it's gone.

The intention of the patch in question was to compensate for the loss of
lumpy reclaim.  Part of the reason lumpy reclaim worked is because it
aggressively reclaimed pages and this patch was meant to be a sane
compromise.

When compaction fails, it gets deferred and both compaction and
reclaim/compaction is deferred avoid excessive reclaim.  However, since
commit c6543459 ("mm: remove __GFP_NO_KSWAPD"), kswapd is woken up each
time and continues reclaiming which was not taken into account when the
patch was developed.

Attempts to address the problem ended up just changing the shape of the
problem instead of fixing it.  The release window gets closer and while a
THP allocation failing is not a major problem, kswapd chewing up a lot of
CPU is.  This patch reverts "mm: vmscan: scale number of pages reclaimed
by reclaim/compaction based on failures" and will be revisited in the
future.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Cc: Zdenek Kabelac <zkabelac@redhat.com>
Cc: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Johannes Hirte <johannes.hirte@fem.tu-ilmenau.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoproc: check vma->vm_file before dereferencing
Stanislav Kinsbursky [Thu, 15 Nov 2012 02:37:01 +0000 (13:37 +1100)]
proc: check vma->vm_file before dereferencing

7b540d0646ce ("proc_map_files_readdir(): don't bother with grabbing
files") switched proc_map_files_readdir() to use @f_mode directly instead
of grabbing @file reference, but same time the test for @vm_file presence
was lost leading to nil dereference.  The patch brings the test back.

The all proc_map_files feature is CONFIG_CHECKPOINT_RESTORE wrapped (which
is set to 'n' by default) so the bug doesn't affect regular kernels.

The regression is 3.7-rc1 only as far as I can tell.

[gorcunov@openvz.org: provided changelog]
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agomm: fix a regression with HIGHMEM
Jiang Liu [Thu, 15 Nov 2012 02:37:01 +0000 (13:37 +1100)]
mm: fix a regression with HIGHMEM

Changeset 7f1290f2f2 ("mm: fix-up zone present pages") tried to fix a
issue when calculating zone->present_pages, but it causes a regression to
32bit systems with HIGHMEM.  With that changeset,
reset_zone_present_pages() resets all zone->present_pages to zero, and
fixup_zone_present_pages() is called to recalculate zone->present_pages
when the boot allocator frees core memory pages into the buddy allocator.
Because highmem pages are not freed by bootmem allocator, all highmem
zones' present_pages becomes zero.

Actually there's no need to recalculate present_pages for the highmem zone
because the bootmem allocator never allocates pages from it.  So fix the
regression by skipping highmem in function reset_zone_present_pages() and
fixup_zone_present_pages().

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Jianguo Wu <wujianguo@huawei.com>
Reported-by: Maciej Rutecki <maciej.rutecki@gmail.com>
Tested-by: Maciej Rutecki <maciej.rutecki@gmail.com>
Tested-by: Chris Clayton <chris2553@googlemail.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Minchan Kim <minchan@kernel.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agotmpfs: change final i_blocks BUG to WARNING
Hugh Dickins [Thu, 15 Nov 2012 02:37:00 +0000 (13:37 +1100)]
tmpfs: change final i_blocks BUG to WARNING

Under a particular load on one machine, I have hit shmem_evict_inode()'s
BUG_ON(inode->i_blocks), enough times to narrow it down to a particular
race between swapout and eviction.

It comes from the "if (freed > 0)" asymmetry in shmem_recalc_inode(), and
the lack of coherent locking between mapping's nrpages and shmem's swapped
count.  There's a window in shmem_writepage(), between lowering nrpages in
shmem_delete_from_page_cache() and then raising swapped count, when the
freed count appears to be +1 when it should be 0, and then the asymmetry
stops it from being corrected with -1 before hitting the BUG.

One answer is coherent locking: using tree_lock throughout, without
info->lock; reasonable, but the raw_spin_lock in percpu_counter_add() on
used_blocks makes that messier than expected.  Another answer may be a
further effort to eliminate the weird shmem_recalc_inode() altogether, but
previous attempts at that failed.

So far undecided, but for now change the BUG_ON to WARN_ON: in usual
circumstances it remains a useful consistency check.

Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agotmpfs: fix shmem_getpage_gfp VM_BUG_ON
Hugh Dickins [Thu, 15 Nov 2012 02:37:00 +0000 (13:37 +1100)]
tmpfs: fix shmem_getpage_gfp VM_BUG_ON

Fuzzing with trinity hit the "impossible" VM_BUG_ON(error) (which Fedora
has converted to WARNING) in shmem_getpage_gfp():

WARNING: at mm/shmem.c:1151 shmem_getpage_gfp+0xa5c/0xa70()
Pid: 29795, comm: trinity-child4 Not tainted 3.7.0-rc2+ #49
Call Trace:
 [<ffffffff8107100f>] warn_slowpath_common+0x7f/0xc0
 [<ffffffff8107106a>] warn_slowpath_null+0x1a/0x20
 [<ffffffff811903fc>] shmem_getpage_gfp+0xa5c/0xa70
 [<ffffffff81190e4f>] shmem_fault+0x4f/0xa0
 [<ffffffff8119f391>] __do_fault+0x71/0x5c0
 [<ffffffff811a2767>] handle_pte_fault+0x97/0xae0
 [<ffffffff811a4a39>] handle_mm_fault+0x289/0x350
 [<ffffffff816d091e>] __do_page_fault+0x18e/0x530
 [<ffffffff816d0ceb>] do_page_fault+0x2b/0x50
 [<ffffffff816cd3b8>] page_fault+0x28/0x30
 [<ffffffff816d5688>] tracesys+0xe1/0xe6

Thanks to Johannes for pointing to truncation: free_swap_and_cache() only
does a trylock on the page, so the page lock we've held since before
confirming swap is not enough to protect against truncation.

What cleanup is needed in this case?  Just delete_from_swap_cache(), which
takes care of the memcg uncharge.

Reported-by: Dave Jones <davej@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agorapidio: fix kernel-doc warnings
Randy Dunlap [Thu, 15 Nov 2012 02:37:00 +0000 (13:37 +1100)]
rapidio: fix kernel-doc warnings

Fix rapidio kernel-doc warnings:

Warning(drivers/rapidio/rio.c:415): No description found for parameter 'local'
Warning(drivers/rapidio/rio.c:415): Excess function parameter 'lstart' description in 'rio_map_inb_region'
Warning(include/linux/rio.h:290): No description found for parameter 'switches'
Warning(include/linux/rio.h:290): No description found for parameter 'destid_table'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Matt Porter <mporter@kernel.crashing.org>
Acked-by: Alexandre Bounine <alexandre.bounine@idt.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoswapfile-fix-name-leak-in-swapoff-fix
Andrew Morton [Thu, 15 Nov 2012 02:37:00 +0000 (13:37 +1100)]
swapfile-fix-name-leak-in-swapoff-fix

Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jeff Layton <jlayton@redhat.com>
Cc: Xiaotian Feng <dannyfeng@tencent.com>
Cc: Xiaotian Feng <xtfeng@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoswapfile: fix name leak in swapoff
Xiaotian Feng [Thu, 15 Nov 2012 02:36:59 +0000 (13:36 +1100)]
swapfile: fix name leak in swapoff

There's a name leak introduced by 91a27b2 ("vfs: define struct filename
and have getname() return it").  Add the missing putname.

Signed-off-by: Xiaotian Feng <dannyfeng@tencent.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoMerge branch 'akpm-current/current'
Stephen Rothwell [Thu, 15 Nov 2012 06:23:49 +0000 (17:23 +1100)]
Merge branch 'akpm-current/current'

Conflicts:
mm/memcontrol.c

11 years agoMerge remote-tracking branch 'drop-experimental/linux-next'
Stephen Rothwell [Thu, 15 Nov 2012 06:08:06 +0000 (17:08 +1100)]
Merge remote-tracking branch 'drop-experimental/linux-next'

Conflicts:
drivers/net/ethernet/intel/Kconfig
drivers/ptp/Kconfig

11 years agoMerge remote-tracking branch 'mpc5xxx/next'
Stephen Rothwell [Thu, 15 Nov 2012 06:06:23 +0000 (17:06 +1100)]
Merge remote-tracking branch 'mpc5xxx/next'

11 years agoMerge remote-tracking branch 'powerpc/next'
Stephen Rothwell [Thu, 15 Nov 2012 06:02:46 +0000 (17:02 +1100)]
Merge remote-tracking branch 'powerpc/next'

Conflicts:
arch/powerpc/kernel/entry_64.S

11 years agoMerge remote-tracking branch 'lzo-update/lzo-update'
Stephen Rothwell [Thu, 15 Nov 2012 05:54:47 +0000 (16:54 +1100)]
Merge remote-tracking branch 'lzo-update/lzo-update'

11 years agoMerge remote-tracking branch 'random/dev'
Stephen Rothwell [Thu, 15 Nov 2012 05:53:08 +0000 (16:53 +1100)]
Merge remote-tracking branch 'random/dev'

11 years agoMerge remote-tracking branch 'clk/clk-next'
Stephen Rothwell [Thu, 15 Nov 2012 05:51:28 +0000 (16:51 +1100)]
Merge remote-tracking branch 'clk/clk-next'

11 years agoMerge remote-tracking branch 'signal/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 05:44:31 +0000 (16:44 +1100)]
Merge remote-tracking branch 'signal/for-next'

Conflicts:
arch/arm/kernel/process.c
arch/sparc/kernel/sys_sparc_64.c

11 years agoMerge remote-tracking branch 'dma-buf/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 05:42:36 +0000 (16:42 +1100)]
Merge remote-tracking branch 'dma-buf/for-next'

11 years agoMerge remote-tracking branch 'pwm/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 05:40:59 +0000 (16:40 +1100)]
Merge remote-tracking branch 'pwm/for-next'

11 years agoMerge remote-tracking branch 'dma-mapping/dma-mapping-next'
Stephen Rothwell [Thu, 15 Nov 2012 05:39:19 +0000 (16:39 +1100)]
Merge remote-tracking branch 'dma-mapping/dma-mapping-next'

11 years agoMerge remote-tracking branch 'kvmtool/master'
Stephen Rothwell [Thu, 15 Nov 2012 05:37:43 +0000 (16:37 +1100)]
Merge remote-tracking branch 'kvmtool/master'

11 years agoMerge remote-tracking branch 'tegra/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 05:36:05 +0000 (16:36 +1100)]
Merge remote-tracking branch 'tegra/for-next'

11 years agoMerge remote-tracking branch 'samsung/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 05:34:26 +0000 (16:34 +1100)]
Merge remote-tracking branch 'samsung/for-next'

11 years agoMerge remote-tracking branch 'renesas/next'
Stephen Rothwell [Thu, 15 Nov 2012 05:34:19 +0000 (16:34 +1100)]
Merge remote-tracking branch 'renesas/next'

11 years agoMerge remote-tracking branch 'ixp4xx/next'
Stephen Rothwell [Thu, 15 Nov 2012 05:32:36 +0000 (16:32 +1100)]
Merge remote-tracking branch 'ixp4xx/next'

11 years agoMerge remote-tracking branch 'ep93xx/ep93xx-for-next'
Stephen Rothwell [Thu, 15 Nov 2012 05:32:33 +0000 (16:32 +1100)]
Merge remote-tracking branch 'ep93xx/ep93xx-for-next'

11 years agoMerge remote-tracking branch 'cortex/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 05:30:52 +0000 (16:30 +1100)]
Merge remote-tracking branch 'cortex/for-next'

11 years agoMerge remote-tracking branch 'bcm2835/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 05:29:10 +0000 (16:29 +1100)]
Merge remote-tracking branch 'bcm2835/for-next'

11 years agoMerge remote-tracking branch 'arm-soc/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 05:27:29 +0000 (16:27 +1100)]
Merge remote-tracking branch 'arm-soc/for-next'

Conflicts:
arch/arm/Kconfig
arch/arm/configs/afeb9260_defconfig
arch/arm/configs/stamp9g20_defconfig
arch/arm/mach-nomadik/board-nhk8815.c
arch/arm/mach-omap2/drm.c
arch/arm/mach-ux500/board-mop500-audio.c
arch/arm/mach-ux500/board-mop500.c
arch/arm/mach-ux500/cpu-db8500.c
arch/arm/plat-omap/i2c.c
drivers/net/ethernet/cadence/at91_ether.c
drivers/pinctrl/pinctrl-nomadik.c
drivers/tty/serial/atmel_serial.c

11 years agoMerge remote-tracking branch 'gpio-lw/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 05:16:27 +0000 (16:16 +1100)]
Merge remote-tracking branch 'gpio-lw/for-next'

11 years agoMerge remote-tracking branch 'vhost/linux-next'
Stephen Rothwell [Thu, 15 Nov 2012 05:16:11 +0000 (16:16 +1100)]
Merge remote-tracking branch 'vhost/linux-next'

Conflicts:
drivers/net/tun.c

11 years agoMerge remote-tracking branch 'pinctrl/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 05:14:12 +0000 (16:14 +1100)]
Merge remote-tracking branch 'pinctrl/for-next'

Conflicts:
arch/arm/boot/dts/spear1340.dtsi

11 years agoMerge remote-tracking branch 'char-misc/char-misc-next'
Stephen Rothwell [Thu, 15 Nov 2012 05:12:22 +0000 (16:12 +1100)]
Merge remote-tracking branch 'char-misc/char-misc-next'

11 years agoMerge remote-tracking branch 'staging/staging-next'
Stephen Rothwell [Thu, 15 Nov 2012 05:10:23 +0000 (16:10 +1100)]
Merge remote-tracking branch 'staging/staging-next'

Conflicts:
drivers/iio/adc/Kconfig
drivers/iio/adc/Makefile

11 years agoMerge remote-tracking branch 'usb/usb-next'
Stephen Rothwell [Thu, 15 Nov 2012 05:08:17 +0000 (16:08 +1100)]
Merge remote-tracking branch 'usb/usb-next'

Conflicts:
drivers/usb/early/ehci-dbgp.c
drivers/usb/host/ehci-ls1x.c
drivers/usb/host/ohci-xls.c
drivers/usb/musb/ux500.c

11 years agoMerge remote-tracking branch 'tty/tty-next'
Stephen Rothwell [Thu, 15 Nov 2012 04:41:23 +0000 (15:41 +1100)]
Merge remote-tracking branch 'tty/tty-next'

Conflicts:
drivers/tty/serial/omap-serial.c

11 years agoMerge remote-tracking branch 'driver-core/driver-core-next'
Stephen Rothwell [Thu, 15 Nov 2012 04:39:40 +0000 (15:39 +1100)]
Merge remote-tracking branch 'driver-core/driver-core-next'

11 years agoMerge remote-tracking branch 'leds/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 04:38:01 +0000 (15:38 +1100)]
Merge remote-tracking branch 'leds/for-next'

11 years agoMerge remote-tracking branch 'regmap/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 04:36:15 +0000 (15:36 +1100)]
Merge remote-tracking branch 'regmap/for-next'

11 years agoMerge remote-tracking branch 'drivers-x86/linux-next'
Stephen Rothwell [Thu, 15 Nov 2012 04:34:21 +0000 (15:34 +1100)]
Merge remote-tracking branch 'drivers-x86/linux-next'

11 years agoMerge remote-tracking branch 'workqueues/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 04:32:44 +0000 (15:32 +1100)]
Merge remote-tracking branch 'workqueues/for-next'

11 years agoMerge remote-tracking branch 'percpu/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 04:31:04 +0000 (15:31 +1100)]
Merge remote-tracking branch 'percpu/for-next'

11 years agoMerge remote-tracking branch 'xen-two/linux-next'
Stephen Rothwell [Thu, 15 Nov 2012 04:24:38 +0000 (15:24 +1100)]
Merge remote-tracking branch 'xen-two/linux-next'

11 years agoMerge remote-tracking branch 'kvm-ppc/kvm-ppc-next'
Stephen Rothwell [Thu, 15 Nov 2012 04:24:26 +0000 (15:24 +1100)]
Merge remote-tracking branch 'kvm-ppc/kvm-ppc-next'

Conflicts:
arch/powerpc/include/asm/Kbuild
arch/powerpc/include/uapi/asm/Kbuild
arch/powerpc/include/uapi/asm/epapr_hcalls.h

11 years agoMerge remote-tracking branch 'kvm/linux-next'
Stephen Rothwell [Thu, 15 Nov 2012 04:21:38 +0000 (15:21 +1100)]
Merge remote-tracking branch 'kvm/linux-next'

11 years agoMerge remote-tracking branch 'rcu/rcu/next'
Stephen Rothwell [Thu, 15 Nov 2012 04:14:07 +0000 (15:14 +1100)]
Merge remote-tracking branch 'rcu/rcu/next'

11 years agoMerge remote-tracking branch 'ftrace/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 04:12:05 +0000 (15:12 +1100)]
Merge remote-tracking branch 'ftrace/for-next'

11 years agopowerpc: Disable relocation on exceptions when kexecing
Ian Munsie [Thu, 8 Nov 2012 05:40:28 +0000 (16:40 +1100)]
powerpc: Disable relocation on exceptions when kexecing

Since we don't know if they new kernel we are kexecing into has been
built to support relocation on exceptions, we disable them before we
kexec.

We do NOT disable them if we are execing a kdump kernel, because we
want to change as little state as possible and it is likely that we are
execing ourselves and will be able to handle them anyway.

Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Enable relocation on during exceptions at boot
Ian Munsie [Thu, 8 Nov 2012 05:03:14 +0000 (16:03 +1100)]
powerpc: Enable relocation on during exceptions at boot

We currently do this synchronously at boot from setup_arch. On a large
system this could hypothetically take a little while to complete, so
currently we will give up if we are asked to wait for more than a second
in total.

If we actually start hitting that timeout in practice we can always move
this code into a kernel thread to take care of it in the background.

Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Move get_longbusy_msecs into hvcall.h and remove duplicate function
Ian Munsie [Thu, 8 Nov 2012 05:10:29 +0000 (16:10 +1100)]
powerpc: Move get_longbusy_msecs into hvcall.h and remove duplicate function

I am going to use this in the next patch, better to have this code in
one place rather than three.

Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Add wrappers to enable/disable relocation on exceptions
Ian Munsie [Thu, 8 Nov 2012 04:57:04 +0000 (15:57 +1100)]
powerpc: Add wrappers to enable/disable relocation on exceptions

These wrappers hide the parameters that have to be passed to H_SET_MODE
to enable/disable relocation on during exceptions.

As noted in the comments, since these have partition wide scope, they
may take some time to complete and must be periodically retried until
H_SUCCESS is returned.

Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Add set_mode hcall
Ian Munsie [Tue, 6 Nov 2012 05:15:17 +0000 (16:15 +1100)]
powerpc: Add set_mode hcall

This new hcall in POWER8 is used to set various resource mode registers.
eg. it can set address translation mode on interrupt (note: partition wide
scope)

Signed-off-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Setup relocation on exceptions for bare metal systems
Michael Neuling [Fri, 2 Nov 2012 05:41:58 +0000 (16:41 +1100)]
powerpc: Setup relocation on exceptions for bare metal systems

This turns on MMU on execptions via AIL field in the LPCR.

Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Move initial mfspr LPCR out of __init_LPCR
Michael Neuling [Mon, 5 Nov 2012 03:40:18 +0000 (14:40 +1100)]
powerpc: Move initial mfspr LPCR out of __init_LPCR

We want to change what's initially set in the LPCR, so start by taking the move
from LPCR out of the function and into the caller.

Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Add relocation on exception vector handlers
Michael Neuling [Fri, 2 Nov 2012 06:21:43 +0000 (17:21 +1100)]
powerpc: Add relocation on exception vector handlers

POWER8/v2.07 allows exceptions to be taken with the MMU still on.

A new set of exception vectors is added at 0xc000_0000_0000_4xxx.  When the HW
takes us here, MSR IR/DR will be set already and we no longer need a costly
RFID to turn the MMU back on again.

The original 0x0 based exception vectors remain for when the HW can't leave the
MMU on.  Examples of this are when we can't trust the current MMU mappings,
like when we are changing from guest to hypervisor (HV 0 -> 1) or when the MMU
was off already.  In these cases the HW will take us to the original 0x0 based
exception vectors with the MMU off as before.

This uses the new macros added previously too implement these new execption
vectors at 0xc000_0000_0000_4xxx.  We exit these exception vectors using
mflr/blr (rather than mtspr SSR0/RFID), since we don't need the costly MMU
switch anymore.

This moves the __end_interrupts marker down past these new 0x4000 vectors since
they will need to be copied down to 0x0 when the kernel is not at 0x0.

Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Add new macros needed for relocation on exceptions
Michael Neuling [Fri, 2 Nov 2012 06:21:28 +0000 (17:21 +1100)]
powerpc: Add new macros needed for relocation on exceptions

POWER8/v2.07 allows exceptions to be taken with the MMU still on.

A new set of exception vectors is added at 0xc000_0000_0000_4xxx.  When the HW
takes us here, MSR IR/DR will be set already and we no longer need a costly
RFID to turn the MMU back on again.

The original 0x0 based exception vectors remain for when the HW can't leave the
MMU on.  Examples of this are when we can't trust the current the MMU mappings,
like when we are changing from guest to hypervisor (HV 0 -> 1) or when the MMU
was off already.  In these cases the HW will take us to the original 0x0 based
exception vectors with the MMU off as before.

The below macros are copies of the macros used at the 0x0 offset but modified
to handle the MMU being on.  In these macros we use the link register to jump
to the secondary handlers rather than using RFID (RFID was also use to turn on
the MMU).

Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Turn syscall handler into macros
Michael Neuling [Fri, 2 Nov 2012 06:16:01 +0000 (17:16 +1100)]
powerpc: Turn syscall handler into macros

This turns the syscall handler into macros as we are going to want to reuse
them again later.

Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Make load_hander handle upto 64k offset
Michael Neuling [Mon, 5 Nov 2012 06:10:35 +0000 (17:10 +1100)]
powerpc: Make load_hander handle upto 64k offset

If we change load_hander() to use an ori instead of addi, we can load handlers
upto 64k away provided we are still 64k aligned.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Remove unessessary 0x3000 location enforcement
Michael Neuling [Fri, 2 Nov 2012 02:53:36 +0000 (13:53 +1100)]
powerpc: Remove unessessary 0x3000 location enforcement

This removes the large gap between 0x1800 and 0x3000.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Whitespace changes in exception64s.S
Michael Neuling [Fri, 2 Nov 2012 03:11:51 +0000 (14:11 +1100)]
powerpc: Whitespace changes in exception64s.S

Remove redundancy spaces and make tab usage consistent.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agoMerge remote-tracking branch 'tip/auto-latest'
Stephen Rothwell [Thu, 15 Nov 2012 04:04:33 +0000 (15:04 +1100)]
Merge remote-tracking branch 'tip/auto-latest'

11 years agoMerge remote-tracking branch 'spi-mb/spi-next'
Stephen Rothwell [Thu, 15 Nov 2012 04:02:52 +0000 (15:02 +1100)]
Merge remote-tracking branch 'spi-mb/spi-next'

11 years agoMerge branch 'dt' into next
Benjamin Herrenschmidt [Thu, 15 Nov 2012 04:02:44 +0000 (15:02 +1100)]
Merge branch 'dt' into next

11 years agopowerpc: Fix CONFIG_RELOCATABLE=y CONFIG_CRASH_DUMP=n build
Anton Blanchard [Sun, 11 Nov 2012 19:01:05 +0000 (19:01 +0000)]
powerpc: Fix CONFIG_RELOCATABLE=y CONFIG_CRASH_DUMP=n build

If we build a kernel with CONFIG_RELOCATABLE=y CONFIG_CRASH_DUMP=n,
the kernel fails when we run at a non zero offset. It turns out
we were incorrectly wrapping some of the relocatable kernel code
with CONFIG_CRASH_DUMP.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc: Add POWER8 architected mode to cputable
Michael Neuling [Thu, 8 Nov 2012 20:26:42 +0000 (20:26 +0000)]
powerpc: Add POWER8 architected mode to cputable

A PVR of 0x0F000004 means we are arch v2.07 complicate ie, POWER8.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agopowerpc/pseries: Update ibm,architecture.vec for PAPR 2.7/POWER8
Michael Neuling [Thu, 8 Nov 2012 20:23:11 +0000 (20:23 +0000)]
powerpc/pseries: Update ibm,architecture.vec for PAPR 2.7/POWER8

Update ibm,architecture.vec for POWER8 and allows us to support more
than one parition per core.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
11 years agoMerge remote-tracking branch 'spi/spi/next'
Stephen Rothwell [Thu, 15 Nov 2012 04:01:16 +0000 (15:01 +1100)]
Merge remote-tracking branch 'spi/spi/next'

Conflicts:
drivers/spi/spi-xcomm.c

11 years agoMerge remote-tracking branch 'devicetree/devicetree/next'
Stephen Rothwell [Thu, 15 Nov 2012 03:38:59 +0000 (14:38 +1100)]
Merge remote-tracking branch 'devicetree/devicetree/next'

11 years agoMerge remote-tracking branch 'edac-amd/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 03:37:17 +0000 (14:37 +1100)]
Merge remote-tracking branch 'edac-amd/for-next'

11 years agoMerge remote-tracking branch 'edac/linux_next'
Stephen Rothwell [Thu, 15 Nov 2012 03:35:32 +0000 (14:35 +1100)]
Merge remote-tracking branch 'edac/linux_next'

11 years agoMerge remote-tracking branch 'fsnotify/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 03:33:52 +0000 (14:33 +1100)]
Merge remote-tracking branch 'fsnotify/for-next'

Conflicts:
kernel/audit_tree.c

11 years agoMerge remote-tracking branch 'pm/linux-next'
Stephen Rothwell [Thu, 15 Nov 2012 03:26:12 +0000 (14:26 +1100)]
Merge remote-tracking branch 'pm/linux-next'

Conflicts:
arch/x86/pci/acpi.c

11 years agoMerge remote-tracking branch 'trivial/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 03:24:23 +0000 (14:24 +1100)]
Merge remote-tracking branch 'trivial/for-next'

11 years agoMerge remote-tracking branch 'osd/linux-next'
Stephen Rothwell [Thu, 15 Nov 2012 03:22:38 +0000 (14:22 +1100)]
Merge remote-tracking branch 'osd/linux-next'

11 years agoMerge remote-tracking branch 'vfio/next'
Stephen Rothwell [Thu, 15 Nov 2012 03:21:00 +0000 (14:21 +1100)]
Merge remote-tracking branch 'vfio/next'

11 years agoMerge remote-tracking branch 'iommu/next'
Stephen Rothwell [Thu, 15 Nov 2012 03:15:51 +0000 (14:15 +1100)]
Merge remote-tracking branch 'iommu/next'

11 years agoMerge remote-tracking branch 'watchdog/master'
Stephen Rothwell [Thu, 15 Nov 2012 03:14:04 +0000 (14:14 +1100)]
Merge remote-tracking branch 'watchdog/master'

11 years agoMerge remote-tracking branch 'selinux/master'
Stephen Rothwell [Thu, 15 Nov 2012 03:13:57 +0000 (14:13 +1100)]
Merge remote-tracking branch 'selinux/master'

11 years agoMerge remote-tracking branch 'security/next'
Stephen Rothwell [Thu, 15 Nov 2012 03:07:07 +0000 (14:07 +1100)]
Merge remote-tracking branch 'security/next'

Conflicts:
fs/cifs/cifsacl.c
net/dns_resolver/dns_key.c
security/keys/keyctl.c
security/keys/keyring.c
security/keys/process_keys.c

11 years agoMerge remote-tracking branch 'regulator/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 03:05:18 +0000 (14:05 +1100)]
Merge remote-tracking branch 'regulator/for-next'

11 years agoMerge remote-tracking branch 'mfd/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 03:03:27 +0000 (14:03 +1100)]
Merge remote-tracking branch 'mfd/for-next'

11 years agoMerge remote-tracking branch 'md/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 03:01:47 +0000 (14:01 +1100)]
Merge remote-tracking branch 'md/for-next'

11 years agoMerge remote-tracking branch 'slab/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 02:54:27 +0000 (13:54 +1100)]
Merge remote-tracking branch 'slab/for-next'

Conflicts:
mm/slob.c

11 years agoMerge remote-tracking branch 'kgdb/kgdb-next'
Stephen Rothwell [Thu, 15 Nov 2012 02:54:16 +0000 (13:54 +1100)]
Merge remote-tracking branch 'kgdb/kgdb-next'

11 years agoMerge remote-tracking branch 'mmc/mmc-next'
Stephen Rothwell [Thu, 15 Nov 2012 02:52:37 +0000 (13:52 +1100)]
Merge remote-tracking branch 'mmc/mmc-next'

11 years agoMerge branch 'device-mapper/master'
Stephen Rothwell [Thu, 15 Nov 2012 02:50:50 +0000 (13:50 +1100)]
Merge branch 'device-mapper/master'

11 years agoMerge remote-tracking branch 'block/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 02:45:44 +0000 (13:45 +1100)]
Merge remote-tracking branch 'block/for-next'

11 years agoMerge remote-tracking branch 'cgroup/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 02:41:25 +0000 (13:41 +1100)]
Merge remote-tracking branch 'cgroup/for-next'

11 years agoMerge remote-tracking branch 'input/next'
Stephen Rothwell [Thu, 15 Nov 2012 02:39:26 +0000 (13:39 +1100)]
Merge remote-tracking branch 'input/next'

11 years agoMerge remote-tracking branch 'virtio/virtio-next'
Stephen Rothwell [Thu, 15 Nov 2012 02:37:43 +0000 (13:37 +1100)]
Merge remote-tracking branch 'virtio/virtio-next'

11 years agomemcg: fix hotplugged memory zone oops
Hugh Dickins [Thu, 15 Nov 2012 02:31:03 +0000 (13:31 +1100)]
memcg: fix hotplugged memory zone oops

When MEMCG is configured on (even when it's disabled by boot option), when
adding or removing a page to/from its lru list, the zone pointer used for
stats updates is nowadays taken from the struct lruvec.  (On many
configurations, calculating zone from page is slower.)

But we have no code to update all the lruvecs (per zone, per memcg) when a
memory node is hotadded.  Here's an extract from the oops which results
when running numactl to bind a program to a newly onlined node:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000f60
IP: [<ffffffff811870b9>] __mod_zone_page_state+0x9/0x60
PGD 0
Oops: 0000 [#1] SMP
CPU 2
Pid: 1219, comm: numactl Not tainted 3.6.0-rc5+ #180 Bochs Bochs
Process numactl (pid: 1219, threadinfo ffff880039abc000, task ffff8800383c4ce0)
Stack:
 ffff880039abdaf8 ffffffff8117390f ffff880039abdaf8 000000008167c601
 ffffffff81174162 ffff88003a480f00 0000000000000001 ffff8800395e0000
 ffff88003dbd0e80 0000000000000282 ffff880039abdb48 ffffffff81174181
Call Trace:
 [<ffffffff8117390f>] __pagevec_lru_add_fn+0xdf/0x140
 [<ffffffff81174181>] pagevec_lru_move_fn+0xb1/0x100
 [<ffffffff811741ec>] __pagevec_lru_add+0x1c/0x30
 [<ffffffff81174383>] lru_add_drain_cpu+0xa3/0x130
 [<ffffffff8117443f>] lru_add_drain+0x2f/0x40
 ...

The natural solution might be to use a memcg callback whenever memory is
hotadded; but that solution has not been scoped out, and it happens that
we do have an easy location at which to update lruvec->zone.  The lruvec
pointer is discovered either by mem_cgroup_zone_lruvec() or by
mem_cgroup_page_lruvec(), and both of those do know the right zone.

So check and set lruvec->zone in those; and remove the inadequate attempt
to set lruvec->zone from lruvec_init(), which is called before
NODE_DATA(node) has been allocated in such cases.

Ah, there was one exceptionr.  For no particularly good reason,
mem_cgroup_force_empty_list() has its own code for deciding lruvec.
Change it to use the standard mem_cgroup_zone_lruvec() and
mem_cgroup_get_lru_size() too.  In fact it was already safe against such
an oops (the lru lists in danger could only be empty), but we're better
proofed against future changes this way.

I've marked this for stable (3.6) since we introduced the problem in 3.5
(now closed to stable); but I have no idea if this is the only fix needed
to get memory hotadd working with memcg in 3.6, and received no answer
when I enquired twice before.

Reported-by: Tang Chen <tangchen@cn.fujitsu.com>
Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Wen Congyang <wency@cn.fujitsu.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agomips, arc: fix build failure
David Rientjes [Thu, 15 Nov 2012 02:31:03 +0000 (13:31 +1100)]
mips, arc: fix build failure

Using a cross-compiler to fix another issue, the following build error
occurred for mips defconfig:

arch/mips/fw/arc/misc.c: In function 'ArcHalt':
arch/mips/fw/arc/misc.c:25:2: error: implicit declaration of function 'local_irq_disable'

Fix it up by including irqflags.h.

Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agodoc: describe memcg swappiness more precisely
Michal Hocko [Thu, 15 Nov 2012 02:31:03 +0000 (13:31 +1100)]
doc: describe memcg swappiness more precisely

since fe35004f (mm: avoid swapping out with swappiness==0) memcg reclaim
stopped swapping out anon pages completely when 0 value is used.
Although this is somehow expected it hasn't been done for a really long
time this way and so it is probably better to be explicit about the
effect. Moreover global reclaim swapps out even when swappiness is 0
to prevent from OOM killer.

The original issue (a wrong tasks get killed in a small group and memcg
swappiness=0) has been reported on top of our 3.0 based kernel (with
fe35004f backported).  I have tried to replicate it by the test case
mentioned https://lkml.org/lkml/2012/10/10/223.

As David correctly pointed out (https://lkml.org/lkml/2012/10/10/418) the
significant role played the fact that all the processes in the group have
CAP_SYS_ADMIN but oom_score_adj has the similar effect.  Say there is 2G
of swap space which is 524288 pages.  If you add CAP_SYS_ADMIN bonus then
you have -15728 score for the bias.  This means that all tasks with less
than 60M get the minimum score and it is tasks ordering which determines
who gets killed as a result.

To summarize it.  Users of small groups (relatively to the swap size) with
CAP_SYS_ADMIN tasks resp.  oom_score_adj are affected the most others
might see an unexpected oom_badness calculation.  Whether this is a
workload which is representative, I don't know but I think that it is
worth fixing and pushing to stable as well.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Cc: David Rientjes <rientjes@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agomemcg: oom: fix totalpages calculation for memory.swappiness==0
Michal Hocko [Thu, 15 Nov 2012 02:31:02 +0000 (13:31 +1100)]
memcg: oom: fix totalpages calculation for memory.swappiness==0

oom_badness() takes a totalpages argument which says how many pages are
available and it uses it as a base for the score calculation.  The value
is calculated by mem_cgroup_get_limit which considers both limit and
total_swap_pages (resp.  memsw portion of it).

This is usually correct but since fe35004f ("mm: avoid swapping out with
swappiness==0") we do not swap when swappiness is 0 which means that we
cannot really use up all the totalpages pages.  This in turn confuses oom
score calculation if the memcg limit is much smaller than the available
swap because the used memory (capped by the limit) is negligible comparing
to totalpages so the resulting score is too small if adj!=0 (typically
task with CAP_SYS_ADMIN or non zero oom_score_adj).  A wrong process might
be selected as result.

The problem can be worked around by checking mem_cgroup_swappiness==0 and
not considering swap at all in such a case.

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agomm: fix build warning for uninitialized value
David Rientjes [Thu, 15 Nov 2012 02:31:02 +0000 (13:31 +1100)]
mm: fix build warning for uninitialized value

do_wp_page() sets mmun_called if mmun_start and mmun_end were initialized
and, if so, may call mmu_notifier_invalidate_range_end() with these
values.  This doesn't prevent gcc from emitting a build warning though:

mm/memory.c: In function `do_wp_page':
mm/memory.c:2530: warning: `mmun_start' may be used uninitialized in this function
mm/memory.c:2531: warning: `mmun_end' may be used uninitialized in this function

It's much easier to initialize the variables to impossible values and do a
simple comparison to determine if they were initialized to remove the bool
entirely.

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agomm: add anon_vma_lock to validate_mm()
Michel Lespinasse [Thu, 15 Nov 2012 02:31:02 +0000 (13:31 +1100)]
mm: add anon_vma_lock to validate_mm()

Iterating over the vma->anon_vma_chain without anon_vma_lock may cause
NULL ptr deref in anon_vma_interval_tree_verify(), because the node in the
chain might have been removed.

[ 1523.657950] BUG: unable to handle kernel paging request at fffffffffffffff0
[ 1523.660022] IP: [<ffffffff8122c29c>] anon_vma_interval_tree_verify+0xc/0xa0
[ 1523.660022] PGD 4e28067 PUD 4e29067 PMD 0
[ 1523.675725] Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
[ 1523.750066] CPU 0
[ 1523.750066] Pid: 9050, comm: trinity-child64 Tainted: G        W    3.7.0-rc2-next-20121025-sasha-00001-g673f98e-dirty #77
[ 1523.750066] RIP: 0010:[<ffffffff8122c29c>]  [<ffffffff8122c29c>] anon_vma_interval_tree_verify+0xc/0xa0
[ 1523.750066] RSP: 0018:ffff880045f81d48  EFLAGS: 00010296
[ 1523.750066] RAX: 0000000000000000 RBX: fffffffffffffff0 RCX: 0000000000000000
[ 1523.750066] RDX: 0000000000000000 RSI: 0000000000000001 RDI: fffffffffffffff0
[ 1523.750066] RBP: ffff880045f81d58 R08: 0000000000000000 R09: 0000000000000f14
[ 1523.750066] R10: 0000000000000f12 R11: 0000000000000000 R12: ffff8800096c8d70
[ 1523.750066] R13: ffff8800096c8d00 R14: 0000000000000000 R15: ffff8800095b45e0
[ 1523.750066] FS:  00007f7a923f3700(0000) GS:ffff880013600000(0000) knlGS:0000000000000000
[ 1523.750066] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1523.750066] CR2: fffffffffffffff0 CR3: 000000000969d000 CR4: 00000000000406f0
[ 1523.750066] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1523.750066] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 1523.750066] Process trinity-child64 (pid: 9050, threadinfo ffff880045f80000, task ffff880048eb0000)
[ 1523.750066] Stack:
[ 1523.750066]  ffff88000d7533f0 fffffffffffffff0 ffff880045f81da8 ffffffff812361d8
[ 1523.750066]  ffff880045f81d98 ffff880048ee9000 ffff8800095b4580 ffff8800095b4580
[ 1523.750066]  ffff88001d1cdb00 ffff8800095b45f0 ffff880022a4d630 ffff8800095b45e0
[ 1523.750066] Call Trace:
[ 1523.750066]  [<ffffffff812361d8>] validate_mm+0x58/0x1e0
[ 1523.750066]  [<ffffffff81236aa5>] vma_adjust+0x635/0x6b0
[ 1523.750066]  [<ffffffff81236c81>] __split_vma.isra.22+0x161/0x220
[ 1523.750066]  [<ffffffff81237934>] split_vma+0x24/0x30
[ 1523.750066]  [<ffffffff8122ce6a>] sys_madvise+0x5da/0x7b0
[ 1523.750066]  [<ffffffff811cd14c>] ? rcu_eqs_exit+0x9c/0xb0
[ 1523.750066]  [<ffffffff811802cd>] ? trace_hardirqs_on+0xd/0x10
[ 1523.750066]  [<ffffffff83aee198>] tracesys+0xe1/0xe6
[ 1523.750066] Code: 4c 09 ff 48 39 ce 77 9e f3 c3 0f 1f 44 00 00 31 c0 c3 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 53
48 89 fb 48 83 ec 08 <48> 8b 17 48 8b 8a 90 00 00 00 48 39 4f 40 74 34 80 3d f7 1f 5c
[ 1523.750066] RIP  [<ffffffff8122c29c>] anon_vma_interval_tree_verify+0xc/0xa0
[ 1523.750066]  RSP <ffff880045f81d48>
[ 1523.750066] CR2: fffffffffffffff0
[ 1523.750066] ---[ end trace e35e5fa49072faf9 ]---

Figured out by Bob Liu.

Reported-by: Sasha Levin <sasha.levin@oracle.com>
Cc: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Michel Lespinasse <walken@google.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
11 years agoMerge remote-tracking branch 'modules/modules-next'
Stephen Rothwell [Thu, 15 Nov 2012 02:30:52 +0000 (13:30 +1100)]
Merge remote-tracking branch 'modules/modules-next'

11 years agoMerge remote-tracking branch 'sound-asoc/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 02:29:03 +0000 (13:29 +1100)]
Merge remote-tracking branch 'sound-asoc/for-next'

11 years agoMerge remote-tracking branch 'sound/for-next'
Stephen Rothwell [Thu, 15 Nov 2012 02:27:11 +0000 (13:27 +1100)]
Merge remote-tracking branch 'sound/for-next'