]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
12 years agoMerge remote-tracking branch 'bluetooth/master'
Stephen Rothwell [Tue, 16 Oct 2012 23:49:11 +0000 (10:49 +1100)]
Merge remote-tracking branch 'bluetooth/master'

12 years agoMerge remote-tracking branch 'cpuidle/cpuidle-next'
Stephen Rothwell [Tue, 16 Oct 2012 23:48:33 +0000 (10:48 +1100)]
Merge remote-tracking branch 'cpuidle/cpuidle-next'

Conflicts:
drivers/cpuidle/coupled.c
include/linux/cpuidle.h

12 years agoMerge remote-tracking branch 'kbuild/for-next'
Stephen Rothwell [Tue, 16 Oct 2012 23:48:05 +0000 (10:48 +1100)]
Merge remote-tracking branch 'kbuild/for-next'

12 years agoMerge remote-tracking branch 'v4l-dvb/master'
Stephen Rothwell [Tue, 16 Oct 2012 23:47:57 +0000 (10:47 +1100)]
Merge remote-tracking branch 'v4l-dvb/master'

12 years agoMerge remote-tracking branch 'hwmon-staging/hwmon-next'
Stephen Rothwell [Tue, 16 Oct 2012 23:46:29 +0000 (10:46 +1100)]
Merge remote-tracking branch 'hwmon-staging/hwmon-next'

12 years agoMerge branch 'quilt/i2c'
Stephen Rothwell [Tue, 16 Oct 2012 23:44:56 +0000 (10:44 +1100)]
Merge branch 'quilt/i2c'

12 years agoMerge remote-tracking branch 'hid/for-next'
Stephen Rothwell [Tue, 16 Oct 2012 23:44:53 +0000 (10:44 +1100)]
Merge remote-tracking branch 'hid/for-next'

Conflicts:
drivers/hid/hid-multitouch.c

12 years agoMerge remote-tracking branch 'ubifs/linux-next'
Stephen Rothwell [Tue, 16 Oct 2012 23:42:57 +0000 (10:42 +1100)]
Merge remote-tracking branch 'ubifs/linux-next'

12 years agoMerge remote-tracking branch 'v9fs/for-next'
Stephen Rothwell [Tue, 16 Oct 2012 23:42:49 +0000 (10:42 +1100)]
Merge remote-tracking branch 'v9fs/for-next'

12 years agoMerge remote-tracking branch 'ocfs2/linux-next'
Stephen Rothwell [Tue, 16 Oct 2012 23:40:53 +0000 (10:40 +1100)]
Merge remote-tracking branch 'ocfs2/linux-next'

12 years agoMerge remote-tracking branch 'nfs/linux-next'
Stephen Rothwell [Tue, 16 Oct 2012 23:39:18 +0000 (10:39 +1100)]
Merge remote-tracking branch 'nfs/linux-next'

12 years agoMerge remote-tracking branch 'logfs/master'
Stephen Rothwell [Tue, 16 Oct 2012 23:37:37 +0000 (10:37 +1100)]
Merge remote-tracking branch 'logfs/master'

12 years agoMerge remote-tracking branch 'gfs2/master'
Stephen Rothwell [Tue, 16 Oct 2012 23:36:06 +0000 (10:36 +1100)]
Merge remote-tracking branch 'gfs2/master'

12 years agoMerge remote-tracking branch 'fuse/for-next'
Stephen Rothwell [Tue, 16 Oct 2012 23:34:23 +0000 (10:34 +1100)]
Merge remote-tracking branch 'fuse/for-next'

12 years agoMerge remote-tracking branch 'ext3/for_next'
Stephen Rothwell [Tue, 16 Oct 2012 23:32:51 +0000 (10:32 +1100)]
Merge remote-tracking branch 'ext3/for_next'

12 years agoMerge remote-tracking branch 'xtensa/for_next'
Stephen Rothwell [Tue, 16 Oct 2012 23:31:16 +0000 (10:31 +1100)]
Merge remote-tracking branch 'xtensa/for_next'

12 years agoMerge remote-tracking branch 'unicore32/unicore32'
Stephen Rothwell [Tue, 16 Oct 2012 23:29:46 +0000 (10:29 +1100)]
Merge remote-tracking branch 'unicore32/unicore32'

12 years agoMerge remote-tracking branch 'sh/sh-latest'
Stephen Rothwell [Tue, 16 Oct 2012 23:28:10 +0000 (10:28 +1100)]
Merge remote-tracking branch 'sh/sh-latest'

