]> Pileus Git - ~andy/linux/log
~andy/linux
11 years agoMerge branch 'master' into for-next
Jiri Kosina [Tue, 28 May 2013 08:09:22 +0000 (10:09 +0200)]
Merge branch 'master' into for-next

Merge with 49717cb ("kthread: Document ways of reducing OS jitter due
to per-CPU kthreads") to be able to apply fixup patch on top of it.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agomm: Convert print_symbol to %pSR
Joe Perches [Wed, 12 Dec 2012 18:19:12 +0000 (10:19 -0800)]
mm: Convert print_symbol to %pSR

Use the new vsprintf extension to avoid any possible
message interleaving.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agogfs2: Convert print_symbol to %pSR
Joe Perches [Wed, 12 Dec 2012 18:19:08 +0000 (10:19 -0800)]
gfs2: Convert print_symbol to %pSR

Use the new vsprintf extension to avoid any possible
message interleaving.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agom32r: Convert print_symbol to %pSR
Joe Perches [Wed, 12 Dec 2012 18:18:57 +0000 (10:18 -0800)]
m32r: Convert print_symbol to %pSR

Use the new vsprintf extension to avoid any possible
message interleaving.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agoiostats.txt: add easy-to-find description for field 6
David P Hilton [Wed, 20 Feb 2013 23:44:28 +0000 (16:44 -0700)]
iostats.txt: add easy-to-find description for field 6

iostats.txt has a merged description of fields 2 and 6, but it's not obvious.
This patch adds a field 6, pointing to the merged description of field 6 in
field 2.

Signed-off-by: David Hilton <david.hilton.p@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agokthread: Document ways of reducing OS jitter due to per-CPU kthreads
Paul E. McKenney [Thu, 11 Apr 2013 15:07:11 +0000 (08:07 -0700)]
kthread: Document ways of reducing OS jitter due to per-CPU kthreads

The Linux kernel uses a number of per-CPU kthreads, any of which might
contribute to OS jitter at any time.  The usual approach to normal
kthreads, namely to bind them to a "housekeeping" CPU, does not work
with these kthreads because they cannot operate correctly if moved to
some other CPU.  This commit therefore lists ways of controlling OS
jitter from the Linux kernel's per-CPU kthreads.  It also lists some
ways of diagnosing excessive jitter.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Kevin Hilman <khilman@linaro.org>
Cc: Christoph Lameter <cl@linux.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Olivier Baetz <olivier.baetz@novasparks.com>
Cc: Pradeep Satyanarayana <pradeeps@linux.vnet.ibm.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Borislav Petkov <bp@suse.de>
11 years agox86 cmpxchg.h: fix wrong comment
Li Zhong [Thu, 25 Apr 2013 07:20:54 +0000 (15:20 +0800)]
x86 cmpxchg.h: fix wrong comment

Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agotreewide: Fix typo in printk and comments
Masanari Iida [Wed, 17 Apr 2013 15:12:55 +0000 (00:12 +0900)]
treewide: Fix typo in printk and comments

Fix typo in printk and comments within various drivers.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agodoc: devicetree: Fix various typos
Masanari Iida [Wed, 10 Apr 2013 13:33:46 +0000 (22:33 +0900)]
doc: devicetree: Fix various typos

Fix spelling typos in Documentation/devicetree/bindings.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agodocbook: fix 8250 naming in device-drivers
Vincent Stehlé [Wed, 24 Apr 2013 14:35:10 +0000 (16:35 +0200)]
docbook: fix 8250 naming in device-drivers

8250 driver has been (re)renamed to 8250_core.c by commit
9196d8acd7f91758872108958dfded7684628444. Follow that change to fix the
following error when building htmldocs:

  docproc: /work/cross/linux//drivers/tty/serial/8250/8250.c: No such file or directory

Acked-by: Rob landley <rob@landley.net>
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agopata_pdc2027x: Fix compiler warning
Wang YanQing [Tue, 9 Apr 2013 07:05:40 +0000 (15:05 +0800)]
pata_pdc2027x: Fix compiler warning

Fix the follwing warnings:
linux/drivers/ata/pata_pdc2027x.c:66: warning: 'pdc2027x_reinit_one' declared 'static' but never defined

pdc2027x_reinit_one are defined only when CONFIG_PM is defined,
thus making it conditional.

Signed-off-by: Wang YanQing <udknight@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agotreewide: Fix typo in printks
Masanari Iida [Mon, 8 Apr 2013 17:06:50 +0000 (02:06 +0900)]
treewide: Fix typo in printks

Correct spelling typos in printk and comments.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agomei: Fix comments in drivers/misc/mei
Masanari Iida [Thu, 4 Apr 2013 16:05:05 +0000 (01:05 +0900)]
mei: Fix comments in drivers/misc/mei

Correct typos and fix stray comments.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Winkler, Tomas <tomas.winkler@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agotreewide: Fix typos in kernel messages
Masanari Iida [Sat, 30 Mar 2013 16:23:50 +0000 (01:23 +0900)]
treewide: Fix typos in kernel messages

Correct spelling typos in various part of printk.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agopm44xx: Fix comment for "CONFIG_CPU_IDLE"
Paul Bolle [Fri, 29 Mar 2013 20:35:01 +0000 (21:35 +0100)]
pm44xx: Fix comment for "CONFIG_CPU_IDLE"

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agodoc: Fix typo "CONFIG_CGROUP_CGROUP_MEMCG_SWAP"
Paul Bolle [Mon, 25 Mar 2013 22:59:16 +0000 (23:59 +0100)]
doc: Fix typo "CONFIG_CGROUP_CGROUP_MEMCG_SWAP"

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Rob Landley <rob@landley.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agommzone: correct "pags" to "pages" in comment.
Cody P Schafer [Tue, 26 Mar 2013 17:30:44 +0000 (10:30 -0700)]
mmzone: correct "pags" to "pages" in comment.

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agokernel-parameters: remove outdated 'noresidual' parameter
Paul Bolle [Thu, 21 Mar 2013 11:02:00 +0000 (12:02 +0100)]
kernel-parameters: remove outdated 'noresidual' parameter

The PPC specific kernel parameter 'noresidual' was removed in v2.6.27,
though commit 917f0af9e5a9ceecf9e72537fabb501254ba321d ("powerpc: Remove
arch/ppc and include/asm-ppc").

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agoRemove spurious _H suffixes from ifdef comments
Paul Bolle [Mon, 25 Mar 2013 20:12:27 +0000 (21:12 +0100)]
Remove spurious _H suffixes from ifdef comments

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agosound: Remove stray pluses from Kconfig file
Paul Bolle [Tue, 26 Mar 2013 09:59:04 +0000 (10:59 +0100)]
sound: Remove stray pluses from Kconfig file

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agoradio-shark: Fix printk "CONFIG_LED_CLASS"
Paul Bolle [Tue, 26 Mar 2013 08:45:38 +0000 (09:45 +0100)]
radio-shark: Fix printk "CONFIG_LED_CLASS"

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agodoc: put proper reference to CONFIG_MODULE_SIG_ENFORCE
Paul Bolle [Mon, 25 Mar 2013 19:42:06 +0000 (20:42 +0100)]
doc: put proper reference to CONFIG_MODULE_SIG_ENFORCE

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agoirq: versatile: rename Kconfig macro in printk
Paul Bolle [Mon, 25 Mar 2013 09:34:46 +0000 (10:34 +0100)]
irq: versatile: rename Kconfig macro in printk

Commit 2389d5014342e9535aad212d0c68d439aaf534ba ("ARM: plat-versatile:
move FPGA irq driver to drivers/irqchip") changed Kconfig symbol
PLAT_VERSATILE_FPGA_IRQ_NR to VERSATILE_FPGA_IRQ_NR. It forgot to change
one reference to the related macro in a printk.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agodoc: DocBook/media : Fix typo in dvbproperty.xml
Masanari Iida [Sun, 24 Mar 2013 06:25:56 +0000 (15:25 +0900)]
doc: DocBook/media : Fix typo in dvbproperty.xml

Correct spelling typos.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agoMerge branches 'doc.2013.03.12a', 'fixes.2013.03.13a' and 'idlenocb.2013.03.26b'...
Paul E. McKenney [Tue, 26 Mar 2013 15:07:38 +0000 (08:07 -0700)]
Merge branches 'doc.2013.03.12a', 'fixes.2013.03.13a' and 'idlenocb.2013.03.26b' into HEAD

doc.2013.03.12a: Documentation changes.

fixes.2013.03.13a: Miscellaneous fixes.

idlenocb.2013.03.26b: Remove restrictions on no-CBs CPUs, make
RCU_FAST_NO_HZ take advantage of numbered callbacks, add
callback acceleration based on numbered callbacks.

11 years agorcu: Make rcu_accelerate_cbs() note need for future grace periods
Paul E. McKenney [Mon, 31 Dec 2012 10:24:21 +0000 (02:24 -0800)]
rcu: Make rcu_accelerate_cbs() note need for future grace periods

Now that rcu_start_future_gp() has been abstracted from
rcu_nocb_wait_gp(), rcu_accelerate_cbs() can invoke rcu_start_future_gp()
so as to register the need for any future grace periods needed by a
CPU about to enter dyntick-idle mode.  This commit makes this change.
Note that some refactoring of rcu_start_gp() is carried out to avoid
recursion and subsequent self-deadlocks.

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agorcu: Abstract rcu_start_future_gp() from rcu_nocb_wait_gp()
Paul E. McKenney [Sun, 30 Dec 2012 23:21:01 +0000 (15:21 -0800)]
rcu: Abstract rcu_start_future_gp() from rcu_nocb_wait_gp()

CPUs going idle will need to record the need for a future grace
period, but won't actually need to block waiting on it.  This commit
therefore splits rcu_start_future_gp(), which does the recording, from
rcu_nocb_wait_gp(), which now invokes rcu_start_future_gp() to do the
recording, after which rcu_nocb_wait_gp() does the waiting.

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agorcu: Rename n_nocb_gp_requests to need_future_gp
Paul E. McKenney [Sun, 30 Dec 2012 21:06:35 +0000 (13:06 -0800)]
rcu: Rename n_nocb_gp_requests to need_future_gp

CPUs going idle need to be able to indicate their need for future grace
periods.  A mechanism for doing this already exists for no-callbacks
CPUs, so the idea is to re-use that mechanism.  This commit therefore
moves the ->n_nocb_gp_requests field of the rcu_node structure out from
under the CONFIG_RCU_NOCB_CPU #ifdef and renames it to ->need_future_gp.

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agorcu: Push lock release to rcu_start_gp()'s callers
Paul E. McKenney [Sun, 30 Dec 2012 06:04:18 +0000 (22:04 -0800)]
rcu: Push lock release to rcu_start_gp()'s callers

If CPUs are to give prior notice of needed grace periods, it will be
necessary to invoke rcu_start_gp() without dropping the root rcu_node
structure's ->lock.  This commit takes a second step in this direction
by moving the release of this lock to rcu_start_gp()'s callers.

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agorcu: Repurpose no-CBs event tracing to future-GP events
Paul E. McKenney [Sun, 30 Dec 2012 05:51:20 +0000 (21:51 -0800)]
rcu: Repurpose no-CBs event tracing to future-GP events

Dyntick-idle CPUs need to be able to pre-announce their need for grace
periods.  This can be done using something similar to the mechanism used
by no-CB CPUs to announce their need for grace periods.  This commit
moves in this direction by renaming the no-CBs grace-period event tracing
to suit the new future-grace-period needs.

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agorcu: Rearrange locking in rcu_start_gp()
Paul E. McKenney [Sat, 29 Dec 2012 22:52:41 +0000 (14:52 -0800)]
rcu: Rearrange locking in rcu_start_gp()

If CPUs are to give prior notice of needed grace periods, it will be
necessary to invoke rcu_start_gp() without dropping the root rcu_node
structure's ->lock.  This commit takes a first step in this direction
by moving the release of this lock to the end of rcu_start_gp().

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agorcu: Make RCU_FAST_NO_HZ take advantage of numbered callbacks
Paul E. McKenney [Fri, 28 Dec 2012 19:30:36 +0000 (11:30 -0800)]
rcu: Make RCU_FAST_NO_HZ take advantage of numbered callbacks

Because RCU callbacks are now associated with the number of the grace
period that they must wait for, CPUs can now take advance callbacks
corresponding to grace periods that ended while a given CPU was in
dyntick-idle mode.  This eliminates the need to try forcing the RCU
state machine while entering idle, thus reducing the CPU intensiveness
of RCU_FAST_NO_HZ, which should increase its energy efficiency.

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agorcu: Accelerate RCU callbacks at grace-period end
Paul E. McKenney [Mon, 17 Dec 2012 22:21:14 +0000 (14:21 -0800)]
rcu: Accelerate RCU callbacks at grace-period end

Now that callback acceleration is idempotent, it is safe to accelerate
callbacks during grace-period cleanup on any CPUs that the kthread happens
to be running on.  This commit therefore propagates the completion
of the grace period to the per-CPU data structures, and also adds an
rcu_advance_cbs() just before the cpu_needs_another_gp() check in order
to reduce false-positive grace periods.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agorcu: Export RCU_FAST_NO_HZ parameters to sysfs
Paul E. McKenney [Wed, 12 Dec 2012 20:35:29 +0000 (12:35 -0800)]
rcu: Export RCU_FAST_NO_HZ parameters to sysfs

RCU_FAST_NO_HZ operation is controlled by four compile-time C-preprocessor
macros, but some use cases benefit greatly from runtime adjustment,
particularly when tuning devices.  This commit therefore creates the
corresponding sysfs entries.

Reported-by: Robin Randhawa <robin.randhawa@arm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agorcu: Distinguish "rcuo" kthreads by RCU flavor
Paul E. McKenney [Mon, 3 Dec 2012 16:16:28 +0000 (08:16 -0800)]
rcu: Distinguish "rcuo" kthreads by RCU flavor

Currently, the per-no-CBs-CPU kthreads are named "rcuo" followed by
the CPU number, for example, "rcuo".  This is problematic given that
there are either two or three RCU flavors, each of which gets a per-CPU
kthread with exactly the same name.  This commit therefore introduces
a one-letter abbreviation for each RCU flavor, namely 'b' for RCU-bh,
'p' for RCU-preempt, and 's' for RCU-sched.  This abbreviation is used
to distinguish the "rcuo" kthreads, for example, for CPU 0 we would have
"rcuob/0", "rcuop/0", and "rcuos/0".

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
11 years agorcu: Add event tracing for no-CBs CPUs' grace periods
Paul E. McKenney [Fri, 8 Feb 2013 23:55:02 +0000 (15:55 -0800)]
rcu: Add event tracing for no-CBs CPUs' grace periods

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agorcu: Add event tracing for no-CBs CPUs' callback registration
Paul E. McKenney [Sun, 10 Feb 2013 01:42:16 +0000 (17:42 -0800)]
rcu: Add event tracing for no-CBs CPUs' callback registration

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agorcu: Introduce proper blocking to no-CBs kthreads GP waits
Paul E. McKenney [Mon, 11 Feb 2013 04:48:58 +0000 (20:48 -0800)]
rcu: Introduce proper blocking to no-CBs kthreads GP waits

Currently, the no-CBs kthreads do repeated timed waits for grace periods
to elapse.  This is crude and energy inefficient, so this commit allows
no-CBs kthreads to specify exactly which grace period they are waiting
for and also allows them to block for the entire duration until the
desired grace period completes.

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agorcu: Provide compile-time control for no-CBs CPUs
Paul E. McKenney [Mon, 11 Feb 2013 18:23:27 +0000 (10:23 -0800)]
rcu: Provide compile-time control for no-CBs CPUs

Currently, the only way to specify no-CBs CPUs is via the rcu_nocbs
kernel command-line parameter.  This is inconvenient in some cases,
particularly for randconfig testing, so this commit adds a new set of
kernel configuration parameters.  CONFIG_RCU_NOCB_CPU_NONE (the default)
retains the old behavior, CONFIG_RCU_NOCB_CPU_ZERO offloads callback
processing from CPU 0 (along with any other CPUs specified by the
rcu_nocbs boot-time parameter), and CONFIG_RCU_NOCB_CPU_ALL offloads
callback processing from all CPUs.

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agodoc: Remove text on tracepoint samples
Paul Bolle [Mon, 18 Mar 2013 08:34:10 +0000 (09:34 +0100)]
doc: Remove text on tracepoint samples

The tracepoint sample code got removed. Remove a few lines on its usage
too.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Rob Landley <rob@landley.net>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agotreewide: Fix typos in printk
Masanari Iida [Wed, 20 Mar 2013 02:00:34 +0000 (11:00 +0900)]
treewide: Fix typos in printk

Correct spelling typo in various drivers.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agof2fs: Fix typo in comments
Masanari Iida [Mon, 18 Mar 2013 23:03:35 +0000 (08:03 +0900)]
f2fs: Fix typo in comments

Correct spelling typo in comments

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agotreewide: Fix typos in printk and comment
Masanari Iida [Sat, 16 Mar 2013 11:53:05 +0000 (20:53 +0900)]
treewide: Fix typos in printk and comment

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agodrivers/isdn: delete 'break' after 'return'
Chen Gang [Wed, 27 Feb 2013 09:16:12 +0000 (17:16 +0800)]
drivers/isdn: delete 'break' after 'return'

delete 'break' statement after 'return' statement

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agodriver: usb: storage: remove cast for kmalloc return value
Zhang Yanfei [Tue, 12 Mar 2013 05:33:27 +0000 (13:33 +0800)]
driver: usb: storage: remove cast for kmalloc return value

remove cast for kmalloc return value.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-usb@vger.kernel.org
Cc: usb-storage@lists.one-eyed-alien.net
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agonet: sctp: remove cast for kmalloc/kzalloc return value
Zhang Yanfei [Tue, 12 Mar 2013 05:39:47 +0000 (13:39 +0800)]
net: sctp: remove cast for kmalloc/kzalloc return value

remove cast for kmalloc/kzalloc return value.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Cc: Vlad Yasevich <vyasevich@gmail.com>
Cc: Sridhar Samudrala <sri@us.ibm.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-sctp@vger.kernel.org
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agopowerpc: remove cast for kmalloc/kzalloc return value
Zhang Yanfei [Tue, 12 Mar 2013 04:54:06 +0000 (12:54 +0800)]
powerpc: remove cast for kmalloc/kzalloc return value

remove cast for kmalloc/kzalloc return value.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agoia64: remove cast for kmalloc return value
Zhang Yanfei [Tue, 12 Mar 2013 04:47:08 +0000 (12:47 +0800)]
ia64: remove cast for kmalloc return value

remove cast for kmalloc return value.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-ia64@vger.kernel.org
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agodriver: tty: serial: remove cast for kzalloc return value
Zhang Yanfei [Tue, 12 Mar 2013 05:27:29 +0000 (13:27 +0800)]
driver: tty: serial: remove cast for kzalloc return value

remove cast for kzalloc return value.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-serial@vger.kernel.org
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agofs: befs: remove cast for kmalloc return value
Zhang Yanfei [Tue, 12 Mar 2013 05:35:09 +0000 (13:35 +0800)]
fs: befs: remove cast for kmalloc return value

remove cast for kmalloc return value.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agoarm: remove cast for kzalloc return value
Zhang Yanfei [Tue, 12 Mar 2013 04:42:37 +0000 (12:42 +0800)]
arm: remove cast for kzalloc return value

remove cast for kzalloc return value.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agodriver: gpu: drm: i915: remove cast for kzalloc return value
Zhang Yanfei [Tue, 12 Mar 2013 05:07:37 +0000 (13:07 +0800)]
driver: gpu: drm: i915: remove cast for kzalloc return value

remove cast for kzalloc return value.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agofs: ufs: remove cast for kmalloc return value
Zhang Yanfei [Tue, 12 Mar 2013 05:37:05 +0000 (13:37 +0800)]
fs: ufs: remove cast for kmalloc return value

remove cast for kmalloc return value.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Evgeniy Dushistov <dushistov@mail.ru>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agodriver: tty: vt: remove cast for kmalloc return value
Zhang Yanfei [Tue, 12 Mar 2013 05:29:32 +0000 (13:29 +0800)]
driver: tty: vt: remove cast for kmalloc return value

remove cast for kmalloc return value.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agodriver: hv: remove cast for kmalloc return value
Zhang Yanfei [Tue, 12 Mar 2013 05:10:40 +0000 (13:10 +0800)]
driver: hv: remove cast for kmalloc return value

remove cast for kmalloc return value.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: devel@linuxdriverproject.org
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agoarm: irq-armada-370-xp: fix comment typo
Marek Belisko [Fri, 15 Mar 2013 22:34:04 +0000 (23:34 +0100)]
arm: irq-armada-370-xp: fix comment typo

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agoarc: fix incorrect ifdef comment
Paul Bolle [Fri, 15 Mar 2013 16:21:55 +0000 (17:21 +0100)]
arc: fix incorrect ifdef comment

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agoitg3200: fix incorrect ifdef comment
Paul Bolle [Fri, 15 Mar 2013 15:32:05 +0000 (16:32 +0100)]
itg3200: fix incorrect ifdef comment

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agoMerge branch 'master' into for-next
Jiri Kosina [Mon, 18 Mar 2013 09:57:32 +0000 (10:57 +0100)]
Merge branch 'master' into for-next

Sync with Linus' tree to be able to apply patch to the newly
added ITG-3200 driver.

11 years agosfc: Fix Kconfig typo "----help---"
Paul Bolle [Fri, 15 Mar 2013 11:59:30 +0000 (12:59 +0100)]
sfc: Fix Kconfig typo "----help---"

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agorcu: Tone down debugging during boot-up and shutdown.
Paul E. McKenney [Sun, 10 Mar 2013 22:44:52 +0000 (15:44 -0700)]
rcu: Tone down debugging during boot-up and shutdown.

In some situations, randomly delaying RCU grace-period initialization
can cause more trouble than help.  This commit therefore restricts this
type of RCU self-torture to runtime, giving it a rest during boot and
shutdown.

Reported-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agorcu: Add softirq-stall indications to stall-warning messages
Paul E. McKenney [Wed, 6 Mar 2013 21:37:09 +0000 (13:37 -0800)]
rcu: Add softirq-stall indications to stall-warning messages

If RCU's softirq handler is prevented from executing, an RCU CPU stall
warning can result.  Ways to prevent RCU's softirq handler from executing
include: (1) CPU spinning with interrupts disabled, (2) infinite loop
in some softirq handler, and (3) in -rt kernels, an infinite loop in a
set of real-time threads running at priorities higher than that of RCU's
softirq handler.

Because this situation can be difficult to track down, this commit causes
the count of RCU softirq handler invocations to be printed with RCU
CPU stall warnings.  This information does require some interpretation,
as now documented in Documentation/RCU/stallwarn.txt.

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
11 years agorcu: Documentation update
Paul E. McKenney [Tue, 5 Mar 2013 01:55:49 +0000 (17:55 -0800)]
rcu: Documentation update

This commit applies a few updates based on a quick review of the RCU
documentations.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agorcu: Make bugginess of code sample more evident
Paul E. McKenney [Tue, 12 Feb 2013 15:56:27 +0000 (07:56 -0800)]
rcu: Make bugginess of code sample more evident

One of the code samples in whatisRCU.txt shows a bug, but someone scanning
the document quickly might mistake it for a valid use of RCU.  Add some
screaming comments to help keep speed-readers on track.

Reported-by: Nathan Zimmer <nzimmer@sgi.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
11 years agorcu: Fix hlist_bl_set_first_rcu() annotation
Steven Whitehouse [Fri, 15 Feb 2013 00:42:34 +0000 (16:42 -0800)]
rcu: Fix hlist_bl_set_first_rcu() annotation

Abhi noticed that we were getting a complaint from the RCU subsystem
about access of an RCU protected list under the write side bit lock.
This commit adds additional annotation to check both the RCU read
lock and the write side bit lock before printing a message.

Reported by: Abhijith Das <adas@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Tested-by: Abhijith Das <adas@redhat.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agorcu: Delete unused rcu_node "wakemask" field
Paul E. McKenney [Sun, 10 Feb 2013 22:22:14 +0000 (14:22 -0800)]
rcu: Delete unused rcu_node "wakemask" field

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agorcu: Remove comment referring to __stop_machine()
Srivatsa S. Bhat [Sat, 9 Feb 2013 00:11:29 +0000 (16:11 -0800)]
rcu: Remove comment referring to __stop_machine()

Although it used to be that CPU_DYING notifiers executed on the outgoing
CPU with interrupts disabled and with all other CPUs spinning, this is
no longer the case.  This commit therefore removes this obsolete comment.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agorcu: Avoid invoking RCU core on offline CPUs
Paul E. McKenney [Mon, 4 Feb 2013 20:14:24 +0000 (12:14 -0800)]
rcu: Avoid invoking RCU core on offline CPUs

Offline CPUs transition through the scheduler to the idle loop one
last time before being shut down.  This can result in RCU raising
softirq on this CPU, which is at best useless given that the CPU's
callbacks will be offloaded at CPU_DEAD time.  This commit therefore
avoids raising softirq on offline CPUs.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agorcu: Fix spacing problem
Jiang Fang [Sat, 2 Feb 2013 22:13:42 +0000 (14:13 -0800)]
rcu: Fix spacing problem

Signed-off-by: Jiang Fang <jiang.xx.fang@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agorcu: Remove restrictions on no-CBs CPUs
Paul E. McKenney [Mon, 7 Jan 2013 21:37:42 +0000 (13:37 -0800)]
rcu: Remove restrictions on no-CBs CPUs

Currently, CPU 0 is constrained to not be a no-CBs CPU, and furthermore
at least one no-CBs CPU must remain online at any given time.  These
restrictions are problematic in some situations, such as cases where
all CPUs must run a real-time workload that needs to be insulated from
OS jitter and latencies due to RCU callback invocation.  This commit
therefore provides no-CBs CPUs a (very crude and energy-inefficient)
way to start and to wait for grace periods independently of the normal
RCU callback mechanisms.  This approach allows any or all of the CPUs to
be designated as no-CBs CPUs, and allows any proper subset of the CPUs
(whether no-CBs CPUs or not) to be offlined.

This commit also provides a fix for a locking bug spotted by Xie
ChanglongX <changlongx.xie@intel.com>.

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11 years agoLinux 3.9-rc2 v3.9-rc2
Linus Torvalds [Sun, 10 Mar 2013 23:54:19 +0000 (16:54 -0700)]
Linux 3.9-rc2

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm...
Linus Torvalds [Sun, 10 Mar 2013 00:51:13 +0000 (16:51 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace

Pull namespace bugfixes from Eric Biederman:
 "This is three simple fixes against 3.9-rc1.  I have tested each of
  these fixes and verified they work correctly.

  The userns oops in key_change_session_keyring and the BUG_ON triggered
  by proc_ns_follow_link were found by Dave Jones.

  I am including the enhancement for mount to only trigger requests of
  filesystem modules here instead of delaying this for the 3.10 merge
  window because it is both trivial and the kind of change that tends to
  bit-rot if left untouched for two months."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
  proc: Use nd_jump_link in proc_ns_follow_link
  fs: Limit sys_mount to only request filesystem modules (Part 2).
  fs: Limit sys_mount to only request filesystem modules.
  userns: Stop oopsing in key_change_session_keyring

11 years agoAtmel MXT touchscreen: increase reset timeouts
Linus Torvalds [Sat, 9 Mar 2013 18:31:01 +0000 (10:31 -0800)]
Atmel MXT touchscreen: increase reset timeouts

There is a more complete atmel patch-series out by Nick Dyer that fixes
this and other things, but in the meantime this is the minimal thing to
get the touchscreen going on (at least my) Pixel Chromebook.

Not that I want my dirty fingers near that beautiful screen, but it
seems that a non-initialized touchscreen will also end up being a
constant wakeup source, so you have to disable it to go to sleep.  And
it's easier to just fix the initialization sequence.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoproc: Use nd_jump_link in proc_ns_follow_link
Eric W. Biederman [Sat, 9 Mar 2013 08:14:45 +0000 (00:14 -0800)]
proc: Use nd_jump_link in proc_ns_follow_link

Update proc_ns_follow_link to use nd_jump_link instead of just
manually updating nd.path.dentry.

This fixes the BUG_ON(nd->inode != parent->d_inode) reported by Dave
Jones and reproduced trivially with mkdir /proc/self/ns/uts/a.

Sigh it looks like the VFS change to require use of nd_jump_link
happend while proc_ns_follow_link was baking and since the common case
of proc_ns_follow_link continued to work without problems the need for
making this change was overlooked.

Cc: stable@vger.kernel.org
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Sat, 9 Mar 2013 01:33:20 +0000 (17:33 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes from Chris Mason:
 "These are scattered fixes and one performance improvement.  The
  biggest functional change is in how we throttle metadata changes.  The
  new code bumps our average file creation rate up by ~13% in fs_mark,
  and lowers CPU usage.

  Stefan bisected out a regression in our allocation code that made
  balance loop on extents larger than 256MB."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: improve the delayed inode throttling
  Btrfs: fix a mismerge in btrfs_balance()
  Btrfs: enforce min_bytes parameter during extent allocation
  Btrfs: allow running defrag in parallel to administrative tasks
  Btrfs: avoid deadlock on transaction waiting list
  Btrfs: do not BUG_ON on aborted situation
  Btrfs: do not BUG_ON in prepare_to_reloc
  Btrfs: free all recorded tree blocks on error
  Btrfs: build up error handling for merge_reloc_roots
  Btrfs: check for NULL pointer in updating reloc roots
  Btrfs: fix unclosed transaction handler when the async transaction commitment fails
  Btrfs: fix wrong handle at error path of create_snapshot() when the commit fails
  Btrfs: use set_nlink if our i_nlink is 0

11 years agoPlatform: x86: chromeos_laptop : Add basic platform data for atmel devices
Benson Leung [Fri, 8 Mar 2013 03:43:34 +0000 (19:43 -0800)]
Platform: x86: chromeos_laptop : Add basic platform data for atmel devices

Add basic platform data to get the current upstream driver working
with the 224s touchpad and 1664s touchscreen.
We will be using NULL config so we will use the settings from the
devices' NVRAMs.

Signed-off-by: Benson Leung <bleung@chromium.org>
Tested-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoInput: atmel_mxt_ts - Support for touchpad variant
Daniel Kurtz [Fri, 8 Mar 2013 03:43:33 +0000 (19:43 -0800)]
Input: atmel_mxt_ts - Support for touchpad variant

This same driver can be used by atmel based touchscreens and touchpads
(buttonpads). Platform data may specify a device is a touchpad
using the is_tp flag.

This will cause the driver to perform some touchpad specific
initializations, such as:
  * register input device name "Atmel maXTouch Touchpad" instead of
  Touchscreen.
  * register BTN_LEFT & BTN_TOOL_* event types.
  * register axis resolution (as a fixed constant, for now)
  * register BUTTONPAD property
  * process GPIO buttons using reportid T19

Input event GPIO mapping is done by the platform data key_map array.

key_map[x] should contain the KEY or BTN code to send when processing
GPIOx from T19. To specify a GPIO as not an input source, populate
with KEY_RESERVED, or 0.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk>
Tested-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Fri, 8 Mar 2013 23:22:08 +0000 (15:22 -0800)]
Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6

Pull CIFS fixes from Steve French:
 "A small set of cifs fixes which includes one for a recent regression
  in the write path (pointed out by Anton), some fixes for rename
  problems and as promised for 3.9 removing the obsolete sockopt mount
  option (and the accompanying deprecation warning)."

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
  CIFS: Fix missing of oplock_read value in smb30_values structure
  cifs: don't try to unlock pagecache page after releasing it
  cifs: remove the sockopt= mount option
  cifs: Check server capability before attempting silly rename
  cifs: Fix bug when checking error condition in cifs_rename_pending_delete()

11 years agoMerge branch 'akpm' (fixes from Andrew)
Linus Torvalds [Fri, 8 Mar 2013 23:05:42 +0000 (15:05 -0800)]
Merge branch 'akpm' (fixes from Andrew)

Merge misc fixes from Andrew Morton.

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
  alpha: boot: fix build breakage introduced by system.h disintegration
  memcg: initialize kmem-cache destroying work earlier
  Randy has moved
  ksm: fix m68k build: only NUMA needs pfn_to_nid
  dmi_scan: fix missing check for _DMI_ signature in smbios_present()
  Revert parts of "hlist: drop the node parameter from iterators"
  idr: remove WARN_ON_ONCE() on negative IDs
  mm/mempolicy.c: fix sp_node_init() argument ordering
  mm/mempolicy.c: fix wrong sp_node insertion
  ipc: don't allocate a copy larger than max
  ipc: fix potential oops when src msg > 4k w/ MSG_COPY

11 years agoalpha: boot: fix build breakage introduced by system.h disintegration
Will Deacon [Fri, 8 Mar 2013 20:43:37 +0000 (12:43 -0800)]
alpha: boot: fix build breakage introduced by system.h disintegration

Commit ec2212088c42 ("Disintegrate asm/system.h for Alpha") removed the
system.h include from boot/head.S, which puts the PAL_* asm constants
out of scope.

Include <asm/pal.h> so we can get building again.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: David Rusling <david.rusling@linaro.org>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agomemcg: initialize kmem-cache destroying work earlier
Konstantin Khlebnikov [Fri, 8 Mar 2013 20:43:36 +0000 (12:43 -0800)]
memcg: initialize kmem-cache destroying work earlier

Fix a warning from lockdep caused by calling cancel_work_sync() for
uninitialized struct work.  This path has been triggered by destructon
kmem-cache hierarchy via destroying its root kmem-cache.

  cache ffff88003c072d80
  obj ffff88003b410000 cache ffff88003c072d80
  obj ffff88003b924000 cache ffff88003c20bd40
  INFO: trying to register non-static key.
  the code is fine but needs lockdep annotation.
  turning off the locking correctness validator.
  Pid: 2825, comm: insmod Tainted: G           O 3.9.0-rc1-next-20130307+ #611
  Call Trace:
    __lock_acquire+0x16a2/0x1cb0
    lock_acquire+0x8a/0x120
    flush_work+0x38/0x2a0
    __cancel_work_timer+0x89/0xf0
    cancel_work_sync+0xb/0x10
    kmem_cache_destroy_memcg_children+0x81/0xb0
    kmem_cache_destroy+0xf/0xe0
    init_module+0xcb/0x1000 [kmem_test]
    do_one_initcall+0x11a/0x170
    load_module+0x19b0/0x2320
    SyS_init_module+0xc6/0xf0
    system_call_fastpath+0x16/0x1b

Example module to demonstrate:

  #include <linux/module.h>
  #include <linux/slab.h>
  #include <linux/mm.h>
  #include <linux/workqueue.h>

  int __init mod_init(void)
  {
   int size = 256;
   struct kmem_cache *cache;
   void *obj;
   struct page *page;

   cache = kmem_cache_create("kmem_cache_test", size, size, 0, NULL);
   if (!cache)
   return -ENOMEM;

   printk("cache %p\n", cache);

   obj = kmem_cache_alloc(cache, GFP_KERNEL);
   if (obj) {
   page = virt_to_head_page(obj);
   printk("obj %p cache %p\n", obj, page->slab_cache);
   kmem_cache_free(cache, obj);
   }

   flush_scheduled_work();

   obj = kmem_cache_alloc(cache, GFP_KERNEL);
   if (obj) {
   page = virt_to_head_page(obj);
   printk("obj %p cache %p\n", obj, page->slab_cache);
   kmem_cache_free(cache, obj);
   }

   kmem_cache_destroy(cache);

   return -EBUSY;
  }

  module_init(mod_init);
  MODULE_LICENSE("GPL");

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Glauber Costa <glommer@parallels.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoRandy has moved
Randy Dunlap [Fri, 8 Mar 2013 20:43:35 +0000 (12:43 -0800)]
Randy has moved

Update email address and CREDITS info.  xenotime.net is defunct.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Harry Wei <harryxiyou@gmail.com>
Cc: Keiichi KII <k-keiichi@bx.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoksm: fix m68k build: only NUMA needs pfn_to_nid
Hugh Dickins [Fri, 8 Mar 2013 20:43:34 +0000 (12:43 -0800)]
ksm: fix m68k build: only NUMA needs pfn_to_nid

A CONFIG_DISCONTIGMEM=y m68k config gave

  mm/ksm.c: In function `get_kpfn_nid':
  mm/ksm.c:492: error: implicit declaration of function `pfn_to_nid'

linux/mmzone.h declares it for CONFIG_SPARSEMEM and CONFIG_FLATMEM, but
expects the arch's asm/mmzone.h to declare it for CONFIG_DISCONTIGMEM
(see arch/mips/include/asm/mmzone.h for example).

Or perhaps it is only expected when CONFIG_NUMA=y: too much of a maze,
and m68k got away without it so far, so fix the build in mm/ksm.c.

Signed-off-by: Hugh Dickins <hughd@google.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Petr Holasek <pholasek@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agodmi_scan: fix missing check for _DMI_ signature in smbios_present()
Ben Hutchings [Fri, 8 Mar 2013 20:43:32 +0000 (12:43 -0800)]
dmi_scan: fix missing check for _DMI_ signature in smbios_present()

Commit 9f9c9cbb6057 ("drivers/firmware/dmi_scan.c: fetch dmi version
from SMBIOS if it exists") hoisted the check for "_DMI_" into
dmi_scan_machine(), which means that we don't bother to check for
"_DMI_" at offset 16 in an SMBIOS entry.  smbios_present() may also call
dmi_present() for an address where we found "_SM_", if it failed further
validation.

Check for "_DMI_" in smbios_present() before calling dmi_present().

[akpm@linux-foundation.org: fix build]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Reported-by: Tim McGrath <tmhikaru@gmail.com>
Tested-by: Tim Mcgrath <tmhikaru@gmail.com>
Cc: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoRevert parts of "hlist: drop the node parameter from iterators"
Arnd Bergmann [Fri, 8 Mar 2013 20:43:31 +0000 (12:43 -0800)]
Revert parts of "hlist: drop the node parameter from iterators"

Commit b67bfe0d42ca ("hlist: drop the node parameter from iterators")
did a lot of nice changes but also contains two small hunks that seem to
have slipped in accidentally and have no apparent connection to the
intent of the patch.

This reverts the two extraneous changes.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Peter Senna Tschudin <peter.senna@gmail.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoidr: remove WARN_ON_ONCE() on negative IDs
Tejun Heo [Fri, 8 Mar 2013 20:43:30 +0000 (12:43 -0800)]
idr: remove WARN_ON_ONCE() on negative IDs

idr_find(), idr_remove() and idr_replace() used to silently ignore the
sign bit and perform lookup with the rest of the bits.  The weird behavior
has been changed such that negative IDs are treated as invalid.  As the
behavior change was subtle, WARN_ON_ONCE() was added in the hope of
determining who's calling idr functions with negative IDs so that they can
be examined for problems.

Up until now, all two reported cases are ID number coming directly from
userland and getting fed into idr_find() and the warnings seem to cause
more problems than being helpful.  Drop the WARN_ON_ONCE()s.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: <markus@trippelsdorf.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agomm/mempolicy.c: fix sp_node_init() argument ordering
KOSAKI Motohiro [Fri, 8 Mar 2013 20:43:29 +0000 (12:43 -0800)]
mm/mempolicy.c: fix sp_node_init() argument ordering

Currently, n_new is wrongly initialized.  start and end parameter are
inverted.  Let's fix it.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agomm/mempolicy.c: fix wrong sp_node insertion
Hillf Danton [Fri, 8 Mar 2013 20:43:28 +0000 (12:43 -0800)]
mm/mempolicy.c: fix wrong sp_node insertion

n->end is accessed in sp_insert(). Thus it should be update
before calling sp_insert(). This mistake may make kernel panic.

Signed-off-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Dave Jones <davej@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoipc: don't allocate a copy larger than max
Peter Hurley [Fri, 8 Mar 2013 20:43:27 +0000 (12:43 -0800)]
ipc: don't allocate a copy larger than max

When MSG_COPY is set, a duplicate message must be allocated for the copy
before locking the queue.  However, the copy could not be larger than was
sent which is limited to msg_ctlmax.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Acked-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoipc: fix potential oops when src msg > 4k w/ MSG_COPY
Peter Hurley [Fri, 8 Mar 2013 20:43:26 +0000 (12:43 -0800)]
ipc: fix potential oops when src msg > 4k w/ MSG_COPY

If the src msg is > 4k, then dest->next points to the
next allocated segment; resetting it just prior to dereferencing
is bad.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Acked-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agoMerge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux...
Linus Torvalds [Fri, 8 Mar 2013 22:46:04 +0000 (14:46 -0800)]
Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile

Pull tile architecture fixes from Chris Metcalf:
 "This fixes the bug that Al Viro spotted with the compat llseek code.
  I also fixed the compat syscall definitions to use the new syscall
  define macros to properly sign-extend their arguments."

* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  tile: properly use COMPAT_SYSCALL_DEFINEx
  tile: work around bug in the generic sys_llseek

11 years agoMerge tag 'metag-for-v3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhoga...
Linus Torvalds [Fri, 8 Mar 2013 22:45:17 +0000 (14:45 -0800)]
Merge tag 'metag-for-v3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag

Pull metag bugfixes from James Hogan:
 "A couple of fairly minor arch/metag integration fixes from v3.9-rc1:

   - remove SET_PERSONALITY(): use default definition like other arches
     now do.

   - inhibit NUMA balancing: like SH, NUMA is used for memories with
     different latencies.  ARCH_WANT_VARIABLE_LOCALITY has been added
     for this purpose."

* tag 'metag-for-v3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag:
  metag: Inhibit NUMA balancing.
  metag: remove SET_PERSONALITY()

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Fri, 8 Mar 2013 22:43:33 +0000 (14:43 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "All are boring small fixes in various parts:
   - A few possible NULL-dereference or zero-division Oops fixes
   - Fix vmaster slave volume notification
   - Add codec ID for ALC233
   - Various fixes in several ASoC WM codecs
   - ASoC tegra i2c fix

  Sorry if you wanted a thrilling adventure with huge sharks :)"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: ice1712: Initialize card->private_data properly
  ALSA: hda - Add support of new codec ALC233
  ALSA: hda/ca0132 - Avoid division by zero in dspxfr_one_seg()
  ALSA: hda - check NULL pointer when creating SPDIF PCM switch
  ALSA: hda - check NULL pointer when creating SPDIF controls
  ASoC: wm5102: Apply a SYSCLK patch for later revs
  ALSA: vmaster: Fix slave change notification
  ASoC: tegra: fix I2S bit count mask
  ALSA: seq: seq_oss_event: missing range checks
  ASoC: wm8350: Use jiffies rather than msecs in schedule_delayed_work()
  ASoC: wm5110: Correct OUT2/3 volume and switch names
  ASoC: wm5102: Correct OUT2 volume and switch names
  ASoC: wm8960: Fix ADC power bits
  ASoC: wm8960: Correct register 0 and 1 defaults

11 years agoMerge branch 'for-3.9/upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 8 Mar 2013 22:42:52 +0000 (14:42 -0800)]
Merge branch 'for-3.9/upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid

Pull HID fix from Jiri Kosina:
 "Bugfix for a long-standing bug in logitech-dj driver causing all sorts
  of random initialization problems, finally debugged by Benjamin
  Tissoires with help of Bob Bowles."

* 'for-3.9/upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: logitech-dj: do not directly call hid_output_raw_report() during probe

11 years agoMerge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
Linus Torvalds [Fri, 8 Mar 2013 22:42:16 +0000 (14:42 -0800)]
Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random

Pull random fixes from Ted Ts'o:
 "Fix a circular locking dependency in random's collection of cputime
  used by a thread when it exits."

* tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random:
  random: fix locking dependency with the tasklist_lock

11 years agovfs: don't BUG_ON() if following a /proc fd pseudo-symlink results in a symlink
Linus Torvalds [Fri, 8 Mar 2013 17:03:07 +0000 (09:03 -0800)]
vfs: don't BUG_ON() if following a /proc fd pseudo-symlink results in a symlink

It's "normal" - it can happen if the file descriptor you followed was
opened with O_NOFOLLOW.

Reported-by: Dave Jones <davej@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
11 years agodoc: virtual: Fix typos in virtio-spec.txt
Masanari Iida [Fri, 8 Mar 2013 09:56:31 +0000 (10:56 +0100)]
doc: virtual: Fix typos in virtio-spec.txt

Correct spelling typo in documentation/virtual/virtio-spec.txt

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Rob Landley <rob@landley.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
11 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Thu, 7 Mar 2013 23:57:38 +0000 (15:57 -0800)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Peter Anvin:
 "Several boot fixes (MacBook, legacy EFI bootloaders), another
  please-don't-brick fix, and some minor stuff."

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86: Do not try to sync identity map for non-mapped pages
  x86, doc: Be explicit about what the x86 struct boot_params requires
  x86: Don't clear efi_info even if the sentinel hits
  x86, mm: Make sure to find a 2M free block for the first mapped area
  x86: Fix 32-bit *_cpu_data initializers
  efivarfs: return accurate error code in efivarfs_fill_super()
  efivars: efivarfs_valid_name() should handle pstore syntax
  efi: be more paranoid about available space when creating variables
  iommu, x86: Add DMA remap fault reason
  x86, smpboot: Remove unused variable

11 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Thu, 7 Mar 2013 22:55:54 +0000 (14:55 -0800)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Misc radeon, nouveau, mgag200 and intel fixes.

  The intel fixes should contain the fix for the touchpad on the
  Chromebook - hey I'm an input maintainer now!"

Hate to pee on your parade, Dave, but I don't think being an input
maintainer is necessarily something to strive for..

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (25 commits)
  drm/tegra: drop "select DRM_HDMI"
  drm: Documentation typo fixes
  drm/mgag200: Bug fix: Renesas board now selects native resolution.
  drm/mgag200: Reject modes that are too big for VRAM
  drm/mgag200: 'fbdev_list' in 'struct mga_fbdev' is not used
  drm/radeon: don't check mipmap alignment if MIP_ADDRESS is FMASK
  drm/radeon: skip MC reset as it's probably not hung
  drm/radeon: add primary dac adj quirk for R200 board
  drm/radeon: don't set hpd, afmt interrupts when interrupts are disabled
  drm/i915: Turn off hsync and vsync on ADPA when disabling crt
  drm/i915: Fix incorrect definition of ADPA HSYNC and VSYNC bits
  drm/i915: also disable south interrupts when handling them
  drm/i915: enable irqs earlier when resuming
  drm/i915: Increase the RC6p threshold.
  DRM/i915: On G45 enable cursor plane briefly after enabling the display plane.
  drm/nv50-: prevent some races between modesetting and page flipping
  drm/nouveau/i2c: drop parent refcount when creating ports
  drm/nv84: fix regression in page flipping
  drm/nouveau: Fix typo in init_idx_addr_latched().
  drm/nouveau: Disable AGP on PowerPC again.
  ...

11 years agoMerge tag 'pm+acpi-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Thu, 7 Mar 2013 22:54:28 +0000 (14:54 -0800)]
Merge tag 'pm+acpi-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI and power management fixes from Rafael J Wysocki:

 - Two fixes for the new intel_pstate driver from Dirk Brandewie.

 - Fix for incorrect usage of the .find_bridge() callback from struct
   acpi_bus_type in the USB core and subsequent removal of that callback
   from Rafael J Wysocki.

 - ACPI processor driver cleanups from Chen Gang and Syam Sidhardhan.

 - ACPI initialization and error messages fix from Joe Perches.

 - Operating Performance Points documentation improvement from Nishanth
   Menon.

 - Fixes for memory leaks and potential concurrency issues and sysfs
  attributes leaks during device removal in the core device PM QoS code
  from Rafael J Wysocki.

 - Calxeda Highbank cpufreq driver simplification from Emilio López.

 - cpufreq comment cleanup from Namhyung Kim.

 - Fix for a section mismatch in Calxeda Highbank interprocessor
   communication code from Mark Langsdorf (this is not a PM fix strictly
   speaking, but the code in question went in through the PM tree).

* tag 'pm+acpi-3.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  cpufreq / intel_pstate: Do not load on VM that does not report max P state.
  cpufreq / intel_pstate: Fix intel_pstate_init() error path
  ACPI / glue: Drop .find_bridge() callback from struct acpi_bus_type
  ACPI / glue: Add .match() callback to struct acpi_bus_type
  ACPI / porocessor: Beautify code, pr->id is u32 which is never < 0
  ACPI / processor: Remove redundant NULL check before kfree
  ACPI / Sleep: Avoid interleaved message on errors
  PM / QoS: Remove device PM QoS sysfs attributes at the right place
  PM / QoS: Fix concurrency issues and memory leaks in device PM QoS
  cpufreq: highbank: do not initialize array with a loop
  PM / OPP: improve introductory documentation
  cpufreq: Fix a typo in comment
  mailbox, pl320-ipc: remove __init from probe function