]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agofsnotify: remove unused parameter from send_to_group()
Dan Carpenter [Thu, 3 May 2012 05:43:28 +0000 (15:43 +1000)]
fsnotify: remove unused parameter from send_to_group()

We don't use "mnt" anymore in send_to_group() after 1968f5eed5 ("fanotify:
use both marks when possible") was applied.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agofs: hardlink creation restrictions
Kees Cook [Thu, 3 May 2012 05:43:28 +0000 (15:43 +1000)]
fs: hardlink creation restrictions

On systems that have user-writable directories on the same partition as
system files, a long-standing class of security issues is the
hardlink-based time-of-check-time-of-use race, most commonly seen in
world-writable directories like /tmp.  The common method of exploitation
of this flaw is to cross privilege boundaries when following a given
hardlink (i.e.  a root process follows a hardlink created by another
user).  Additionally, an issue exists where users can "pin" a potentially
vulnerable setuid/setgid file so that an administrator will not actually
upgrade a system fully.

The solution is to permit hardlinks to only be created when the user is
already the existing file's owner, or if they already have read/write
access to the existing file.

Many Linux users are surprised when they learn they can link to files they
have no access to, so this change appears to follow the doctrine of "least
surprise".  Additionally, this change does not violate POSIX, which states
"the implementation may require that the calling process has permission to
access the existing file"[1].

This change is known to break some implementations of the "at" daemon,
though the version used by Fedora and Ubuntu has been fixed[2] for a
while.  Otherwise, the change has been undisruptive while in use in Ubuntu
for the last 1.5 years.

This patch is based on the patch in Openwall and grsecurity.  I have added
a sysctl to enable the protected behavior, documentation, and an audit
notification.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/linkat.html
[2] http://anonscm.debian.org/gitweb/?p=collab-maint/at.git;a=commitdiff;h=f4114656c3a6c6f6070e315ffdf940a49eda3279

[akpm@linux-foundation.org: uninline may_linkat() and audit_log_link_denied()]
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Rik van Riel <riel@redhat.com>
Cc: Federica Teodori <federica.teodori@googlemail.com>
Cc: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Eric Paris <eparis@redhat.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Dan Rosenberg <drosenberg@vsecurity.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agofs: symlink restrictions on sticky directories
Kees Cook [Thu, 3 May 2012 05:43:28 +0000 (15:43 +1000)]
fs: symlink restrictions on sticky directories

A longstanding class of security issues is the symlink-based
time-of-check-time-of-use race, most commonly seen in world-writable
directories like /tmp.  The common method of exploitation of this flaw is
to cross privilege boundaries when following a given symlink (i.e.  a root
process follows a symlink belonging to another user).  For a likely
incomplete list of hundreds of examples across the years, please see:
http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=/tmp

The solution is to permit symlinks to only be followed when outside a
sticky world-writable directory, or when the uid of the symlink and
follower match, or when the directory owner matches the symlink's owner.

Some pointers to the history of earlier discussion that I could find:

 1996 Aug, Zygo Blaxell
  http://marc.info/?l=bugtraq&m=87602167419830&w=2
 1996 Oct, Andrew Tridgell
  http://lkml.indiana.edu/hypermail/linux/kernel/9610.2/0086.html
 1997 Dec, Albert D Cahalan
  http://lkml.org/lkml/1997/12/16/4
 2005 Feb, Lorenzo Hernández García-Hierro
  http://lkml.indiana.edu/hypermail/linux/kernel/0502.0/1896.html
 2010 May, Kees Cook
  https://lkml.org/lkml/2010/5/30/144