12 years agoMerge remote-tracking branch 's390/features'
Stephen Rothwell [Tue, 16 Oct 2012 23:26:38 +0000 (10:26 +1100)]
Merge remote-tracking branch 's390/features'

12 years agoMerge remote-tracking branch 'mpc5xxx/next'
Stephen Rothwell [Tue, 16 Oct 2012 23:25:02 +0000 (10:25 +1100)]
Merge remote-tracking branch 'mpc5xxx/next'

12 years agoMerge remote-tracking branch 'parisc/for-next'
Stephen Rothwell [Tue, 16 Oct 2012 23:23:31 +0000 (10:23 +1100)]
Merge remote-tracking branch 'parisc/for-next'

12 years agoMerge remote-tracking branch 'mips/mips-for-linux-next'
Stephen Rothwell [Tue, 16 Oct 2012 23:21:57 +0000 (10:21 +1100)]
Merge remote-tracking branch 'mips/mips-for-linux-next'

12 years agoMerge remote-tracking branch 'microblaze/next'
Stephen Rothwell [Tue, 16 Oct 2012 23:20:24 +0000 (10:20 +1100)]
Merge remote-tracking branch 'microblaze/next'

12 years agoMerge remote-tracking branch 'cris/for-next'
Stephen Rothwell [Tue, 16 Oct 2012 23:18:53 +0000 (10:18 +1100)]
Merge remote-tracking branch 'cris/for-next'

12 years agoMerge remote-tracking branch 'blackfin/for-linus'
Stephen Rothwell [Tue, 16 Oct 2012 23:17:19 +0000 (10:17 +1100)]
Merge remote-tracking branch 'blackfin/for-linus'

12 years agoMerge remote-tracking branch 'arm64/upstream'
Stephen Rothwell [Tue, 16 Oct 2012 23:15:49 +0000 (10:15 +1100)]
Merge remote-tracking branch 'arm64/upstream'

12 years agoMerge remote-tracking branch 'arm-perf/for-next/perf'
Stephen Rothwell [Tue, 16 Oct 2012 23:14:15 +0000 (10:14 +1100)]
Merge remote-tracking branch 'arm-perf/for-next/perf'

12 years agoMerge remote-tracking branch 'spi-current/spi/merge'
Stephen Rothwell [Tue, 16 Oct 2012 23:07:03 +0000 (10:07 +1100)]
Merge remote-tracking branch 'spi-current/spi/merge'

12 years agoMerge remote-tracking branch 'devicetree-current/devicetree/merge'
Stephen Rothwell [Tue, 16 Oct 2012 23:06:52 +0000 (10:06 +1100)]
Merge remote-tracking branch 'devicetree-current/devicetree/merge'

12 years agoMerge remote-tracking branch 'usb.current/usb-linus'
Stephen Rothwell [Tue, 16 Oct 2012 23:06:38 +0000 (10:06 +1100)]
Merge remote-tracking branch 'usb.current/usb-linus'

12 years agoMerge remote-tracking branch 'tty.current/tty-linus'
Stephen Rothwell [Tue, 16 Oct 2012 23:06:37 +0000 (10:06 +1100)]
Merge remote-tracking branch 'tty.current/tty-linus'

12 years agoMerge remote-tracking branch 'wireless/master'
Stephen Rothwell [Tue, 16 Oct 2012 23:06:36 +0000 (10:06 +1100)]
Merge remote-tracking branch 'wireless/master'

12 years agoMerge remote-tracking branch 'sound-current/for-linus'
Stephen Rothwell [Tue, 16 Oct 2012 23:06:35 +0000 (10:06 +1100)]
Merge remote-tracking branch 'sound-current/for-linus'

12 years agoMerge remote-tracking branch 'net/master'
Stephen Rothwell [Tue, 16 Oct 2012 23:06:34 +0000 (10:06 +1100)]
Merge remote-tracking branch 'net/master'

12 years agoMerge remote-tracking branch 'sparc/master'
Stephen Rothwell [Tue, 16 Oct 2012 23:06:34 +0000 (10:06 +1100)]
Merge remote-tracking branch 'sparc/master'

12 years agoMerge remote-tracking branch 'm68k-current/for-linus'
Stephen Rothwell [Tue, 16 Oct 2012 23:06:32 +0000 (10:06 +1100)]
Merge remote-tracking branch 'm68k-current/for-linus'

