]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agomicroblaze: no need to reset handler if SA_ONESHOT
Matt Fleming [Thu, 3 May 2012 05:43:21 +0000 (15:43 +1000)]
microblaze: no need to reset handler if SA_ONESHOT

get_signal_to_deliver() already resets the signal handler if SA_ONESHOT is
set in ka->sa.sa_flags, there's no need to do it again in handle_signal().
 Furthermore, because we were modifying ka->sa.sa_handler (which is a copy
of sighand->action[]) instead of sighand->action[] the original code
actually had no effect on signal delivery.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agomicroblaze: don't reimplement force_sigsegv()
Matt Fleming [Thu, 3 May 2012 05:43:20 +0000 (15:43 +1000)]
microblaze: don't reimplement force_sigsegv()

Instead of open coding the sequence from force_sigsegv() just call it.
This also fixes a bug because we were modifying ka->sa.sa_handler (which
is a copy of sighand->action[]), whereas the intention of the code was to
modify sighand->action[] directly.

As the original code was working with a copy it had no effect on signal
delivery.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agoia64: use set_current_blocked() and block_sigmask()
Matt Fleming [Thu, 3 May 2012 05:43:20 +0000 (15:43 +1000)]
ia64: use set_current_blocked() and block_sigmask()

As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block is
pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f28f
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate code
across architectures.  In the past some architectures got this code wrong,
so using this helper function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agotimeconst.pl: remove deprecated defined(@array)
Dagfinn Ilmari Mannsåker [Thu, 3 May 2012 05:43:20 +0000 (15:43 +1000)]
timeconst.pl: remove deprecated defined(@array)

The use of defined() on arrays and hashes has been deprecated since perl
5.6, but until 5.17.6 it only warned on lexicals, not package globals.

Signed-off-by: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agopercpu-remove-percpu_xxx-functions-fix
Andrew Morton [Thu, 3 May 2012 05:43:19 +0000 (15:43 +1000)]
percpu-remove-percpu_xxx-functions-fix

Cc: Alex Shi <alex.shi@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agopercpu: remove percpu_xxx() functions
Alex Shi [Thu, 3 May 2012 05:43:19 +0000 (15:43 +1000)]
percpu: remove percpu_xxx() functions

There are no percpu_xxx callers remaining

Signed-off-by: Alex Shi <alex.shi@intel.com>
Acked-by: Christoph Lameter <cl@gentwo.org>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agonet: use this_cpu_xxx replace percpu_xxx funcs
Alex Shi [Thu, 3 May 2012 05:43:19 +0000 (15:43 +1000)]
net: use this_cpu_xxx replace percpu_xxx funcs

percpu_xxx funcs are duplicated with this_cpu_xxx funcs, so replace them
for further code clean up.

And in preempt safe scenario, __this_cpu_xxx funcs has a bit better
performance since __this_cpu_xxx has no redundant preempt_disable()

Signed-off-by: Alex Shi <alex.shi@intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agox86: change percpu_read_stable() to this_cpu_read_stable()
Alex Shi [Thu, 3 May 2012 05:43:18 +0000 (15:43 +1000)]
x86: change percpu_read_stable() to this_cpu_read_stable()

It has no function change. It's a preparation for percpu_xxx serial
function change.

Signed-off-by: Alex Shi <alex.shi@intel.com>
Acked-by: Christoph Lameter <cl@gentwo.org>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agox86-use-this_cpu_xxx-to-replace-percpu_xxx-funcs-fix
Andrew Morton [Thu, 3 May 2012 05:43:18 +0000 (15:43 +1000)]
x86-use-this_cpu_xxx-to-replace-percpu_xxx-funcs-fix

Cc: Alex Shi <alex.shi@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agox86: use this_cpu_xxx to replace percpu_xxx funcs
Alex Shi [Thu, 3 May 2012 05:43:17 +0000 (15:43 +1000)]
x86: use this_cpu_xxx to replace percpu_xxx funcs

Since percpu_xxx() serial functions are duplicate with this_cpu_xxx().
Removing percpu_xxx() definition and replacing them by this_cpu_xxx() in
code.

And further more, as Christoph Lameter's requirement, I try to use
__this_cpu_xx to replace this_cpu_xxx if it is in preempt safe scenario.
The preempt safe scenarios include:
1, in irq/softirq/nmi handler
2, protected by preempt_disable
3, protected by spin_lock
4, if the code context imply that it is preempt safe, like the code is
follows or be followed a preempt safe code.