Past objections and rebuttals could be summarized as:

 - Violates POSIX.
   - POSIX didn't consider this situation and it's not useful to follow
     a broken specification at the cost of security.
 - Might break unknown applications that use this feature.
   - Applications that break because of the change are easy to spot and
     fix. Applications that are vulnerable to symlink ToCToU by not having
     the change aren't. Additionally, no applications have yet been found
     that rely on this behavior.
 - Applications should just use mkstemp() or O_CREATE|O_EXCL.
   - True, but applications are not perfect, and new software is written
     all the time that makes these mistakes; blocking this flaw at the
     kernel is a single solution to the entire class of vulnerability.
 - This should live in the core VFS.
   - This should live in an LSM. (https://lkml.org/lkml/2010/5/31/135)
 - This should live in an LSM.
   - This should live in the core VFS. (https://lkml.org/lkml/2010/8/2/188)

This patch is based on the patch in Openwall and grsecurity, along with
suggestions from Al Viro.  I have added a sysctl to enable the protected
behavior, documentation, and an audit notification.

[akpm@linux-foundation.org: move sysctl_protected_sticky_symlinks declaration into .h]
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Rik van Riel <riel@redhat.com>
Cc: Federica Teodori <federica.teodori@googlemail.com>
Cc: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Eric Paris <eparis@redhat.com>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Dan Rosenberg <drosenberg@vsecurity.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agovfs: increment iversion when a file is truncated
Dmitry Kasatkin [Thu, 3 May 2012 05:43:27 +0000 (15:43 +1000)]
vfs: increment iversion when a file is truncated

When a file is truncated with truncate()/ftruncate() and then closed,
iversion is not updated.  This patch uses ATTR_SIZE flag as an indication
to increment iversion.

Mimi said:

On fput(), i_version is used to detect and flag files that have changed
and need to be re-measured in the IMA measurement policy.  When a file
is truncated with truncate()/ftruncate() and then closed, i_version is
not updated.  As a result, although the file has changed, it will not be
re-measured and added to the IMA measurement list on subsequent access.

Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Acked-by: Mimi Zohar <zohar@us.ibm.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agodrivers/scsi/atp870u.c: fix bad use of udelay
Martin Michlmayr [Thu, 3 May 2012 05:43:27 +0000 (15:43 +1000)]
drivers/scsi/atp870u.c: fix bad use of udelay

The ACARD driver calls udelay() with a value > 2000, which leads to
to the following compilation error on ARM:
  ERROR: "__bad_udelay" [drivers/scsi/atp870u.ko] undefined!
  make[1]: *** [__modpost] Error 1

This is because udelay is defined on ARM, roughly speaking, as

#define udelay(n) ((n) > 2000 ? __bad_udelay() : \
__const_udelay((n) * ((2199023U*HZ)>>11)))

The argument to __const_udelay is the number of jiffies to wait divided by
4, but this does not work unless the multiplication does not overflow, and
that is what the build error is designed to prevent.  The intended
behavior can be achieved by using mdelay to call udelay multiple times in
a loop.

[jn: adding context]
Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agodrivers/scsi/ufs: fix incorrect return value about SUCCESS and FAILED
Namjae Jeon [Thu, 3 May 2012 05:43:26 +0000 (15:43 +1000)]
drivers/scsi/ufs: fix incorrect return value about SUCCESS and FAILED

Currently the UFS host driver has returned incorrect values for SUCCESS
and FAILED.  Fix it to return the correct value to the upper layer.

Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Acked-by: Santosh Y <santoshsy@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agodrivers/scsi/ufs: fix evaluation of task_failed status
Venkatraman S [Thu, 3 May 2012 05:43:26 +0000 (15:43 +1000)]
drivers/scsi/ufs: fix evaluation of task_failed status

Else FAILED would be set even if task_result was originally equal to
UPIU_TASK_MANAGEMENT_FUNC_SUCCEEDED.

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
Acked-by: Santosh Y <santoshsy@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agodrivers/scsi/ufs: reverse the ufshcd_is_device_present logic
Venkatraman S [Thu, 3 May 2012 05:43:26 +0000 (15:43 +1000)]
drivers/scsi/ufs: reverse the ufshcd_is_device_present logic

Otherwise it counter intuitively returns 0 if device is present.

Signed-off-by: Venkatraman S <svenkatr@ti.com>
Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
Acked-by: Santosh Y <santoshsy@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agodrivers/scsi/ufs: use module_pci_driver
Venkatraman S [Thu, 3 May 2012 05:43:25 +0000 (15:43 +1000)]
drivers/scsi/ufs: use module_pci_driver

Use macro module_pci_driver and get rid of boilerplate code.  No
functional changes.

Signed-off-by: Venkatraman S <svenkatr@ti.com>
Acked-by: Santosh Y <santoshsy@gmail.com>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agoocfs2: use bitmap_weight()
Akinobu Mita [Thu, 3 May 2012 05:43:25 +0000 (15:43 +1000)]
ocfs2: use bitmap_weight()

Use bitmap_weight() instead of reinventing the wheel.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agoocfs2: use find_last_bit()
Akinobu Mita [Thu, 3 May 2012 05:43:25 +0000 (15:43 +1000)]
ocfs2: use find_last_bit()

We already have find_last_bit().  So just use it as described in the
comment.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agoblackfin: use set_current_blocked() and block_sigmask()
Matt Fleming [Thu, 3 May 2012 05:43:24 +0000 (15:43 +1000)]
blackfin: 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: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agoconnector/userns: replace netlink uses of cap_raised with capable.
Eric W. Biederman [Thu, 3 May 2012 05:43:24 +0000 (15:43 +1000)]
connector/userns: replace netlink uses of cap_raised with capable.

In 2009 Philip Reiser notied that a few users of netlink connector
interface needed a capability check and added the idiom
cap_raised(nsp->eff_cap, CAP_SYS_ADMIN) to a few of them, on the premise
that netlink was asynchronous.

In 2011 Patrick McHardy noticed we were being silly because netlink is
synchronous and removed eff_cap from the netlink_skb_params and changed
the idiom to cap_raised(current_cap(), CAP_SYS_ADMIN).

Looking at those spots with a fresh eye we should be calling
capable(CAP_SYS_ADMIN).  The only reason I can see for not calling capable
is that it once appeared we were not in the same task as the caller which
would have made calling capable() impossible.

In the initial user_namespace the only difference between between
cap_raised(current_cap(), CAP_SYS_ADMIN) and capable(CAP_SYS_ADMIN) are a
few sanity checks and the fact that capable(CAP_SYS_ADMIN) sets
PF_SUPERPRIV if we use the capability.

Since we are going to be using root privilege setting PF_SUPERPRIV seems
the right thing to do.

The motivation for this that patch is that in a child user namespace
cap_raised(current_cap(),...) tests your capabilities with respect to that
child user namespace not capabilities in the initial user namespace and
thus will allow processes that should be unprivielged to use the kernel
services that are only protected with cap_raised(current_cap(),..).

To fix possible user_namespace issues and to just clean up the code
replace cap_raised(current_cap(), CAP_SYS_ADMIN) with
capable(CAP_SYS_ADMIN).

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Philipp Reisner <philipp.reisner@linbit.com>
Acked-by: Serge E. Hallyn <serge.hallyn@canonical.com>
Acked-by: Andrew G. Morgan <morgan@kernel.org>
Cc: Vasiliy Kulikov <segoon@openwall.com>
Cc: David Howells <dhowells@redhat.com>
Reviewed-by: James Morris <james.l.morris@oracle.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agounicore32: use block_sigmask()
Matt Fleming [Thu, 3 May 2012 05:43:23 +0000 (15:43 +1000)]
unicore32: 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>
Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agodrivers/thermal/spear_thermal.c: add Device Tree probing capability
Viresh Kumar [Thu, 3 May 2012 05:43:23 +0000 (15:43 +1000)]
drivers/thermal/spear_thermal.c: add Device Tree probing capability

SPEAr platforms now support DT and so must convert all drivers to support
DT.  This patch adds DT probing support for SPEAr thermal sensor driver
and updates its documentation too.

Also, as SPEAr is the only user of this driver and is only available with
DT, make this an only DT driver.  So, platform_data is completely removed
and passed via DT now.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Vincenzo Frascino <vincenzo.frascino@st.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agoh8300: use set_current_blocked() and block_sigmask()
Matt Fleming [Thu, 3 May 2012 05:43:23 +0000 (15:43 +1000)]
h8300: 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: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agoscore: use set_current_blocked() and block_sigmask()
Matt Fleming [Thu, 3 May 2012 05:43:22 +0000 (15:43 +1000)]
score: 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: Chen Liqin <liqin.chen@sunplusct.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agoscore: don't mask signals if we fail to setup signal stack
Matt Fleming [Thu, 3 May 2012 05:43:22 +0000 (15:43 +1000)]
score: don't mask signals if we fail to setup signal stack

If setup_rt_frame() returns -EFAULT then we must not block any signals
in the current process.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
12 years agomicroblaze: use set_current_blocked() and block_sigmask()
Matt Fleming [Thu, 3 May 2012 05:43:22 +0000 (15:43 +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 [Thu, 3 May 2012 05:43:21 +0000 (15:43 +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 [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