12 years agoMerge branch 'next/p1/for-linus' into mips-for-linux-next
Ralf Baechle [Tue, 16 Oct 2012 22:23:05 +0000 (00:23 +0200)]
Merge branch 'next/p1/for-linus' into mips-for-linux-next

12 years agoMIPS: hugetlbfs: Fix hazard between tlb write and pagemask restoration.
Ralf Baechle [Tue, 16 Oct 2012 22:19:40 +0000 (00:19 +0200)]
MIPS: hugetlbfs: Fix hazard between tlb write and pagemask restoration.

On some CPU the write to pagemask might complete before the TLB write
instruction reads from the pagemask register.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Transparent Huge Pages support
Ralf Baechle [Tue, 16 Oct 2012 22:04:06 +0000 (00:04 +0200)]
MIPS: Transparent Huge Pages support

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Restore pagemask after dumping the TLB.
Ralf Baechle [Tue, 16 Oct 2012 22:08:36 +0000 (00:08 +0200)]
MIPS: Restore pagemask after dumping the TLB.

Or bad things might happen if the last TLB entry isn't a basic size page.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Quick debug helper to dump page table for an addres to the console.
Ralf Baechle [Tue, 16 Oct 2012 22:04:01 +0000 (00:04 +0200)]
MIPS: Quick debug helper to dump page table for an addres to the console.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Hugetlbfs: Handle huge pages correctly in pmd_bad()
Ralf Baechle [Tue, 16 Oct 2012 20:20:30 +0000 (22:20 +0200)]
MIPS: Hugetlbfs: Handle huge pages correctly in pmd_bad()

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: page.h: Provide more readable definition for PAGE_MASK.
Ralf Baechle [Tue, 16 Oct 2012 20:20:27 +0000 (22:20 +0200)]
MIPS: page.h: Provide more readable definition for PAGE_MASK.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: tlbex: Better debug output.
Ralf Baechle [Tue, 16 Oct 2012 20:20:26 +0000 (22:20 +0200)]
MIPS: tlbex: Better debug output.

Pgtable bits are assigned dynamically depending on processor feature and
statically based on kernel configuration.  To make sense out of the
disassembled TLB exception handlers a list of the actual assignments
used for a particular configuration and hardware setup can be very useful.

Output the actual TLB exception handlers in a format that simplifies their
post processsing from dmesg output.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: N32: Remove unused defines.
Ralf Baechle [Tue, 16 Oct 2012 20:20:25 +0000 (22:20 +0200)]
MIPS: N32: Remove unused defines.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: pgtable.h: Remove commented out debugging printk.
Ralf Baechle [Tue, 16 Oct 2012 20:20:23 +0000 (22:20 +0200)]
MIPS: pgtable.h: Remove commented out debugging printk.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Remove R5000A.
Ralf Baechle [Tue, 16 Oct 2012 20:14:48 +0000 (22:14 +0200)]
MIPS: Remove R5000A.

From a software perspective R5000 and R5000A are the same thing which is
why the symbol CPU_R5000A never got used, so finally delete it.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: R5000: Fix TLB hazard handling.
Ralf Baechle [Tue, 16 Oct 2012 20:13:06 +0000 (22:13 +0200)]
MIPS: R5000: Fix TLB hazard handling.

R5000 and the Nevada CPUs (RM5230, RM5231, RM5260, RM5261, RM5270 and
RM5271) are basically the same CPU core and all are documented to require
two instructions separating a write to c0_pagemask, c0_entryhi, c0_entrylo0,
c0_entrylo1 or c0_index.

So far we were only providing on cycle before / after a TLBR/TLBWI
for R5000 but 3 cycles before and 1 cycles after for the Nevadas.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: tlbex: Deal with re-definition of label
Ralf Baechle [Sat, 13 Oct 2012 20:46:26 +0000 (22:46 +0200)]
MIPS: tlbex: Deal with re-definition of label

The microassembler used in tlbex.c does not notice if a label is redefined
resulting in relocations against such labels silently missrelocated.
The issues exists since commit add6eb04776db4189ea89f596cbcde31b899be9d
[Synthesize TLB exception handlers at runtime.] in 2.6.10 and went unnoticed
for so long because the relocations for the affected branches got computed
to do something *almost* sensible.

The issue affects R4000, R4400, QED/IDT RM5230, RM5231, RM5260, RM5261,
RM5270 and RM5271 processors.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agoMIPS: Make __{,n,u}delay declarations match definitions and generic delay.h
David Daney [Fri, 28 Sep 2012 18:34:10 +0000 (11:34 -0700)]
MIPS: Make __{,n,u}delay declarations match definitions and generic delay.h