BTW, In fact, this_cpu_xxx are same as __this_cpu_xxx since all funcs
implement in a single instruction for x86 machine.  But it maybe other
platforms' performance.

[akpm@linux-foundation.org: fix build]
[sfr@canb.auug.org.au: arch/x86/include/asm/desc.h: fix smp_processor_id's need for this_cpu_read]
Signed-off-by: Alex Shi <alex.shi@intel.com>
Acked-by: Christoph Lameter <cl@gentwo.org>
Acked-by: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agocris: select GENERIC_ATOMIC64
Cong Wang [Thu, 3 May 2012 05:43:17 +0000 (15:43 +1000)]
cris: select GENERIC_ATOMIC64

Cris doesn't implement atomic64 operations neither, should select
GENERIC_ATOMIC64.

Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agocris: use set_current_blocked() and block_sigmask()
Matt Fleming [Thu, 3 May 2012 05:43:17 +0000 (15:43 +1000)]
cris: use set_current_blocked() and block_sigmask()

As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block is
pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f28f
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate code
across architectures.  In the past some architectures got this code wrong,
so using this helper function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Mikael Starvik <starvik@axis.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agocpuidle: add checks to avoid NULL pointer dereference
Srivatsa S. Bhat [Thu, 3 May 2012 05:43:16 +0000 (15:43 +1000)]
cpuidle: add checks to avoid NULL pointer dereference

The existing check for dev == NULL in __cpuidle_register_device() is
rendered useless because dev is dereferenced before the check itself.
Moreover, correctly speaking, it is the job of the callers of this
function, i.e., cpuidle_register_device() & cpuidle_enable_device() (which
also happen to be exported functions) to ensure that
__cpuidle_register_device() is called with a non-NULL dev.

So add the necessary dev == NULL checks in the two callers and remove the
(useless) check from __cpuidle_register_device().

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Len Brown <lenb@kernel.org>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agocpuidle: remove unused hrtimer_peek_ahead_timers() call
Sergey Senozhatsky [Thu, 3 May 2012 05:43:16 +0000 (15:43 +1000)]
cpuidle: remove unused hrtimer_peek_ahead_timers() call

 cpuidle: remove unused hrtimer_peek_ahead_timers() call

  commit 9a6558371bcd01c2973b7638181db4ccc34eab4f
  Author: Arjan van de Ven <arjan@linux.intel.com>
  Date:   Sun Nov 9 12:45:10 2008 -0800

     regression: disable timer peek-ahead for 2.6.28

     It's showing up as regressions; disabling it very likely just papers
     over an underlying issue, but time is running out for 2.6.28, lets get
     back to this for 2.6.29

 Many years has passed since 2008, so it seems ok to remove whole `#if 0' block.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Trinabh Gupta <g.trinabh@gmail.com>
Cc: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agomn10300: use set_current_blocked() and block_sigmask()
Matt Fleming [Thu, 3 May 2012 05:43:15 +0000 (15:43 +1000)]
mn10300: use set_current_blocked() and block_sigmask()

As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block is
pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f28f
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate code
across architectures.  In the past some architectures got this code wrong,
so using this helper function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agom68k: use set_current_blocked() and block_sigmask()
Matt Fleming [Thu, 3 May 2012 05:43:15 +0000 (15:43 +1000)]
m68k: use set_current_blocked() and block_sigmask()

As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block is
pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f28f
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate code
across architectures.  In the past some architectures got this code wrong,
so using this helper function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agom32r: use set_current_blocked() and block_sigmask()
Matt Fleming [Thu, 3 May 2012 05:43:15 +0000 (15:43 +1000)]
m32r: use set_current_blocked() and block_sigmask()

As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block is
pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f28f
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate code
across architectures.  In the past some architectures got this code wrong,
so using this helper function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Kyle McMartin <kyle@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agoavr32: use block_sigmask()
Matt Fleming [Thu, 3 May 2012 05:43:14 +0000 (15:43 +1000)]
avr32: use block_sigmask()

Use the new helper function introduced in commit 5e6292c0f28f ("signal:
add block_sigmask() for adding sigmask to current->blocked") which
centralises the code for updating current->blocked after successfully
delivering a signal and reduces the amount of duplicate code across
architectures.

In the past some architectures got this code wrong, so using this helper
function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Havard Skinnemoen <hskinnemoen@gmail.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agoavr32: use set_current_blocked() in handle_signal/sys_rt_sigreturn
Oleg Nesterov [Thu, 3 May 2012 05:43:14 +0000 (15:43 +1000)]
avr32: use set_current_blocked() in handle_signal/sys_rt_sigreturn

It is wrong to change ->blocked directly, see e6fa16ab.  Change
handle_signal() and sys_rt_sigreturn() to use the right helper,
set_current_blocked().

Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Acked-by: Havard Skinnemoen <hskinnemoen@gmail.com>
Reviewed-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agoavr32: don't mask signals in the error path
Matt Fleming [Thu, 3 May 2012 05:43:13 +0000 (15:43 +1000)]
avr32: don't mask signals in the error path

The current handle_signal() implementation is broken - it will mask
signals if we fail to setup the signal stack frame, which isn't the
desired behaviour, we should only be masking signals if we succeed in
setting up the stack frame.  It looks like this code was copied from the
old (broken) arm implementation but wasn't updated when the arm code was
fixed in commit a6c61e9dfdd0 ("[ARM] 3168/1: Update ARM signal delivery
and masking").

Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Acked-by: Havard Skinnemoen <hskinnemoen@gmail.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agodrivers/xen/Kconfig: fix Kconfig layout
Andrew Morton [Thu, 3 May 2012 05:43:13 +0000 (15:43 +1000)]
drivers/xen/Kconfig: fix Kconfig layout

Fit it into 80 columns so that it is readable in menuconfig.

Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agoarch/x86/kernel/apic/io_apic.c: move io_apic_level_ack_pending() inside CONFIG_GENERI...
Andrew Morton [Thu, 3 May 2012 05:43:13 +0000 (15:43 +1000)]
arch/x86/kernel/apic/io_apic.c: move io_apic_level_ack_pending() inside CONFIG_GENERIC_PENDING_IRQ

x86_64 allnoconfig:

arch/x86/kernel/apic/io_apic.c:382: warning: 'io_apic_level_ack_pending' defined but not used

Cc: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agoarch/x86/include/asm/spinlock.h: fix comment
Richard Weinberger [Thu, 3 May 2012 05:43:12 +0000 (15:43 +1000)]
arch/x86/include/asm/spinlock.h: fix comment

This comment is no longer true.  We support up to 2^16 CPUs because
__ticket_t is an u16 if NR_CPUS is larger than 256.

Signed-off-by: Richard Weinberger <richard@nod.at>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agointel_mid_powerbtn: mark irq as IRQF_NO_SUSPEND
Yong Wang [Thu, 3 May 2012 05:43:12 +0000 (15:43 +1000)]
intel_mid_powerbtn: mark irq as IRQF_NO_SUSPEND

So that the power button still wakes up the platform.

Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
Tested-by: Kangkai Yin <kangkai.yin@intel.com>
Tested-by: Yong Wang <yong.y.wang@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agoarch/x86/platform/iris/iris.c: register a platform device and a platform driver
Shérab [Thu, 3 May 2012 05:43:12 +0000 (15:43 +1000)]
arch/x86/platform/iris/iris.c: register a platform device and a platform driver

This makes the iris driver use the platform API, so it is properly exposed
in /sys.

[akpm@linux-foundation.org: remove commented-out code, add missing space to printk, clean up code layout]
Signed-off-by: Shérab <Sebastien.Hinderer@ens-lyon.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agoarch/x86/platform/geode/net5501.c: change active_low to 0 for LED driver
Bjarke Istrup Pedersen [Thu, 3 May 2012 05:43:11 +0000 (15:43 +1000)]
arch/x86/platform/geode/net5501.c: change active_low to 0 for LED driver

It seems that there was an error with the active_low = 1 for the
LED, since it should be set to 0 (meaning that active is high,
since 0 is false, hence the confusion.

The wiki article about it confuses it, since it contradicts itself,
regarding what turns on the LED.

I have tested 3.4-rc2 on my net5501 with this patch, and it makes the LED
behave correctly, where "none" turns it off, and "default-on" turns it on,
when echoed onto the trigger "file" in /sys/class/leds.

Signed-off-by: Bjarke Istrup Pedersen <gurligebis@gentoo.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agoumem: fix up unplugging
Tao Guo [Thu, 3 May 2012 05:43:11 +0000 (15:43 +1000)]
umem: fix up unplugging

Fix a regression introduced by 7eaceaccab5f40 ("block: remove per-queue
plugging").  In that patch, Jens removed the whole mm_unplug_device()
function, which used to be the trigger to make umem start to work.

We need to implement unplugging to make umem start to work, or I/O
will never be triggered.

Signed-off-by: Tao Guo <Tao.Guo@emc.com>
Cc: Neil Brown <neilb@suse.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agodrivers/leds: correct __devexit annotations
Arnd Bergmann [Thu, 3 May 2012 05:43:11 +0000 (15:43 +1000)]
drivers/leds: correct __devexit annotations

__devexit functions are discarded without CONFIG_HOTPLUG, so they need to
be referenced carefully.  A __devexit function may also not be called from
a __devinit function.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agomemcg: free spare array to avoid memory leak
Sha Zhengju [Thu, 3 May 2012 05:43:10 +0000 (15:43 +1000)]
memcg: free spare array to avoid memory leak

When the last event is unregistered, there is no need to keep the spare
array anymore.  So free it to avoid memory leak.

Signed-off-by: Sha Zhengju <handai.szj@taobao.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Reviewed-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agonamespaces, pid_ns: fix leakage on fork() failure
Mike Galbraith [Thu, 3 May 2012 05:43:10 +0000 (15:43 +1000)]
namespaces, pid_ns: fix leakage on fork() failure

Fork() failure post namespace creation for a child cloned with
CLONE_NEWPID leaks pid_namespace/mnt_cache due to proc being mounted
during creation, but not unmounted during cleanup.  Call
pid_ns_release_proc() during cleanup.

Signed-off-by: Mike Galbraith <efault@gmx.de>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Louis Rilling <louis.rilling@kerlabs.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agohugetlb: prevent BUG_ON in hugetlb_fault() -> hugetlb_cow()
Chris Metcalf [Thu, 3 May 2012 05:43:09 +0000 (15:43 +1000)]
hugetlb: prevent BUG_ON in hugetlb_fault() -> hugetlb_cow()

66aebce747eaf ("hugetlb: fix race condition in hugetlb_fault()") added
code to avoid a race condition by elevating the page refcount in
hugetlb_fault() while calling hugetlb_cow().

However, one code path in hugetlb_cow() includes an assertion that the
page count is 1, whereas it may now also have the value 2 in this path.

The consensus is that this BUG_ON has served its purpose, so rather than
extending it to cover both cases, we just remove it.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Acked-by: Hillf Danton <dhillf@gmail.com>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: <stable@vger.kernel.org> [3.0.29+, 3.2.16+, 3.3.3+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agomm: fix division by 0 in percpu_pagelist_fraction()
Sasha Levin [Thu, 3 May 2012 05:43:09 +0000 (15:43 +1000)]
mm: fix division by 0 in percpu_pagelist_fraction()

percpu_pagelist_fraction_sysctl_handler() has only considered -EINVAL as a
possible error from proc_dointvec_minmax().  If any other error is
returned, it would proceed to divide by zero since
percpu_pagelist_fraction wasn't getting initialized at any point.  For
example, writing 0 bytes into the proc file would trigger the issue.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Reviewed-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agoproc/pid/pagemap: correctly report non-present ptes and holes between vmas
Konstantin Khlebnikov [Thu, 3 May 2012 05:43:09 +0000 (15:43 +1000)]
proc/pid/pagemap: correctly report non-present ptes and holes between vmas

Reset the current pagemap-entry if the current pte isn't present, or if
current vma is over.  Otherwise pagemap reports last entry again and
again.

non-present pte reporting was broken in commit v3.3-3738-g092b50b
("pagemap: introduce data structure for pagemap entry")

reporting for holes was broken in commit v3.3-3734-g5aaabe8
("pagemap: avoid splitting thp when reading /proc/pid/pagemap")

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Reported-by: Pavel Emelyanov <xemul@parallels.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agodrivers/gpu/drm/gma500/mdfld_device.c: fix build
Andrew Morton [Thu, 3 May 2012 05:43:08 +0000 (15:43 +1000)]
drivers/gpu/drm/gma500/mdfld_device.c: fix build

drivers/gpu/drm/gma500/mdfld_device.c:675: error: expected '}' before ';' token

Repairs "cdv: continue synching up with updated reference code".

Cc: Alan Cox <alan@linux.intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agopagemap.h: fix warning about possibly used before init var
Paul Gortmaker [Thu, 3 May 2012 05:43:08 +0000 (15:43 +1000)]
pagemap.h: fix warning about possibly used before init var

Commit f56f821feb7b36223f309e0ec05986bb137ce418 (linux-next)

    "mm: extend prefault helpers to fault in more than PAGE_SIZE"

added in the new functions:

fault_in_multipages_writeable
fault_in_multipages_readable

However, we currently see:

  include/linux/pagemap.h:492: warning: 'ret' may be used uninitialized in this function
  include/linux/pagemap.h:492: note: 'ret' was declared here

Unlike a lot of gcc nags, this one appears somewhat legit.  i.e.  passing
in an invalid negative value of "size" does make it look like all the
conditionals in there would be bypassed and the uninitialized value would
be returned.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agoMerge remote-tracking branch 'dma-mapping/dma-mapping-next'
Stephen Rothwell [Thu, 3 May 2012 05:29:14 +0000 (15:29 +1000)]
Merge remote-tracking branch 'dma-mapping/dma-mapping-next'

Conflicts:
arch/x86/include/asm/dma-mapping.h

12 years agoMerge remote-tracking branch 'ep93xx/ep93xx-cleanup'
Stephen Rothwell [Thu, 3 May 2012 05:27:39 +0000 (15:27 +1000)]
Merge remote-tracking branch 'ep93xx/ep93xx-cleanup'

12 years agoMerge remote-tracking branch 'arm-soc/for-next'
Stephen Rothwell [Thu, 3 May 2012 05:26:10 +0000 (15:26 +1000)]
Merge remote-tracking branch 'arm-soc/for-next'

Conflicts:
arch/arm/mach-ixp2000/enp2611.c
arch/arm/mach-ixp2000/include/mach/platform.h
arch/arm/mach-ixp2000/ixdp2400.c
arch/arm/mach-ixp2000/ixdp2800.c
arch/arm/mach-ixp2000/ixdp2x01.c
arch/arm/mach-ixp2000/pci.c
arch/arm/mach-ixp23xx/include/mach/platform.h
arch/arm/mach-ixp23xx/ixdp2351.c
arch/arm/mach-ixp23xx/pci.c
arch/arm/mach-ixp23xx/roadrunner.c
arch/arm/mach-lpc32xx/common.c
drivers/mfd/ab5500-core.c
lib/Makefile

12 years agoMerge remote-tracking branch 'gpio/gpio/next'
Stephen Rothwell [Thu, 3 May 2012 05:12:03 +0000 (15:12 +1000)]
Merge remote-tracking branch 'gpio/gpio/next'

12 years agoMerge remote-tracking branch 'modem-shm/for-next'
Stephen Rothwell [Thu, 3 May 2012 05:10:27 +0000 (15:10 +1000)]
Merge remote-tracking branch 'modem-shm/for-next'

Conflicts:
drivers/Kconfig

12 years agoMerge remote-tracking branch 'vhost/linux-next'
Stephen Rothwell [Thu, 3 May 2012 05:03:02 +0000 (15:03 +1000)]
Merge remote-tracking branch 'vhost/linux-next'

Conflicts:
drivers/net/virtio_net.c

12 years agoMerge remote-tracking branch 'moduleh/for-sfr'
Stephen Rothwell [Thu, 3 May 2012 05:02:57 +0000 (15:02 +1000)]
Merge remote-tracking branch 'moduleh/for-sfr'

12 years agoMerge remote-tracking branch 'tegra/for-next'
Stephen Rothwell [Thu, 3 May 2012 05:01:28 +0000 (15:01 +1000)]
Merge remote-tracking branch 'tegra/for-next'

12 years agoMerge remote-tracking branch 'pinctrl/for-next'
Stephen Rothwell [Thu, 3 May 2012 04:58:53 +0000 (14:58 +1000)]
Merge remote-tracking branch 'pinctrl/for-next'

Conflicts:
Documentation/driver-model/devres.txt
drivers/pinctrl/core.c

12 years agoMerge remote-tracking branch 'writeback/writeback-for-next'
Stephen Rothwell [Thu, 3 May 2012 04:56:11 +0000 (14:56 +1000)]
Merge remote-tracking branch 'writeback/writeback-for-next'

12 years agoMerge remote-tracking branch 'tmem/linux-next'
Stephen Rothwell [Thu, 3 May 2012 04:54:19 +0000 (14:54 +1000)]
Merge remote-tracking branch 'tmem/linux-next'

12 years agoMerge remote-tracking branch 'char-misc/char-misc-next'
Stephen Rothwell [Thu, 3 May 2012 04:52:51 +0000 (14:52 +1000)]
Merge remote-tracking branch 'char-misc/char-misc-next'

12 years agoMerge remote-tracking branch 'staging/staging-next'
Stephen Rothwell [Thu, 3 May 2012 04:51:10 +0000 (14:51 +1000)]
Merge remote-tracking branch 'staging/staging-next'

Conflicts:
drivers/Kconfig
drivers/Makefile
drivers/staging/android/Kconfig
drivers/staging/android/Makefile
drivers/staging/line6/driver.c

12 years agoMerge remote-tracking branch 'usb/usb-next'
Stephen Rothwell [Thu, 3 May 2012 04:44:57 +0000 (14:44 +1000)]
Merge remote-tracking branch 'usb/usb-next'

Conflicts:
drivers/input/tablet/wacom_wac.c
drivers/usb/core/inode.c
drivers/usb/host/ehci-tegra.c

12 years agoMerge remote-tracking branch 'tty/tty-next'
Stephen Rothwell [Thu, 3 May 2012 04:32:55 +0000 (14:32 +1000)]
Merge remote-tracking branch 'tty/tty-next'

12 years agoMerge remote-tracking branch 'driver-core/driver-core-next'
Stephen Rothwell [Thu, 3 May 2012 04:26:01 +0000 (14:26 +1000)]
Merge remote-tracking branch 'driver-core/driver-core-next'

12 years agoMerge remote-tracking branch 'regmap/for-next'
Stephen Rothwell [Thu, 3 May 2012 04:24:22 +0000 (14:24 +1000)]
Merge remote-tracking branch 'regmap/for-next'

Conflicts:
drivers/base/regmap/regmap.c

12 years agoMerge remote-tracking branch 'drivers-x86/linux-next'
Stephen Rothwell [Thu, 3 May 2012 04:24:12 +0000 (14:24 +1000)]
Merge remote-tracking branch 'drivers-x86/linux-next'

12 years agoMerge remote-tracking branch 'workqueues/for-next'
Stephen Rothwell [Thu, 3 May 2012 04:22:47 +0000 (14:22 +1000)]
Merge remote-tracking branch 'workqueues/for-next'

12 years agoMerge remote-tracking branch 'percpu/for-next'
Stephen Rothwell [Thu, 3 May 2012 04:21:18 +0000 (14:21 +1000)]
Merge remote-tracking branch 'percpu/for-next'

12 years agoMerge remote-tracking branch 'xen-two/linux-next'
Stephen Rothwell [Thu, 3 May 2012 04:19:12 +0000 (14:19 +1000)]
Merge remote-tracking branch 'xen-two/linux-next'

12 years agoMerge remote-tracking branch 'kvm-ppc/kvm-ppc-next'
Stephen Rothwell [Thu, 3 May 2012 04:16:40 +0000 (14:16 +1000)]
Merge remote-tracking branch 'kvm-ppc/kvm-ppc-next'

12 years agoMerge remote-tracking branch 'kvm/linux-next'
Stephen Rothwell [Thu, 3 May 2012 04:09:44 +0000 (14:09 +1000)]
Merge remote-tracking branch 'kvm/linux-next'

Conflicts:
Documentation/feature-removal-schedule.txt

12 years agoMerge remote-tracking branch 'kmemleak/kmemleak'
Stephen Rothwell [Thu, 3 May 2012 04:08:15 +0000 (14:08 +1000)]
Merge remote-tracking branch 'kmemleak/kmemleak'

12 years agoMerge remote-tracking branch 'rcu/rcu/next'
Stephen Rothwell [Thu, 3 May 2012 04:01:16 +0000 (14:01 +1000)]
Merge remote-tracking branch 'rcu/rcu/next'

12 years agoMerge remote-tracking branch 'tip/auto-latest'
Stephen Rothwell [Thu, 3 May 2012 03:54:14 +0000 (13:54 +1000)]
Merge remote-tracking branch 'tip/auto-latest'

Conflicts:
arch/x86/Kconfig

12 years agoMerge remote-tracking branch 'spi/spi/next'
Stephen Rothwell [Thu, 3 May 2012 03:52:36 +0000 (13:52 +1000)]
Merge remote-tracking branch 'spi/spi/next'

12 years agoMerge remote-tracking branch 'edac-amd/for-next'
Stephen Rothwell [Thu, 3 May 2012 03:52:29 +0000 (13:52 +1000)]
Merge remote-tracking branch 'edac-amd/for-next'

12 years agoMerge remote-tracking branch 'fsnotify/for-next'
Stephen Rothwell [Thu, 3 May 2012 03:50:55 +0000 (13:50 +1000)]
Merge remote-tracking branch 'fsnotify/for-next'

12 years agoMerge remote-tracking branch 'pm/linux-next'
Stephen Rothwell [Thu, 3 May 2012 03:43:59 +0000 (13:43 +1000)]
Merge remote-tracking branch 'pm/linux-next'

12 years agoMerge remote-tracking branch 'trivial/for-next'
Stephen Rothwell [Thu, 3 May 2012 03:37:01 +0000 (13:37 +1000)]
Merge remote-tracking branch 'trivial/for-next'

Conflicts:
sound/soc/imx/Kconfig

12 years agoMerge remote-tracking branch 'iommu/next'
Stephen Rothwell [Thu, 3 May 2012 03:23:04 +0000 (13:23 +1000)]
Merge remote-tracking branch 'iommu/next'

12 years agoMerge remote-tracking branch 'watchdog/master'
Stephen Rothwell [Thu, 3 May 2012 03:21:34 +0000 (13:21 +1000)]
Merge remote-tracking branch 'watchdog/master'

12 years agoMerge remote-tracking branch 'selinux/master'
Stephen Rothwell [Thu, 3 May 2012 03:18:49 +0000 (13:18 +1000)]
Merge remote-tracking branch 'selinux/master'

12 years agoMerge remote-tracking branch 'security/next'
Stephen Rothwell [Thu, 3 May 2012 03:12:24 +0000 (13:12 +1000)]
Merge remote-tracking branch 'security/next'

Conflicts:
include/linux/filter.h

12 years agoMerge remote-tracking branch 'regulator/for-next'
Stephen Rothwell [Thu, 3 May 2012 03:10:56 +0000 (13:10 +1000)]
Merge remote-tracking branch 'regulator/for-next'

12 years agoMerge remote-tracking branch 'fbdev/fbdev-next'
Stephen Rothwell [Thu, 3 May 2012 03:08:58 +0000 (13:08 +1000)]
Merge remote-tracking branch 'fbdev/fbdev-next'

12 years agoMerge remote-tracking branch 'drm/drm-next'
Stephen Rothwell [Thu, 3 May 2012 03:05:52 +0000 (13:05 +1000)]
Merge remote-tracking branch 'drm/drm-next'

Conflicts:
drivers/gpu/drm/i915/intel_display.c

12 years agoMerge remote-tracking branch 'mfd/for-next'
Stephen Rothwell [Thu, 3 May 2012 02:09:50 +0000 (12:09 +1000)]
Merge remote-tracking branch 'mfd/for-next'

12 years agoMerge remote-tracking branch 'md/for-next'
Stephen Rothwell [Thu, 3 May 2012 02:03:56 +0000 (12:03 +1000)]
Merge remote-tracking branch 'md/for-next'

12 years agoMerge remote-tracking branch 'slab/for-next'
Stephen Rothwell [Thu, 3 May 2012 01:57:21 +0000 (11:57 +1000)]
Merge remote-tracking branch 'slab/for-next'

12 years agoMerge remote-tracking branch 'mmc/mmc-next'
Stephen Rothwell [Thu, 3 May 2012 01:55:48 +0000 (11:55 +1000)]
Merge remote-tracking branch 'mmc/mmc-next'

12 years agoMerge branch 'quilt/device-mapper'
Stephen Rothwell [Thu, 3 May 2012 01:54:08 +0000 (11:54 +1000)]
Merge branch 'quilt/device-mapper'

12 years agoMerge remote-tracking branch 'block/for-next'
Stephen Rothwell [Thu, 3 May 2012 01:47:54 +0000 (11:47 +1000)]
Merge remote-tracking branch 'block/for-next'

Conflicts:
Documentation/feature-removal-schedule.txt

12 years agoMerge remote-tracking branch 'cgroup/for-next'
Stephen Rothwell [Thu, 3 May 2012 01:43:53 +0000 (11:43 +1000)]
Merge remote-tracking branch 'cgroup/for-next'

Conflicts:
Documentation/feature-removal-schedule.txt

12 years agoMerge remote-tracking branch 'input/next'
Stephen Rothwell [Thu, 3 May 2012 01:42:18 +0000 (11:42 +1000)]
Merge remote-tracking branch 'input/next'

12 years agoMerge branch 'quilt/rr'
Stephen Rothwell [Thu, 3 May 2012 01:40:46 +0000 (11:40 +1000)]
Merge branch 'quilt/rr'

Conflicts:
arch/arm/kernel/kprobes.c
arch/arm/kernel/smp.c
drivers/virtio/virtio_balloon.c
init/main.c

12 years agoMerge remote-tracking branch 'sound-asoc/for-next'
Stephen Rothwell [Thu, 3 May 2012 01:39:10 +0000 (11:39 +1000)]
Merge remote-tracking branch 'sound-asoc/for-next'

12 years agoMerge remote-tracking branch 'sound/for-next'
Stephen Rothwell [Thu, 3 May 2012 01:37:16 +0000 (11:37 +1000)]
Merge remote-tracking branch 'sound/for-next'

12 years agoMerge remote-tracking branch 'crypto/master'
Stephen Rothwell [Thu, 3 May 2012 01:35:48 +0000 (11:35 +1000)]
Merge remote-tracking branch 'crypto/master'

12 years agoMerge remote-tracking branch 'l2-mtd/master'
Stephen Rothwell [Thu, 3 May 2012 01:34:18 +0000 (11:34 +1000)]
Merge remote-tracking branch 'l2-mtd/master'

12 years agoMerge remote-tracking branch 'bluetooth/master'
Stephen Rothwell [Thu, 3 May 2012 01:32:47 +0000 (11:32 +1000)]
Merge remote-tracking branch 'bluetooth/master'

12 years agoMerge remote-tracking branch 'wireless-next/master'
Stephen Rothwell [Thu, 3 May 2012 01:31:01 +0000 (11:31 +1000)]
Merge remote-tracking branch 'wireless-next/master'

Conflicts:
net/wireless/nl80211.c

12 years agoMerge remote-tracking branch 'net-next/master'
Stephen Rothwell [Thu, 3 May 2012 01:11:08 +0000 (11:11 +1000)]
Merge remote-tracking branch 'net-next/master'

Conflicts:
drivers/net/ethernet/emulex/benet/be.h
drivers/net/ethernet/intel/e1000e/param.c

12 years agoMerge remote-tracking branch 'slave-dma/next'
Stephen Rothwell [Thu, 3 May 2012 01:09:37 +0000 (11:09 +1000)]
Merge remote-tracking branch 'slave-dma/next'

12 years agoMerge remote-tracking branch 'isci/all'
Stephen Rothwell [Thu, 3 May 2012 01:07:58 +0000 (11:07 +1000)]
Merge remote-tracking branch 'isci/all'

Conflicts:
drivers/scsi/libsas/sas_discover.c
include/scsi/libsas.h

12 years agoMerge remote-tracking branch 'target-merge/for-next-merge'
Stephen Rothwell [Thu, 3 May 2012 01:06:24 +0000 (11:06 +1000)]
Merge remote-tracking branch 'target-merge/for-next-merge'

12 years agoMerge remote-tracking branch 'target-updates/for-next'
Stephen Rothwell [Thu, 3 May 2012 01:04:56 +0000 (11:04 +1000)]
Merge remote-tracking branch 'target-updates/for-next'

12 years agoMerge remote-tracking branch 'scsi/for-next'
Stephen Rothwell [Thu, 3 May 2012 01:03:22 +0000 (11:03 +1000)]
Merge remote-tracking branch 'scsi/for-next'

12 years agoMerge remote-tracking branch 'dlm/next'
Stephen Rothwell [Thu, 3 May 2012 01:01:50 +0000 (11:01 +1000)]
Merge remote-tracking branch 'dlm/next'

12 years agoMerge remote-tracking branch 'ieee1394/for-next'
Stephen Rothwell [Thu, 3 May 2012 01:00:20 +0000 (11:00 +1000)]
Merge remote-tracking branch 'ieee1394/for-next'

12 years agoMerge remote-tracking branch 'infiniband/for-next'
Stephen Rothwell [Thu, 3 May 2012 00:58:31 +0000 (10:58 +1000)]
Merge remote-tracking branch 'infiniband/for-next'

12 years agoMerge remote-tracking branch 'kconfig/for-next'
Stephen Rothwell [Thu, 3 May 2012 00:58:25 +0000 (10:58 +1000)]
Merge remote-tracking branch 'kconfig/for-next'

12 years agoMerge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Thu, 3 May 2012 00:58:21 +0000 (10:58 +1000)]
Merge remote-tracking branch 'kbuild/for-next'

12 years agoMerge remote-tracking branch 'v4l-dvb/master'
Stephen Rothwell [Thu, 3 May 2012 00:56:36 +0000 (10:56 +1000)]
Merge remote-tracking branch 'v4l-dvb/master'

Conflicts:
drivers/usb/gadget/uvc_queue.c