memory hotplug: reset pgdat->kswapd to NULL if creating kernel thread fails
If kthread_run() fails, pgdat->kswapd contains errno. When we stop this
thread, we only check whether pgdat->kswapd is NULL and access it. If it
contains errno, it will cause page fault. Reset pgdat->kswapd to NULL
when creating kernel thread fails can avoid this problem.
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Reviewed-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Olof Johansson [Mon, 17 Sep 2012 03:16:01 +0000 (20:16 -0700)]
Merge branch 'next/cleanup' into for-next
* next/cleanup: (218 commits)
ARM: OMAP1: Move SoC specific headers from plat to mach for omap1
ARM: OMAP2+ Move SoC specific headers to be local to mach-omap2
ARM: OMAP: Split plat/hardware.h, use local soc.h for omap2+
ARM: OMAP: Remove unused old gpio-switch.h
ARM: OMAP1: Move plat/irqs.h to mach/irqs.h
ARM: OMAP2+: Remove hardcoded IRQs and enable SPARSE_IRQ
ARM: OMAP2+: Prepare for irqs.h removal
W1: OMAP HDQ1W: Remove dependencies to mach/hardware.h
Input: omap-keypad: Remove dependencies to mach includes
ARM: OMAP: Move gpio.h to include/linux/platform_data
ARM: OMAP2+: Remove hardcoded twl4030 gpio_base, irq_base and irq_end
ARM: OMAP2+: Remove unused nand_irq for GPMC
ARM: OMAP2+: Make INTCPS_NR_IRQS local for mach-omap2/irq.c
ARM: OMAP1: Define OMAP1_INT_I2C locally
ARM: OMAP1: Move define of OMAP_LCD_DMA to dma.h
ARM: OMAP: unwrap strings
ARM: OMAP: clean up some smatch warnings, fix some printk(KERN_ERR ...
ARM: OMAP2+: clean up PRCM sections of the Makefile
ARM: OMAP2+: clean up OMAP clock Makefile sections
ARM: OMAP2+: clean up OMAP4 PRM & sleep build directives in Makefile
...
Olof Johansson [Mon, 17 Sep 2012 03:08:01 +0000 (20:08 -0700)]
Merge tag 'omap-cleanup-makefile-sparse-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup
From Tony Lindgren:
From Paul Walmsley <paul@pwsan.com>:
Clean up and standardize several parts of
arch/arm/mach-omap2/Makefile. Beyond readability and diffstat
improvements, the series should reduce the risk of conflicts during
future cleanups by ensuring related lines are in the same section of the
Makefile.
smatch and string-wrapping cleanups for the OMAP subarch code.
These changes fix some of the more meaningful warnings that smatch
returns for the OMAP subarch code, and unwraps strings that are
wrapped at the 80-column boundary, to conform with the current
practice.
* tag 'omap-cleanup-makefile-sparse-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: OMAP: unwrap strings
ARM: OMAP: clean up some smatch warnings, fix some printk(KERN_ERR ...
ARM: OMAP2+: clean up PRCM sections of the Makefile
ARM: OMAP2+: clean up OMAP clock Makefile sections
ARM: OMAP2+: clean up OMAP4 PRM & sleep build directives in Makefile
ARM: OMAP2+: move MPU INTCPS, secure monitor, SDRC build directives in Makefile
ARM: OMAP2+: clean up omap_hwmod.o build directives in Makefile
ARM: OMAP2+: clean up whitespace in Makefile
Olof Johansson [Mon, 17 Sep 2012 03:05:06 +0000 (20:05 -0700)]
Merge tag 'omap-cleanup-sparseirq-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup
From Tony Lindgren:
This branch contains changes needed to make omap2+
work properly with sparse IRQ. It also removes
dependencies to mach/hardware.h. These help moving
things towards ARM single zImage support.
This branch is based on a commit in tty-next
branch with omap-devel-gpmc-fixed-for-v3.7 and
cleanup-omap-tags-for-v3.7 merged in to keep things
compiling and sort out some merge conflicts.
* tag 'omap-cleanup-sparseirq-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: OMAP1: Move SoC specific headers from plat to mach for omap1
ARM: OMAP2+ Move SoC specific headers to be local to mach-omap2
ARM: OMAP: Split plat/hardware.h, use local soc.h for omap2+
ARM: OMAP: Remove unused old gpio-switch.h
ARM: OMAP1: Move plat/irqs.h to mach/irqs.h
ARM: OMAP2+: Remove hardcoded IRQs and enable SPARSE_IRQ
ARM: OMAP2+: Prepare for irqs.h removal
W1: OMAP HDQ1W: Remove dependencies to mach/hardware.h
Input: omap-keypad: Remove dependencies to mach includes
ARM: OMAP: Move gpio.h to include/linux/platform_data
ARM: OMAP2+: Remove hardcoded twl4030 gpio_base, irq_base and irq_end
ARM: OMAP2+: Remove unused nand_irq for GPMC
ARM: OMAP2+: Make INTCPS_NR_IRQS local for mach-omap2/irq.c
ARM: OMAP1: Define OMAP1_INT_I2C locally
ARM: OMAP1: Move define of OMAP_LCD_DMA to dma.h
Olof Johansson [Mon, 17 Sep 2012 03:03:42 +0000 (20:03 -0700)]
Merge branch 'depends/tty-omap-serial' into next/cleanup
This part of the tty tree (unfortunately with all the preceding patches
as well) is a dependency for some of the OMAP cleanups, so we've pulled
it in as a dependency based on agreement with Greg.
Olof Johansson [Mon, 17 Sep 2012 02:50:31 +0000 (19:50 -0700)]
Merge branch 'next/soc' into for-next
* next/soc:
ARM: OMAP: omap_device: idle devices with no driver bound
ARM: OMAP: omap_device: don't attempt late suspend if no driver bound
ARM: OMAP: omap_device: keep track of driver bound status