At some recent point arch/mips/include/asm/delay.h has started being
included into csrc-octeon.c where the __?delay() functions are defined.
This causes a compile failure due to conflicting declarations and
definitions of the functions.

It turns out that the generic definitions in arch/mips/lib/delay.c also
conflict.

Proposed fix: Declare the functions to take unsigned long parameters
just like asm-generic (and x86) does.  Update __delay to agree
(__ndelay and __udelay need no change).

Bonus: Get rid of 'inline' from __delay() definition, as it is globally
visible, and the compiler should be making this decision itself (it does
in fact inline the function without being told to).

Signed-off-by: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/4354/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
12 years agosparc64: Fix bit twiddling in sparc_pmu_enable_event().
David S. Miller [Tue, 16 Oct 2012 20:05:25 +0000 (13:05 -0700)]
sparc64: Fix bit twiddling in sparc_pmu_enable_event().

There was a serious disconnect in the logic happening in
sparc_pmu_disable_event() vs. sparc_pmu_enable_event().

Event disable is implemented by programming a NOP event into the PCR.

However, event enable was not reversing this operation.  Instead, it
was setting the User/Priv/Hypervisor trace enable bits.

That's not sparc_pmu_enable_event()'s job, that's what
sparc_pmu_enable() and sparc_pmu_disable() do .

The intent of sparc_pmu_enable_event() is clear, since it first clear
out the event type encoding field.  So fix this by OR'ing in the event
encoding rather than the trace enable bits.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: addrconf: fix /proc/net/if_inet6
Eric Dumazet [Tue, 16 Oct 2012 07:37:27 +0000 (07:37 +0000)]
ipv6: addrconf: fix /proc/net/if_inet6

Commit 1d5783030a1 (ipv6/addrconf: speedup /proc/net/if_inet6 filling)
added bugs hiding some devices from if_inet6 and breaking applications.

"ip -6 addr" could still display all IPv6 addresses, while "ifconfig -a"
couldnt.

One way to reproduce the bug is by starting in a shell :

unshare -n /bin/bash
ifconfig lo up

And in original net namespace, lo device disappeared from if_inet6

Reported-by: Jan Hinnerk Stosch <janhinnerk.stosch@gmail.com>
Tested-by: Jan Hinnerk Stosch <janhinnerk.stosch@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Mihai Maruseac <mihai.maruseac@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: fix handling mf storage modes
Dmitry Kravkov [Tue, 16 Oct 2012 01:28:27 +0000 (01:28 +0000)]
bnx2x: fix handling mf storage modes

Since commit a3348722 AFEX FCoE function is continuously reset.
The patch prevents the resetting and removes debug print
to stop garbaging syslog.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqeth: fix deadlock between recovery and bonding driver
Stefan Raspl [Mon, 15 Oct 2012 19:21:18 +0000 (19:21 +0000)]
qeth: fix deadlock between recovery and bonding driver

The recovery thread, when failing, tears down the respective interface. To do
so, it needs to obtain the rtnl lock first, as the interface configuration is
changed.
If another process tries to modify an interface setting at the same time, that
process can obtain the rtnl lock first, but the respective callback in the qeth
driver will block until recovery has completed - which cannot happen since the
calling process already obtained it.
In one particular case, the bonding driver acquired the rtnl lock to modify the
card's MAC address, while the recovery failed at the same time due to the card
being removed. Hence qeth_l2_set_mac_address (implicitly holding the rtnl lock)
was waiting on qeth_l2_recover, which deadlocked when waiting on the rtnl lock.
This patch uses rtnl_trylock instead of rtnl_lock in the recovery thread. If the
lock cannot be obtained, the interface will be left up, but the card state
remains in CARD_STATE_RECOVER, which will prevent any further activities on the
card.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosmsgiucv: reestablish IUCV path after resume
Hendrik Brueckner [Mon, 15 Oct 2012 19:21:17 +0000 (19:21 +0000)]
smsgiucv: reestablish IUCV path after resume

smsg_pm_restore_thaw() uses wrong checking before reconnecting
the IUCV path to *MSG. It is corrected with this patch.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosctp: fix call to SCTP_CMD_PROCESS_SACK in sctp_cmd_interpreter()
Zijie Pan [Mon, 15 Oct 2012 03:56:39 +0000 (03:56 +0000)]
sctp: fix call to SCTP_CMD_PROCESS_SACK in sctp_cmd_interpreter()

