]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agomicroblaze: use set_current_blocked() and block_sigmask()
Matt Fleming [Wed, 25 Apr 2012 01:03:21 +0000 (11:03 +1000)]
microblaze: 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: 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: fix signal masking
Matt Fleming [Wed, 25 Apr 2012 01:03:20 +0000 (11:03 +1000)]
microblaze: fix signal masking

There are a couple of problems with the current signal code,

1. If we failed to setup the signal stack frame then we should not be
   masking any signals.

2. ka->sa.sa_mask is only added to the current blocked signals list if
   SA_NODEFER is set in ka->sa.sa_flags.  If we successfully setup the
   signal frame and are going to run the handler then we must honour
   sa_mask.

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: no need to reset handler if SA_ONESHOT
Matt Fleming [Wed, 25 Apr 2012 01:03:20 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:20 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:19 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:19 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:18 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:17 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:17 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:17 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:16 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:16 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:16 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:15 +0000 (11:03 +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: remove unused hrtimer_peek_ahead_timers() call
Sergey Senozhatsky [Wed, 25 Apr 2012 01:03:15 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:14 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:14 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:14 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:13 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:13 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:13 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:12 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:11 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:11 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:11 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:10 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:10 +0000 (11:03 +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 [Wed, 25 Apr 2012 01:03:09 +0000 (11:03 +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 agomm: set task exit code before complete_vfork_done()
Konstantin Khlebnikov [Wed, 25 Apr 2012 01:03:05 +0000 (11:03 +1000)]
mm: set task exit code before complete_vfork_done()

kthread_stop() uses task->vfork_done for synchronization.  The exiting
kthread shouldn't do complete_vfork_done() until it sets ->exit_code.

fix for mm-correctly-synchronize-rss-counters-at-exit-exec.patch

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agomm-correctly-synchronize-rss-counters-at-exit-exec-fix
Andrew Morton [Wed, 25 Apr 2012 01:03:05 +0000 (11:03 +1000)]
mm-correctly-synchronize-rss-counters-at-exit-exec-fix

tweak comment

Cc: Hugh Dickins <hughd@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agomm: correctly synchronize rss-counters at exit/exec
Konstantin Khlebnikov [Wed, 25 Apr 2012 01:02:57 +0000 (11:02 +1000)]
mm: correctly synchronize rss-counters at exit/exec

mm->rss_stat counters have per-task delta: task->rss_stat.  Before
changing task->mm pointer the kernel must flush this delta with
sync_mm_rss().

do_exit() already calls sync_mm_rss() to flush the rss-counters before
committing the rss statistics into task->signal->maxrss, taskstats, audit
and other stuff.  Unfortunately the kernel does this before calling
mm_release(), which can call put_user() for processing
task->clear_child_tid.  So at this point we can trigger page-faults and
task->rss_stat becomes non-zero again.  As a result mm->rss_stat becomes
inconsistent and check_mm() will print something like this:

| BUG: Bad rss-counter state mm:ffff88020813c380 idx:1 val:-1
| BUG: Bad rss-counter state mm:ffff88020813c380 idx:2 val:1

This patch moves sync_mm_rss() into mm_release(), and moves mm_release()
out of do_exit() and calls it earlier.  After mm_release() there should be
no pagefaults.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Hugh Dickins <hughd@google.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Oleg Nesterov <oleg@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 [Wed, 25 Apr 2012 01:02:37 +0000 (11:02 +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 [Mon, 30 Apr 2012 04:58:41 +0000 (14:58 +1000)]
Merge remote-tracking branch 'dma-mapping/dma-mapping-next'

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

12 years agoMerge remote-tracking branch 'arm-soc/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 04:57:06 +0000 (14:57 +1000)]
Merge remote-tracking branch 'arm-soc/for-next'

Conflicts:
arch/arm/mach-lpc32xx/common.c

12 years agoMerge remote-tracking branch 'gpio/gpio/next'
Stephen Rothwell [Mon, 30 Apr 2012 04:55:33 +0000 (14:55 +1000)]
Merge remote-tracking branch 'gpio/gpio/next'

12 years agoMerge remote-tracking branch 'modem-shm/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 04:53:56 +0000 (14:53 +1000)]
Merge remote-tracking branch 'modem-shm/for-next'

Conflicts:
drivers/Kconfig

12 years agoMerge remote-tracking branch 'vhost/linux-next'
Stephen Rothwell [Mon, 30 Apr 2012 04:47:55 +0000 (14:47 +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 [Mon, 30 Apr 2012 04:47:51 +0000 (14:47 +1000)]
Merge remote-tracking branch 'moduleh/for-sfr'

12 years agoMerge remote-tracking branch 'tegra/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 04:46:20 +0000 (14:46 +1000)]
Merge remote-tracking branch 'tegra/for-next'

12 years agoMerge remote-tracking branch 'pinctrl/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 04:43:48 +0000 (14:43 +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 [Mon, 30 Apr 2012 04:41:06 +0000 (14:41 +1000)]
Merge remote-tracking branch 'writeback/writeback-for-next'

12 years agoMerge remote-tracking branch 'tmem/linux-next'
Stephen Rothwell [Mon, 30 Apr 2012 04:39:11 +0000 (14:39 +1000)]
Merge remote-tracking branch 'tmem/linux-next'

12 years agoMerge remote-tracking branch 'char-misc/char-misc-next'
Stephen Rothwell [Mon, 30 Apr 2012 04:37:42 +0000 (14:37 +1000)]
Merge remote-tracking branch 'char-misc/char-misc-next'

12 years agoMerge remote-tracking branch 'staging/staging-next'
Stephen Rothwell [Mon, 30 Apr 2012 04:35:59 +0000 (14:35 +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
drivers/staging/vt6656/ioctl.c

12 years agoMerge remote-tracking branch 'usb/usb-next'
Stephen Rothwell [Mon, 30 Apr 2012 04:34:04 +0000 (14:34 +1000)]
Merge remote-tracking branch 'usb/usb-next'

12 years agoMerge remote-tracking branch 'tty/tty-next'
Stephen Rothwell [Mon, 30 Apr 2012 04:32:07 +0000 (14:32 +1000)]
Merge remote-tracking branch 'tty/tty-next'

12 years agoMerge remote-tracking branch 'driver-core/driver-core-next'
Stephen Rothwell [Mon, 30 Apr 2012 04:30:39 +0000 (14:30 +1000)]
Merge remote-tracking branch 'driver-core/driver-core-next'

12 years agoMerge remote-tracking branch 'regmap/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 04:30:33 +0000 (14:30 +1000)]
Merge remote-tracking branch 'regmap/for-next'

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

12 years agoMerge remote-tracking branch 'workqueues/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 04:28:57 +0000 (14:28 +1000)]
Merge remote-tracking branch 'workqueues/for-next'

12 years agoMerge remote-tracking branch 'percpu/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 04:27:31 +0000 (14:27 +1000)]
Merge remote-tracking branch 'percpu/for-next'

12 years agoMerge remote-tracking branch 'xen-two/linux-next'
Stephen Rothwell [Mon, 30 Apr 2012 04:25:33 +0000 (14:25 +1000)]
Merge remote-tracking branch 'xen-two/linux-next'

12 years agoMerge remote-tracking branch 'kvm-ppc/kvm-ppc-next'
Stephen Rothwell [Mon, 30 Apr 2012 04:22:59 +0000 (14:22 +1000)]
Merge remote-tracking branch 'kvm-ppc/kvm-ppc-next'

12 years agoMerge remote-tracking branch 'kvm/linux-next'
Stephen Rothwell [Mon, 30 Apr 2012 04:16:01 +0000 (14:16 +1000)]
Merge remote-tracking branch 'kvm/linux-next'

Conflicts:
Documentation/feature-removal-schedule.txt

12 years agoMerge remote-tracking branch 'kmemleak/kmemleak'
Stephen Rothwell [Mon, 30 Apr 2012 04:14:34 +0000 (14:14 +1000)]
Merge remote-tracking branch 'kmemleak/kmemleak'

12 years agoMerge remote-tracking branch 'rcu/rcu/next'
Stephen Rothwell [Mon, 30 Apr 2012 04:07:36 +0000 (14:07 +1000)]
Merge remote-tracking branch 'rcu/rcu/next'

12 years agoMerge remote-tracking branch 'tip/auto-latest'
Stephen Rothwell [Mon, 30 Apr 2012 04:00:33 +0000 (14:00 +1000)]
Merge remote-tracking branch 'tip/auto-latest'

Conflicts:
arch/x86/Kconfig

12 years agoMerge remote-tracking branch 'spi/spi/next'
Stephen Rothwell [Mon, 30 Apr 2012 03:58:57 +0000 (13:58 +1000)]
Merge remote-tracking branch 'spi/spi/next'

12 years agoMerge remote-tracking branch 'edac-amd/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 03:58:51 +0000 (13:58 +1000)]
Merge remote-tracking branch 'edac-amd/for-next'

12 years agoMerge remote-tracking branch 'fsnotify/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 03:57:17 +0000 (13:57 +1000)]
Merge remote-tracking branch 'fsnotify/for-next'

12 years agoMerge remote-tracking branch 'pm/linux-next'
Stephen Rothwell [Mon, 30 Apr 2012 03:50:23 +0000 (13:50 +1000)]
Merge remote-tracking branch 'pm/linux-next'

12 years agoMerge remote-tracking branch 'trivial/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 03:43:27 +0000 (13:43 +1000)]
Merge remote-tracking branch 'trivial/for-next'

Conflicts:
sound/soc/imx/Kconfig

12 years agoMerge remote-tracking branch 'iommu/next'
Stephen Rothwell [Mon, 30 Apr 2012 03:35:18 +0000 (13:35 +1000)]
Merge remote-tracking branch 'iommu/next'

12 years agoMerge remote-tracking branch 'selinux/master'
Stephen Rothwell [Mon, 30 Apr 2012 03:32:30 +0000 (13:32 +1000)]
Merge remote-tracking branch 'selinux/master'

12 years agoMerge remote-tracking branch 'security/next'
Stephen Rothwell [Mon, 30 Apr 2012 03:26:05 +0000 (13:26 +1000)]
Merge remote-tracking branch 'security/next'

Conflicts:
include/linux/filter.h

12 years agoMerge remote-tracking branch 'regulator/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 03:24:36 +0000 (13:24 +1000)]
Merge remote-tracking branch 'regulator/for-next'

12 years agoMerge remote-tracking branch 'fbdev/fbdev-next'
Stephen Rothwell [Mon, 30 Apr 2012 03:22:37 +0000 (13:22 +1000)]
Merge remote-tracking branch 'fbdev/fbdev-next'

12 years agoMerge commit 'refs/next/20120427/drm'
Stephen Rothwell [Mon, 30 Apr 2012 03:20:46 +0000 (13:20 +1000)]
Merge commit 'refs/next/20120427/drm'

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

12 years agoMerge remote-tracking branch 'mfd/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 03:07:57 +0000 (13:07 +1000)]
Merge remote-tracking branch 'mfd/for-next'

Conflicts:
drivers/mfd/asic3.c

12 years agoMerge remote-tracking branch 'md/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 03:02:01 +0000 (13:02 +1000)]
Merge remote-tracking branch 'md/for-next'

12 years agoMerge remote-tracking branch 'slab/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 02:55:29 +0000 (12:55 +1000)]
Merge remote-tracking branch 'slab/for-next'

12 years agoMerge remote-tracking branch 'mmc/mmc-next'
Stephen Rothwell [Mon, 30 Apr 2012 02:54:00 +0000 (12:54 +1000)]
Merge remote-tracking branch 'mmc/mmc-next'

12 years agoMerge branch 'quilt/device-mapper'
Stephen Rothwell [Mon, 30 Apr 2012 02:52:24 +0000 (12:52 +1000)]
Merge branch 'quilt/device-mapper'

12 years agoMerge remote-tracking branch 'block/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 02:46:07 +0000 (12:46 +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 [Mon, 30 Apr 2012 02:42:07 +0000 (12:42 +1000)]
Merge remote-tracking branch 'cgroup/for-next'

Conflicts:
Documentation/feature-removal-schedule.txt

12 years agoMerge remote-tracking branch 'input/next'
Stephen Rothwell [Mon, 30 Apr 2012 02:40:33 +0000 (12:40 +1000)]
Merge remote-tracking branch 'input/next'

12 years agoMerge branch 'quilt/rr'
Stephen Rothwell [Mon, 30 Apr 2012 02:39:06 +0000 (12:39 +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 [Mon, 30 Apr 2012 02:07:02 +0000 (12:07 +1000)]
Merge remote-tracking branch 'sound-asoc/for-next'

12 years agoMerge remote-tracking branch 'sound/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 02:05:10 +0000 (12:05 +1000)]
Merge remote-tracking branch 'sound/for-next'

12 years agoMerge remote-tracking branch 'crypto/master'
Stephen Rothwell [Mon, 30 Apr 2012 02:03:43 +0000 (12:03 +1000)]
Merge remote-tracking branch 'crypto/master'

12 years agoMerge remote-tracking branch 'l2-mtd/master'
Stephen Rothwell [Mon, 30 Apr 2012 02:02:13 +0000 (12:02 +1000)]
Merge remote-tracking branch 'l2-mtd/master'

12 years agoMerge remote-tracking branch 'bluetooth/master'
Stephen Rothwell [Mon, 30 Apr 2012 02:00:46 +0000 (12:00 +1000)]
Merge remote-tracking branch 'bluetooth/master'

12 years agoMerge remote-tracking branch 'wireless-next/master'
Stephen Rothwell [Mon, 30 Apr 2012 01:59:17 +0000 (11:59 +1000)]
Merge remote-tracking branch 'wireless-next/master'

Conflicts:
net/bluetooth/hci_core.c
net/bluetooth/mgmt.c

12 years agoMerge remote-tracking branch 'net-next/master'
Stephen Rothwell [Mon, 30 Apr 2012 01:49:39 +0000 (11:49 +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 [Mon, 30 Apr 2012 01:48:11 +0000 (11:48 +1000)]
Merge remote-tracking branch 'slave-dma/next'

12 years agoMerge remote-tracking branch 'isci/all'
Stephen Rothwell [Mon, 30 Apr 2012 01:46:31 +0000 (11:46 +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 [Mon, 30 Apr 2012 01:44:58 +0000 (11:44 +1000)]
Merge remote-tracking branch 'target-merge/for-next-merge'

12 years agoMerge remote-tracking branch 'target-updates/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:43:31 +0000 (11:43 +1000)]
Merge remote-tracking branch 'target-updates/for-next'

12 years agoMerge remote-tracking branch 'scsi/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:41:55 +0000 (11:41 +1000)]
Merge remote-tracking branch 'scsi/for-next'

12 years agoMerge remote-tracking branch 'ieee1394/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:40:22 +0000 (11:40 +1000)]
Merge remote-tracking branch 'ieee1394/for-next'

12 years agoMerge remote-tracking branch 'infiniband/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:38:36 +0000 (11:38 +1000)]
Merge remote-tracking branch 'infiniband/for-next'

12 years agoMerge remote-tracking branch 'kconfig/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:38:29 +0000 (11:38 +1000)]
Merge remote-tracking branch 'kconfig/for-next'

12 years agoMerge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:38:26 +0000 (11:38 +1000)]
Merge remote-tracking branch 'kbuild/for-next'

12 years agoMerge remote-tracking branch 'v4l-dvb/master'
Stephen Rothwell [Mon, 30 Apr 2012 01:36:43 +0000 (11:36 +1000)]
Merge remote-tracking branch 'v4l-dvb/master'

Conflicts:
drivers/usb/gadget/uvc_queue.c

12 years agoMerge remote-tracking branch 'hwmon-staging/hwmon-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:35:18 +0000 (11:35 +1000)]
Merge remote-tracking branch 'hwmon-staging/hwmon-next'

12 years agoMerge branch 'quilt/jdelvare-hwmon'
Stephen Rothwell [Mon, 30 Apr 2012 01:35:16 +0000 (11:35 +1000)]
Merge branch 'quilt/jdelvare-hwmon'

12 years agoMerge remote-tracking branch 'i2c-embedded/i2c-embedded/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:33:03 +0000 (11:33 +1000)]
Merge remote-tracking branch 'i2c-embedded/i2c-embedded/for-next'

12 years agoMerge remote-tracking branch 'bjdooks-i2c/next-i2c'
Stephen Rothwell [Mon, 30 Apr 2012 01:33:01 +0000 (11:33 +1000)]
Merge remote-tracking branch 'bjdooks-i2c/next-i2c'

Conflicts:
drivers/i2c/busses/i2c-omap.c

12 years agoMerge branch 'quilt/i2c'
Stephen Rothwell [Mon, 30 Apr 2012 01:31:35 +0000 (11:31 +1000)]
Merge branch 'quilt/i2c'

12 years agoMerge remote-tracking branch 'hid/for-next'
Stephen Rothwell [Mon, 30 Apr 2012 01:30:08 +0000 (11:30 +1000)]
Merge remote-tracking branch 'hid/for-next'