Bug introduced by commit edfee0339e681a784ebacec7e8c2dc97dc6d2839
(sctp: check src addr when processing SACK to update transport state)

Signed-off-by: Zijie Pan <zijie.pan@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agovlan: fix bond/team enslave of vlan challenged slave/port
Jiri Pirko [Sun, 14 Oct 2012 04:30:56 +0000 (04:30 +0000)]
vlan: fix bond/team enslave of vlan challenged slave/port

In vlan_uses_dev() check for number of vlan devs rather than existence
of vlan_info. The reason is that vlan id 0 is there without appropriate
vlan dev on it by default which prevented from enslaving vlan challenged
dev.

Reported-by: Jon Stanley <jstanley@rmrf.net>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMAINTAINERS: Add explicit section for IPSEC networking.
David S. Miller [Tue, 16 Oct 2012 18:08:40 +0000 (14:08 -0400)]
MAINTAINERS: Add explicit section for IPSEC networking.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoUSB: fix port probing and removal in garmin_gps
Alan Stern [Wed, 10 Oct 2012 18:10:21 +0000 (14:10 -0400)]
USB: fix port probing and removal in garmin_gps

This patch (as1615) fixes a bug in the Garmin USB serial driver.  It
uses attach, disconnect, and release routines to carry out actions
that should be handled by port_probe and port_remove routines, because
they access port-specific data.

The bug causes an oops when the device in unplugged, because the
private data for each port structure now gets erased when the port is
unbound from the driver, resulting in a null-pointer dereference.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported--by: Markus Schauler <mschauler@gmail.com>
Tested-by: Markus Schauler <mschauler@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: pl2303: fix port-data memory leak
Johan Hovold [Mon, 15 Oct 2012 13:47:21 +0000 (15:47 +0200)]
USB: pl2303: fix port-data memory leak

Fix port-data memory leak by allocating and freeing port data in
port_probe/remove rather than in attach/release, and by introducing
serial private data to store the device type which is interface rather
than port specific.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: cp210x: fix port-data memory leak
Johan Hovold [Mon, 15 Oct 2012 13:47:20 +0000 (15:47 +0200)]
USB: cp210x: fix port-data memory leak

Fix port data memory leak by replacing port private data with serial
private data.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at
release.

The private data is used to store the control interface number, but as
this is the same for all ports on an interface it should be stored as
usb-serial data anyway.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: belkin_sa: fix port-data memory leak
Johan Hovold [Mon, 15 Oct 2012 16:20:53 +0000 (18:20 +0200)]
USB: belkin_sa: fix port-data memory leak

Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Note that the write waitqueue was initialised but never used.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: cyberjack: fix port-data memory leak
Johan Hovold [Mon, 15 Oct 2012 16:20:54 +0000 (18:20 +0200)]
USB: cyberjack: fix port-data memory leak

Fix port-data memory leak by replacing attach and release with
port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at release as
it is no longer accessible.

Note that the write waitqueue was initialised but never used.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: ark3116: fix NULL-pointer dereference
Johan Hovold [Mon, 15 Oct 2012 16:20:52 +0000 (18:20 +0200)]
USB: ark3116: fix NULL-pointer dereference

Fix NULL-pointer dereference at release by replacing attach and release
with port_probe and port_remove.

Since commit 0998d0631001288 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is NULL when release is called.

Compile-only tested.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agolockd: Remove BUG_ON()s from fs/lockd/clntproc.c
Trond Myklebust [Mon, 15 Oct 2012 21:28:45 +0000 (17:28 -0400)]
lockd: Remove BUG_ON()s from fs/lockd/clntproc.c

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agolockd: Remove BUG_ON()s in fs/lockd/host.c
Trond Myklebust [Mon, 15 Oct 2012 21:26:20 +0000 (17:26 -0400)]
lockd: Remove BUG_ON()s in fs/lockd/host.c

- Convert the non-trivial ones into WARN_ON_ONCE().
- Remove the trivial refcounting BUGs

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agolockd: Remove trivial BUG_ON()s from the NSM code
Trond Myklebust [Mon, 15 Oct 2012 21:21:04 +0000 (17:21 -0400)]
lockd: Remove trivial BUG_ON()s from the NSM code

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agolockd: Remove unnecessary BUG_ON()s in the xdr client code
Trond Myklebust [Mon, 15 Oct 2012 21:14:38 +0000 (17:14 -0400)]
lockd: Remove unnecessary BUG_ON()s in the xdr client code

- Offset bound checks are done in the NFS client code.
- So are filehandle size checks
- The cookie length is a constant
- The utsname()->nodename is already bounded

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agoNFS: Remove the BUG_ON() in the mount code
Trond Myklebust [Mon, 15 Oct 2012 20:25:42 +0000 (16:25 -0400)]
NFS: Remove the BUG_ON() in the mount code

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agoNFS: Remove BUG_ON()s in the fs/nfs/inode.c
Trond Myklebust [Mon, 15 Oct 2012 20:19:30 +0000 (16:19 -0400)]
NFS: Remove BUG_ON()s in the fs/nfs/inode.c

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agoNFSv4: Get rid of unnecessary BUG_ON()s
Trond Myklebust [Mon, 15 Oct 2012 19:47:41 +0000 (15:47 -0400)]
NFSv4: Get rid of unnecessary BUG_ON()s

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agoNFS: Remove BUG_ON() calls from the generic writeback code
Trond Myklebust [Mon, 15 Oct 2012 19:02:01 +0000 (15:02 -0400)]
NFS: Remove BUG_ON() calls from the generic writeback code

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agoNFSv4.1: Remove assertion BUG_ON()s from the files and generic layout code
Trond Myklebust [Mon, 15 Oct 2012 18:58:04 +0000 (14:58 -0400)]
NFSv4.1: Remove assertion BUG_ON()s from the files and generic layout code

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agoNFSv4.1: Remove unused function last_byte_offset
Trond Myklebust [Mon, 15 Oct 2012 18:47:33 +0000 (14:47 -0400)]
NFSv4.1: Remove unused function last_byte_offset

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agoNFSv4: Remove the BUG_ON() from nfs4_get_lease_time_prepare()...
Trond Myklebust [Mon, 15 Oct 2012 17:14:43 +0000 (13:14 -0400)]
NFSv4: Remove the BUG_ON() from nfs4_get_lease_time_prepare()...

An EAGAIN return value would be unexpected, but there is no reason to
BUG...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agoNFS: Remove asserts from the NFS XDR code
Trond Myklebust [Mon, 15 Oct 2012 15:51:21 +0000 (11:51 -0400)]
NFS: Remove asserts from the NFS XDR code

Convert the ones that are not trivial to check into WARN_ON_ONCE().
Remove checks for things such as NFS2_MAXPATHLEN, which are trivially
done by the caller.

Add a comment to the case of nfs3_xdr_enc_setacl3args. What is being
done there is just wrong...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agoNFS: Get rid of unnecessary asserts
Trond Myklebust [Mon, 15 Oct 2012 15:24:57 +0000 (11:24 -0400)]
NFS: Get rid of unnecessary asserts

If the nfs_client fails to initialise correctly, then it will
return an error condition.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agoNFSv4: Fix the return value for nfs_callback_start_svc
Trond Myklebust [Tue, 16 Oct 2012 16:30:44 +0000 (12:30 -0400)]
NFSv4: Fix the return value for nfs_callback_start_svc

returning PTR_ERR(cb_info->task) just after we have set it to
NULL looks like a typo...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Stanislav Kinsbursky <skinsbursky@parallels.com>
12 years agoNFSv4.1: Declare osd_pri_2_pnfs_err(), objio_init_read/write to be static
Trond Myklebust [Tue, 16 Oct 2012 16:34:56 +0000 (12:34 -0400)]
NFSv4.1: Declare osd_pri_2_pnfs_err(), objio_init_read/write to be static

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agoNFSv4: fs/nfs/nfs4getroot.c needs to include "internal.h"
Trond Myklebust [Tue, 16 Oct 2012 16:32:24 +0000 (12:32 -0400)]
NFSv4: fs/nfs/nfs4getroot.c needs to include "internal.h"

Fix a warning about "no previous prototype for ‘nfs4_get_rootfh’"

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agosparc64: Add global PMU register dumping via sysrq.
David S. Miller [Tue, 16 Oct 2012 16:34:01 +0000 (09:34 -0700)]
sparc64: Add global PMU register dumping via sysrq.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoarm64: No need to set the x0-x2 registers in start_thread()
Catalin Marinas [Tue, 16 Oct 2012 16:07:46 +0000 (17:07 +0100)]
arm64: No need to set the x0-x2 registers in start_thread()

For historical reasons, ARM used to set r0-r2 in start_thread() to the
first values on the user stack when starting a new user application. The
same logic has been inherited in AArch64. The x0 register is overridden
by the sys_execve() return value so it's always zero on success. The x1
and x2 registers are ignored by AArch64 and EABI AArch32 applications,
so we can safely remove the register setting for both native and compat
user space.

This also fixes a potential fault with the kernel accessing user space
stack directly.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoarm64: Ignore memory blocks below PHYS_OFFSET
Catalin Marinas [Tue, 16 Oct 2012 11:00:29 +0000 (12:00 +0100)]
arm64: Ignore memory blocks below PHYS_OFFSET

According to Documentation/arm64/booting.txt, the kernel image must be
loaded at a pre-defined offset from the start of RAM so that the kernel
can calculate PHYS_OFFSET based on this address. If the DT contains
memory blocks below this PHYS_OFFSET, report them and ignore the
corresponding memory range.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
12 years agoarm64: Fix the update_vsyscall() prototype
Catalin Marinas [Tue, 16 Oct 2012 10:44:53 +0000 (11:44 +0100)]
arm64: Fix the update_vsyscall() prototype

With commit 576094b7 (time: Introduce new GENERIC_TIME_VSYSCALL) the old
update_vsyscall() prototype is no longer available. This patch updates
the arm64 port.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: John Stultz <john.stultz@linaro.org>
12 years agoarm64: Select MODULES_USE_ELF_RELA
Catalin Marinas [Tue, 16 Oct 2012 10:26:57 +0000 (11:26 +0100)]
arm64: Select MODULES_USE_ELF_RELA

With commit 786d35d4 (make most arch asm/module.h files use
asm-generic/module.h) arm64 needs to enable MODULES_USE_ELF_RELA for
loadable modules.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
12 years agoarm64: Remove duplicate inclusion of mmu_context.h in smp.c
Sachin Kamat [Sat, 13 Oct 2012 08:25:58 +0000 (09:25 +0100)]
arm64: Remove duplicate inclusion of mmu_context.h in smp.c

asm/mmu_context.h was included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
12 years agoALSA: hda - Stop LPIB delay counting on broken hardware
Takashi Iwai [Tue, 16 Oct 2012 14:52:26 +0000 (16:52 +0200)]
ALSA: hda - Stop LPIB delay counting on broken hardware

If LPIB reports a pretty bad value, we can't trust such hardware for
calculating the PCM delay.  Automatically turn off the delay counting
when such a problem is encountered.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=48911

Cc: <stable@vger.kernel.org> [v3.6]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoGFS2: Fix FITRIM argument handling
Lukas Czerner [Tue, 16 Oct 2012 09:39:08 +0000 (11:39 +0200)]
GFS2: Fix FITRIM argument handling

Currently implementation in gfs2 uses FITRIM arguments as it were in
file system blocks units which is wrong. The FITRIM arguments
(fstrim_range.start, fstrim_range.len and fstrim_range.minlen) are
actually in bytes.

Moreover, check for start argument beyond the end of file system, len
argument being smaller than file system block and minlen argument being
bigger than biggest resource group were missing.

This commit converts the code to convert FITRIM argument to file system
blocks and also adds appropriate checks mentioned above.

All the problems were recognised by xfstests 251 and 260.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
12 years agoGFS2: Require user to provide argument for FITRIM
Lukas Czerner [Tue, 16 Oct 2012 09:39:07 +0000 (11:39 +0200)]
GFS2: Require user to provide argument for FITRIM

When the fstrim_range argument is not provided by user in FITRIM ioctl
we should just return EFAULT and not promoting bad behaviour by filling
the structure in kernel. Let the user deal with it.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
12 years agoxtensa: Use Kbuild infrastructure to handle asm-generic headers
Max Filippov [Sun, 14 Oct 2012 23:55:41 +0000 (03:55 +0400)]
xtensa: Use Kbuild infrastructure to handle asm-generic headers

Use Kbuild infrastructure to handle the asm-generic headers
and remove the wrapper headers that call them.

This only affects headers that do nothing but include the generic
equivalent. It does not touch any header that does a little more.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
12 years agoUAPI: (Scripted) Disintegrate arch/xtensa/include/asm
David Howells [Sun, 14 Oct 2012 23:55:40 +0000 (03:55 +0400)]
UAPI: (Scripted) Disintegrate arch/xtensa/include/asm

UAPI: (Scripted) Disintegrate arch/xtensa/include/asm

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Michael Kerrisk <mtk.manpages@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Dave Jones <davej@redhat.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
12 years agoxtensa: fix unaligned usermode access
Max Filippov [Mon, 15 Oct 2012 17:23:02 +0000 (21:23 +0400)]
xtensa: fix unaligned usermode access

- correct use of .config #define name;
      CONFIG_UNALIGNED_USER ---> CONFIG_XTENSA_UNALIGNED_USER

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Pete Delaney <piet@tensilica.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
12 years agoxtensa: reorganize SR referencing
Max Filippov [Sun, 14 Oct 2012 23:55:38 +0000 (03:55 +0400)]
xtensa: reorganize SR referencing

- reference SRs by names where possible, not by numbers;
- get rid of __stringify around SR names where possible;
- remove unneeded SR names from asm/regs.h;
- add SREG_ prefix to remaining SR names;

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
12 years agoxtensa: fix boot parameters parsing
Max Filippov [Sun, 14 Oct 2012 23:55:37 +0000 (03:55 +0400)]
xtensa: fix boot parameters parsing

Boot parameter tags with handlers are ignored like this:

[    0.000000] Ignoring tag 0x00001003
[    0.000000] Ignoring tag 0x00001001
[    0.000000] Ignoring tag 0x00001004

because neither tagtable entries nor tag handlers appear in the vmlinux.

Fix tagtable definition attributes so that tag entries are not dropped.

Fix end of memory bank calculation in parse_tag_mem: it is intended to
round down to page size, but instead did something strange leading to
hang right after boot.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
12 years agoxtensa: fix missing return in do_page_fault for SIGBUS case
Marc Gauthier [Sun, 14 Oct 2012 23:55:36 +0000 (03:55 +0400)]
xtensa: fix missing return in do_page_fault for SIGBUS case

Signed-off-by: Marc Gauthier <marc@tensilica.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
12 years agoxtensa: copy_thread with CLONE_VM must not copy live parent AR windows
Marc Gauthier [Sun, 14 Oct 2012 23:55:35 +0000 (03:55 +0400)]
xtensa: copy_thread with CLONE_VM must not copy live parent AR windows

When doing a fork (new VM), the new task has a mirror image of the
parent's stack, so keeps the same live register windows etc.
However when doing a clone with CLONE_VM, keeping the same VM
(eg. when creating a new thread), the child starts afresh on a new
stack -- it cannot share any part of the parent stack.  It
especially cannot have the same live AR windows as the parent,
otherwise it will overwrite the parent stack on overflow, likely
causing corruption.  (and so it did...)

Effectively, the register windows need to be spilled.
Turns out it's much easier to simply not copy parent register
windows when CLONE_VM is set.

Signed-off-by: Marc Gauthier <marc@tensilica.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
12 years agoxtensa: fix memmove(), bcopy(), and memcpy().
Chris Zankel [Tue, 16 Oct 2012 04:41:19 +0000 (21:41 -0700)]
xtensa: fix memmove(), bcopy(), and memcpy().

- fix memmove to correctly handle overlapping src and dst;
- fix memcpy loop ending conditions from signed '<=' to '!=';
- modify bcopy to call memmove;

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
12 years agoxtensa: ISS: fix rs_put_char
Max Filippov [Sun, 14 Oct 2012 23:55:33 +0000 (03:55 +0400)]
xtensa: ISS: fix rs_put_char

ISS serial console prints garbage instead of symbols printed via
rs_put_char. gcc optimizes away putting prined symbol into memory buffer
because there's no evidence that the buffer is used afterwards.

Make rs_put_char and rs_write use simc_write that has explicit wmb.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
12 years agoxtensa: ISS: fix specific simcalls
Max Filippov [Sun, 14 Oct 2012 23:55:32 +0000 (03:55 +0400)]
xtensa: ISS: fix specific simcalls

Simcalls that take memory buffer definitely need wmb or rmb to make sure
gcc doesn't optimize away code that fills the buffer.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>
12 years agoi2c-stub: Move to drivers/i2c
Jean Delvare [Mon, 15 Oct 2012 23:13:43 +0000 (10:13 +1100)]
i2c-stub: Move to drivers/i2c

Move the i2c-stub driver to drivers/i2c, to match the Kconfig entry.
This is less confusing that way.

I also fixed all checkpatch warnings and errors.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Peter Huewe <peterhuewe@gmx.de>