]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
10 years agostaging: iio: ade7854-spi: Fix return value
Sachin Kamat [Wed, 11 Sep 2013 09:32:00 +0000 (10:32 +0100)]
staging: iio: ade7854-spi: Fix return value

ade7854_probe can fail. Return the value obtained from it
instead of 0 (success).

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Barry Song <21cnbao@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agostaging:iio:hmc5843: Fix measurement conversion
Peter Meerwald [Tue, 3 Sep 2013 01:05:00 +0000 (02:05 +0100)]
staging:iio:hmc5843: Fix measurement conversion

recently broken, cd6fe06588423ff4cca85c85c4402027b04dccf1
staging:iio:hmc5843: Use i2c_smbus_read_word_swapped()

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agoiio: isl29018: Fix uninitialized value
Derek Basehore [Thu, 29 Aug 2013 20:14:00 +0000 (21:14 +0100)]
iio: isl29018: Fix uninitialized value

The lux_uscale value is not initialized at probe. The value will be
uninitialized unless a value is written to it through the iio channel interface.
This fixes that.

Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/65998
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agostaging:iio:dummy fix kfifo_buf kconfig dependency issue if kfifo modular and buffer...
Jonathan Cameron [Sun, 1 Sep 2013 17:55:00 +0000 (18:55 +0100)]
staging:iio:dummy fix kfifo_buf kconfig dependency issue if kfifo modular and buffer enabled for built in dummy driver.

This only occurs in the unlikely event that the example driver is built
in whilst the buffer implementation is not.

Solved by switching from a depends on to a select for this particular case.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agoiio: at91: fix adc_clk overflow
Josh Wu [Tue, 27 Aug 2013 11:28:00 +0000 (12:28 +0100)]
iio: at91: fix adc_clk overflow

The adc_clk variable is currently defined using a 32-bits unsigned integer,
which will overflow under some very valid range of operations.

Such overflow will occur if, for example, the parent clock is set to a
20MHz frequency and the ADC startup time is larger than 215ns.

To fix this, introduce an intermediate variable holding the clock rate
in kHz.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agoMIPS: 74K/1074K: Correct erratum workaround.
Maciej W. Rozycki [Wed, 18 Sep 2013 18:08:15 +0000 (19:08 +0100)]
MIPS: 74K/1074K: Correct erratum workaround.

Make sure 74K revision numbers are not applied to the 1074K.  Also catch
invalid usage.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5857/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMIPS: Cleanup CP0 PRId and CP1 FPIR register access masks
Maciej W. Rozycki [Tue, 17 Sep 2013 15:58:10 +0000 (16:58 +0100)]
MIPS: Cleanup CP0 PRId and CP1 FPIR register access masks

Replace hardcoded CP0 PRId and CP1 FPIR register access masks throughout.
The change does not touch places that use shifted or partial masks.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5838/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoMerge tag 'please-pull-pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl...
Linus Torvalds [Wed, 18 Sep 2013 17:39:40 +0000 (12:39 -0500)]
Merge tag 'please-pull-pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux

Pull pstore/compression fixes from Tony Luck:
 "Three pstore fixes related to compression:
   1) Better adjustment of size of compression buffer (was too big for
      EFIVARS backend resulting in compression failure
   2) Use zlib_inflateInit2 instead of zlib_inflateInit
   3) Don't print messages about compression failure.  They will waste
      space that may better be used to log console output leading to the
      crash"

* tag 'please-pull-pstore' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
  pstore: Remove the messages related to compression failure
  pstore: Use zlib_inflateInit2 instead of zlib_inflateInit
  pstore: Adjust buffer size for compression for smaller registered buffers

10 years agoMIPS: Remove useless comment about kprobe from arch/mips/Makefile
Wu Zhangjin [Tue, 9 Nov 2010 16:25:53 +0000 (00:25 +0800)]
MIPS: Remove useless comment about kprobe from arch/mips/Makefile

The commit c1bf207d6ee1eb72e9c10365edbdc7c9ff7fb9b0 (kernel.org) rsp.
58e9ad32a48dce37ffeea912f55bd1c94b85ad7f (lmo) [MIPS: kprobe: Add support]
introduced a useless comment.

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: David Daney <ddaney@caviumnetworks.com>
Patchwork: https://patchwork.linux-mips.org/patch/1765/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agonet:dccp: do not report ICMP redirects to user space
Duan Jiong [Wed, 18 Sep 2013 12:03:27 +0000 (20:03 +0800)]
net:dccp: do not report ICMP redirects to user space

DCCP shouldn't be setting sk_err on redirects as it
isn't an error condition. it should be doing exactly
what tcp is doing and leaving the error handler without
touching the socket.

Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 18 Sep 2013 16:26:17 +0000 (11:26 -0500)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Misc fixes"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/intel/lpss: Add pin control support to Intel low power subsystem
  perf/x86/intel: Mark MEM_LOAD_UOPS_MISS_RETIRED as precise on SNB
  x86: Remove now-unused save_rest()
  x86/smpboot: Fix announce_cpu() to printk() the last "OK" properly

10 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 18 Sep 2013 16:24:49 +0000 (11:24 -0500)]
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fix from Ingo Molnar:
 "An NTP related lockup fix"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  timekeeping: Fix HRTICK related deadlock from ntp lock changes

10 years agocnic: Fix crash in cnic_bnx2x_service_kcq()
Michael Chan [Wed, 18 Sep 2013 08:50:39 +0000 (01:50 -0700)]
cnic: Fix crash in cnic_bnx2x_service_kcq()

commit 104a43edb264321a4d41850e98153b4fa8a9ef42
    cnic: Use CHIP_NUM macros from bnx2x.h

changed the code to use the bnx2x macro NO_FCOE() to determine if FCoE
is supported or not.  There is another place in cnic that is still using
the old method to determine if FCoE is supported or not.  The 2 methods
may not yield the same result after the network interface is brought down
and up.  This will cause the crash as cnic_bnx2x_service_kcq() will access
the uninitialized cp->kcq2.

The fix is to consistently use the same macro CNIC_SUPPORTS_FCOE() which
uses the bnx2x NO_FCOE() macro.  As a follow-up, we can clean up the code
to remove the old method as it is no longer needed.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agobnx2x, cnic, bnx2i, bnx2fc: Fix bnx2i and bnx2fc regressions.
Michael Chan [Wed, 18 Sep 2013 08:50:38 +0000 (01:50 -0700)]
bnx2x, cnic, bnx2i, bnx2fc: Fix bnx2i and bnx2fc regressions.

commit b9871bcfd211d316adee317608dab44c58d6ea2d
    bnx2x: VF RSS support - PF side

changed the configuration of the doorbell HW and it broke iSCSI and FCoE.
We fix this by making compatible changes to the doorbell address in bnx2i
and bnx2fc.  For the userspace driver, we need to pass a modified CID
so that the existing userspace driver will calculate the correct doorbell
address and continue to work.

Signed-off-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoMerge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 18 Sep 2013 16:23:32 +0000 (11:23 -0500)]
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:
 "Misc fixes"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched: Fix comment for sched_info_depart
  sched/Documentation: Update sched-design-CFS.txt documentation
  sched/debug: Take PID namespace into account
  sched/fair: Fix small race where child->se.parent,cfs_rq might point to invalid ones

10 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 18 Sep 2013 16:22:53 +0000 (11:22 -0500)]
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:
 "Two small fixes"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf: Fix UAPI export of PERF_EVENT_IOC_ID
  perf/x86/intel: Fix Silvermont offcore masks

10 years agoMerge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge
David S. Miller [Wed, 18 Sep 2013 16:22:17 +0000 (12:22 -0400)]
Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge

Included change:
- fix the Bridge Loop Avoidance component by marking the variables containing
  the VLAN ID with the HAS_TAG flag when needed.

10 years agoARM: sa1100: collie.c: fall back to jedec_probe flash detection
Andrea Adami [Sun, 15 Sep 2013 22:04:42 +0000 (00:04 +0200)]
ARM: sa1100: collie.c: fall back to jedec_probe flash detection

Zaurus collie contains 2 LH28F640BFHE-PTTL90 (64M 4Mx16) and
at the moment cfi will not detect the collie NOR.
In the meanwhile we can revert to the jedec-probe map which has been
fixed with following commit:

mtd: jedec_probe: fix LH28F640BF definition
fe2f4c8e0bf2756b670ee78fa9772613a2ea8495

Somehow this is unsatisfactory because the flash is mounted READ ONLY
(as from factory, with a RO cramfs)

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoRPCSEC_GSS: fix crash on destroying gss auth
J. Bruce Fields [Wed, 18 Sep 2013 15:16:03 +0000 (11:16 -0400)]
RPCSEC_GSS: fix crash on destroying gss auth

This fixes a regression since  eb6dc19d8e72ce3a957af5511d20c0db0a8bd007
"RPCSEC_GSS: Share all credential caches on a per-transport basis" which
could cause an occasional oops in the nfsd code (see below).

The problem was that an auth was left referencing a client that had been
freed.  To avoid this we need to ensure that auths are shared only
between descendants of a common client; the fact that a clone of an
rpc_client takes a reference on its parent then ensures that the parent
client will last as long as the auth.

Also add a comment explaining what I think was the intention of this
code.

  general protection fault: 0000 [#1] PREEMPT SMP
  Modules linked in: rpcsec_gss_krb5 nfsd auth_rpcgss oid_registry nfs_acl lockd sunrpc
  CPU: 3 PID: 4071 Comm: kworker/u8:2 Not tainted 3.11.0-rc2-00182-g025145f #1665
  Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
  Workqueue: nfsd4_callbacks nfsd4_do_callback_rpc [nfsd]
  task: ffff88003e206080 ti: ffff88003c384000 task.ti: ffff88003c384000
  RIP: 0010:[<ffffffffa00001f3>]  [<ffffffffa00001f3>] rpc_net_ns+0x53/0x70 [sunrpc]
  RSP: 0000:ffff88003c385ab8  EFLAGS: 00010246
  RAX: 6b6b6b6b6b6b6b6b RBX: ffff88003af9a800 RCX: 0000000000000002
  RDX: ffffffffa00001a5 RSI: 0000000000000001 RDI: ffffffff81e284e0
  RBP: ffff88003c385ad8 R08: 0000000000000001 R09: 0000000000000000
  R10: 0000000000000000 R11: 0000000000000015 R12: ffff88003c990840
  R13: ffff88003c990878 R14: ffff88003c385ba8 R15: ffff88003e206080
  FS:  0000000000000000(0000) GS:ffff88003fd80000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
  CR2: 00007fcdf737e000 CR3: 000000003ad2b000 CR4: 00000000000006e0
  Stack:
   ffffffffa00001a5 0000000000000006 0000000000000006 ffff88003af9a800
   ffff88003c385b08 ffffffffa00d52a4 ffff88003c385ba8 ffff88003c751bd8
   ffff88003c751bc0 ffff88003e113600 ffff88003c385b18 ffffffffa00d530c
  Call Trace:
   [<ffffffffa00001a5>] ? rpc_net_ns+0x5/0x70 [sunrpc]
   [<ffffffffa00d52a4>] __gss_pipe_release+0x54/0x90 [auth_rpcgss]
   [<ffffffffa00d530c>] gss_pipe_free+0x2c/0x30 [auth_rpcgss]
   [<ffffffffa00d678b>] gss_destroy+0x9b/0xf0 [auth_rpcgss]
   [<ffffffffa000de63>] rpcauth_release+0x23/0x30 [sunrpc]
   [<ffffffffa0001e81>] rpc_release_client+0x51/0xb0 [sunrpc]
   [<ffffffffa00020d5>] rpc_shutdown_client+0xe5/0x170 [sunrpc]
   [<ffffffff81098a14>] ? cpuacct_charge+0xa4/0xb0
   [<ffffffff81098975>] ? cpuacct_charge+0x5/0xb0
   [<ffffffffa019556f>] nfsd4_process_cb_update.isra.17+0x2f/0x210 [nfsd]
   [<ffffffff819a4ac0>] ? _raw_spin_unlock_irq+0x30/0x60
   [<ffffffff819a4acb>] ? _raw_spin_unlock_irq+0x3b/0x60
   [<ffffffff810703ab>] ? process_one_work+0x15b/0x510
   [<ffffffffa01957dd>] nfsd4_do_callback_rpc+0x8d/0xa0 [nfsd]
   [<ffffffff8107041e>] process_one_work+0x1ce/0x510
   [<ffffffff810703ab>] ? process_one_work+0x15b/0x510
   [<ffffffff810712ab>] worker_thread+0x11b/0x370
   [<ffffffff81071190>] ? manage_workers.isra.24+0x2b0/0x2b0
   [<ffffffff8107854b>] kthread+0xdb/0xe0
   [<ffffffff819a4ac0>] ? _raw_spin_unlock_irq+0x30/0x60
   [<ffffffff81078470>] ? __init_kthread_worker+0x70/0x70
   [<ffffffff819ac7dc>] ret_from_fork+0x7c/0xb0
   [<ffffffff81078470>] ? __init_kthread_worker+0x70/0x70
  Code: a5 01 00 a0 31 d2 31 f6 48 c7 c7 e0 84 e2 81 e8 f4 91 0a e1 48 8b 43 60 48 c7 c2 a5 01 00 a0 be 01 00 00 00 48 c7 c7 e0 84 e2 81 <48> 8b 98 10 07 00 00 e8 91 8f 0a e1 e8
  +3c 4e 07 e1 48 83 c4 18
  RIP  [<ffffffffa00001f3>] rpc_net_ns+0x53/0x70 [sunrpc]
   RSP <ffff88003c385ab8>

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
10 years agoARM: u300: hide submenus
Linus Walleij [Wed, 18 Sep 2013 13:08:52 +0000 (15:08 +0200)]
ARM: u300: hide submenus

Right now the U300 submenus are showcased for everyone even if
we're not on v5 multiplatforms. Hide this in the multiplatform
configuration properly.

Cc: arm@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoMIPS: Fix VGA_MAP_MEM macro.
Leonid Yegoshin [Wed, 11 Sep 2013 00:36:04 +0000 (19:36 -0500)]
MIPS: Fix VGA_MAP_MEM macro.

Use the CKSEG1ADDR macro when calculating VGA_MAP_MEM.

[ralf@linux-mips.org: Include <asm/addrspace.h for CKSEG1ADDR.]

Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5814/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoIf the queue is dying then we only call the rq->end_io callout.
Mike Christie [Wed, 18 Sep 2013 14:33:55 +0000 (08:33 -0600)]
If the queue is dying then we only call the rq->end_io callout.
This leaves bios setup on the request, because the caller assumes when
the blk_execute_rq_nowait/blk_execute_rq call has completed that
the rq->bios have been cleaned up.

This patch has blk_execute_rq_nowait use __blk_end_request_all
to free bios and also call rq->end_io.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
10 years agoMIPS: Reimplement get_cycles().
Ralf Baechle [Thu, 12 Sep 2013 11:47:32 +0000 (13:47 +0200)]
MIPS: Reimplement get_cycles().

This essentially reverts commit efb9ca08b5a2374b29938cdcab417ce4feb14b54
(kernel.org) / 58020a106879a8b372068741c81f0015c9b0b96dbv [[MIPS] Change
get_cycles to always return 0.]

Most users of get_cycles() invoke it as a timing interface.  That's why
in modern kernels it was never very much missed for.  /dev/random however
uses get_cycles() in the how the jitter in the interrupt timing contains
some useful entropy.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
10 years agoARM: dts: igep00x0: Add pinmux configuration for MCBSP2
Enric Balletbo i Serra [Tue, 10 Sep 2013 15:35:23 +0000 (17:35 +0200)]
ARM: dts: igep00x0: Add pinmux configuration for MCBSP2

Add pinmux configuration for MCBSP2 connected to the TDM interface.
With this configuration the Headset modules works as expected.

Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com>
Acked-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
10 years agoperf: Fix UAPI export of PERF_EVENT_IOC_ID
Vince Weaver [Tue, 17 Sep 2013 18:53:41 +0000 (14:53 -0400)]
perf: Fix UAPI export of PERF_EVENT_IOC_ID

Without the following patch I have problems compiling code using
the new PERF_EVENT_IOC_ID ioctl().  It looks like u64 was used
instead of __u64

Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1309171450380.11444@vincent-weaver-1.um.maine.edu
Signed-off-by: Ingo Molnar <mingo@kernel.org>
10 years agoARM: dts: Fix muxing and regulator for wl12xx on the SDIO bus for blaze
Tony Lindgren [Fri, 13 Sep 2013 19:09:57 +0000 (12:09 -0700)]
ARM: dts: Fix muxing and regulator for wl12xx on the SDIO bus for blaze

Commit 76787b3b (ARM: OMAP2+: Remove board-4430sdp.c)
removed legacy booting in favor of device tree based booting
for 4430sdp. That caused the WLAN to stop working as the
related .dts entries fell through the cracks.

I don't have the "1283 PG 2.21 connectivity device" on my 4430sdp,
but the earlier version of this patch was tested by Luciano
Coelho. This version has left out the input logic for MMC CLK
line compared to the earlier version as that is not bidirectional,
and should be safe to do.

Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Luciano Coelho <luca@coelho.fi>
Cc: Ruslan Bilovol <ruslan.bilovol@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
10 years agoARM: dts: Fix muxing and regulator for wl12xx on the SDIO bus for pandaboard
Tony Lindgren [Fri, 13 Sep 2013 19:09:53 +0000 (12:09 -0700)]
ARM: dts: Fix muxing and regulator for wl12xx on the SDIO bus for pandaboard

Commit b42b9181 (ARM: OMAP2+: Remove board-omap4panda.c)
removed legacy booting in favor of device tree based booting
for pandaboard. That caused the WLAN to stop working as the
related .dts entries fell through the cracks.

The legacy muxing was setting pulls for GPIO 48 and 49, so let's
keep that behaviour for now to avoid further regressions for
BT and FM. Also input logic was enabled for MMC CLK line, but
I've verified that the input logic we don't need enabled for
CLK line as it's not bidirectional.

Also, we want to use non-removable instead of ti,non-removable
as the ti,non-removable also sets no_regulator_off_init which
is really not what we want as then wl12xx won't get powered
up and down which is needed for resetting it.

Note that looks like the WLAN interface fails to come up after
a warm reset, but that most likely was also happening with
the legacy booting and needs a separate fix.

Cc: Paolo Pisati <p.pisati@gmail.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Luciano Coelho <luca@coelho.fi>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
10 years agodrm/i915: Don't enable the cursor on a disable pipe
Ville Syrjälä [Tue, 17 Sep 2013 15:33:44 +0000 (18:33 +0300)]
drm/i915: Don't enable the cursor on a disable pipe

On HSW enabling a plane on a disabled pipe may hang the entire system.
And there's no good reason for doing it ever, so just don't.

v2: Move the crtc active checks to intel_crtc_cursor_{set,move} to
    avoid confusing people during modeset

Cc: stable@vger.kernel.org
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrm/i915: do not update cursor in crtc mode set
Jani Nikula [Tue, 17 Sep 2013 15:33:43 +0000 (18:33 +0300)]
drm/i915: do not update cursor in crtc mode set

The cursor is disabled before crtc mode set in crtc disable (and we
assert this is the case), and enabled afterwards in crtc enable. Do not
update it in crtc mode set.

On HSW enabling a plane on a disabled pipe may hang the entire system.
And there's no good reason for doing it ever, so just don't.

v2: Add note about HSW hangs - vsyrjala

Cc: stable@vger.kernel.org
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years ago9p: don't forget to destroy inode cache if fscache registration fails
Al Viro [Tue, 17 Sep 2013 12:10:18 +0000 (08:10 -0400)]
9p: don't forget to destroy inode cache if fscache registration fails

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Wed, 18 Sep 2013 02:20:30 +0000 (22:20 -0400)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull KVM fixes from Gleb Natapov.

* 'fixes' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: VMX: set "blocked by NMI" flag if EPT violation happens during IRET from NMI
  kvm: free resources after canceling async_pf
  KVM: nEPT: reset PDPTR register cache on nested vmentry emulation
  KVM: mmu: allow page tables to be in read-only slots
  KVM: x86 emulator: emulate RETF imm

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Wed, 18 Sep 2013 01:54:05 +0000 (21:54 -0400)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid

Pull HID updates from Jiri Kosina:
 "Fixes for CVE-2013-2897, CVE-2013-2895, CVE-2013-2897, CVE-2013-2894,
  CVE-2013-2893, CVE-2013-2891, CVE-2013-2890, CVE-2013-2889.

  All the bugs are triggerable only by specially crafted evil-on-purpose
  HW devices.  Fixes by Kees Cook and Benjamin Tissoires"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: lenovo-tpkbd: fix leak if tpkbd_probe_tp fails
  HID: multitouch: validate indexes details
  HID: logitech-dj: validate output report details
  HID: validate feature and input report details
  HID: lenovo-tpkbd: validate output report details
  HID: LG: validate HID output report details
  HID: steelseries: validate output report details
  HID: sony: validate HID output report details
  HID: zeroplus: validate output report details
  HID: provide a helper for validating hid reports

10 years agotty: disassociate_ctty() sends the extra SIGCONT
Oleg Nesterov [Sun, 15 Sep 2013 15:50:26 +0000 (17:50 +0200)]
tty: disassociate_ctty() sends the extra SIGCONT

Starting from v3.10 (probably commit f91e2590410b: "tty: Signal
foreground group processes in hangup") disassociate_ctty() sends SIGCONT
if tty && on_exit.  This breaks LSB test-suite, in particular test8 in
_exit.c and test40 in sigcon5.c.

Put the "!on_exit" check back to restore the old behaviour.

Review by Peter Hurley:
 "Yes, this regression was introduced by me in that commit.  The effect
  of the regression is that ptys will receive a SIGCONT when, in similar
  circumstances, ttys would not.

  The fact that two test vectors accidentally tripped over this
  regression suggests that some other apps may as well.

  Thanks for catching this"

Cc: stable@vger.kernel.org # v3.10+
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reported-by: Karel Srot <ksrot@redhat.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
David S. Miller [Wed, 18 Sep 2013 00:22:53 +0000 (20:22 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf

Pablo Neira Ayuso says:

====================
The following patchset contains Netfilter fixes for you net tree,
mostly targeted to ipset, they are:

* Fix ICMPv6 NAT due to wrong comparison, code instead of type, from
  Phil Oester.

* Fix RCU race in conntrack extensions release path, from Michal Kubecek.

* Fix missing inversion in the userspace ipset test command match if
  the nomatch option is specified, from Jozsef Kadlecsik.

* Skip layer 4 protocol matching in ipset in case of IPv6 fragments,
  also from Jozsef Kadlecsik.

* Fix sequence adjustment in nfnetlink_queue due to using the netlink
  skb instead of the network skb, from Gao feng.

* Make sure we cannot swap of sets with different layer 3 family in
  ipset, from Jozsef Kadlecsik.

* Fix possible bogus matching in ipset if hash sets with net elements
  are used, from Oliver Smith.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agovxlan: Avoid creating fdb entry with NULL destination
Sridhar Samudrala [Tue, 17 Sep 2013 19:12:40 +0000 (12:12 -0700)]
vxlan: Avoid creating fdb entry with NULL destination

Commit afbd8bae9c798c5cdbe4439d3a50536b5438247c
   vxlan: add implicit fdb entry for default destination
creates an implicit fdb entry for default destination. This results
in an invalid fdb entry if default destination is not specified.
For ex:
  ip link add vxlan1 type vxlan id 100
creates the following fdb entry
  00:00:00:00:00:00 dev vxlan1 dst 0.0.0.0 self permanent

This patch fixes this issue by creating an fdb entry only if a
valid default destination is specified.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agotcp: fix RTO calculated from cached RTT
Neal Cardwell [Tue, 17 Sep 2013 01:44:20 +0000 (21:44 -0400)]
tcp: fix RTO calculated from cached RTT

Commit 1b7fdd2ab5852 ("tcp: do not use cached RTT for RTT estimation")
did not correctly account for the fact that crtt is the RTT shifted
left 3 bits. Fix the calculation to consistently reflect this fact.

Signed-off-by: Neal Cardwell <ncardwell@google.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Acked-By: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agodrivers: net: phy: cicada.c: clears warning Use #include <linux/io.h> instead of...
Avinash Kumar [Mon, 16 Sep 2013 16:09:41 +0000 (21:39 +0530)]
drivers: net: phy: cicada.c: clears warning Use #include <linux/io.h> instead of <asm/io.h>

clears following warnings :
WARNING: Use include <linux/io.h> instead of <asm/io.h>
WARNING: Use include <linux/uaccess.h> instead of <asm/uaccess.h>

Signed-off-by: Avinash Kumar <avi.kp.137@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agonet loopback: Set loopback_dev to NULL when freed
Eric W. Biederman [Mon, 16 Sep 2013 23:52:41 +0000 (16:52 -0700)]
net loopback: Set loopback_dev to NULL when freed

It has recently turned up that we have a number of long standing bugs
in the network stack cleanup code with use of the loopback device
after it has been freed that have not turned up because in most cases
the storage allocated to the loopback device is not reused, when those
accesses happen.

Set looback_dev to NULL to trigger oopses instead of silent data corrupt
when we hit this class of bug.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agocpufreq: unlock correct rwsem while updating policy->cpu
Viresh Kumar [Tue, 17 Sep 2013 04:52:11 +0000 (10:22 +0530)]
cpufreq: unlock correct rwsem while updating policy->cpu

Current code looks like this:

        WARN_ON(lock_policy_rwsem_write(cpu));
        update_policy_cpu(policy, new_cpu);
        unlock_policy_rwsem_write(cpu);

{lock|unlock}_policy_rwsem_write(cpu) takes/releases policy->cpu's rwsem.
Because cpu is changing with the call to update_policy_cpu(), the
unlock_policy_rwsem_write() will release the incorrect lock.

The right solution would be to release the same lock as was taken earlier. Also
update_policy_cpu() was also called from cpufreq_add_dev() without any locks and
so its better if we move this locking to inside update_policy_cpu().

This patch fixes a regression introduced in 3.12 by commit f9ba680d23
(cpufreq: Extract the handover of policy cpu to a helper function).

Reported-and-tested-by: Jon Medhurst<tixy@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agocpufreq: Clear policy->cpus bits in __cpufreq_remove_dev_finish()
Viresh Kumar [Thu, 12 Sep 2013 11:36:33 +0000 (17:06 +0530)]
cpufreq: Clear policy->cpus bits in __cpufreq_remove_dev_finish()

This broke after a recent change "cedb70a cpufreq: Split __cpufreq_remove_dev()
into two parts" from Srivatsa.

Consider a scenario where we have two CPUs in a policy (0 & 1) and we are
removing CPU 1. On the call to __cpufreq_remove_dev_prepare() we have cleared 1
from policy->cpus and now on a call to __cpufreq_remove_dev_finish() we read
cpumask_weight of policy->cpus, which will come as 1 and this code will behave
as if we are removing the last CPU from policy :)

Fix it by clearing the CPU mask in __cpufreq_remove_dev_finish() instead of
__cpufreq_remove_dev_prepare().

Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
10 years agoatomic_open: take care of EEXIST in no-open case with O_CREAT|O_EXCL in fs/namei.c
Al Viro [Mon, 16 Sep 2013 23:22:33 +0000 (19:22 -0400)]
atomic_open: take care of EEXIST in no-open case with O_CREAT|O_EXCL in fs/namei.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
10 years agoMerge tag 'fixes-for-v3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Greg Kroah-Hartman [Tue, 17 Sep 2013 20:00:43 +0000 (13:00 -0700)]
Merge tag 'fixes-for-v3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

Felipe writes:

usb: fixes for v3.12-rc2

Here's first set of fixes for v3.12-rc series, patches have
been soaking in linux-usb for a while now.

We have the usual sparse and build warnings, a Kconfig fix
to a mismerge on dwc3 Kconfig, fix for a possible memory leak
in dwc3, s3c-hsotg won't disconnect when bus goes idle, locking
fix in mv_u3d_core, endpoint disable fix in f_mass_storage.

We also have one device ID added to dwc3's PCI glue layer in order
to support Intel's BayTrail devices.

Signed-of-by: Felipe Balbi <balbi@ti.com>
10 years agovhost-scsi: whitespace tweak
Michael S. Tsirkin [Tue, 17 Sep 2013 19:54:31 +0000 (22:54 +0300)]
vhost-scsi: whitespace tweak

Remove space at start of line that sneaked in.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
10 years agovhost/scsi: use vmalloc for order-10 allocation
Michael S. Tsirkin [Tue, 17 Sep 2013 06:30:34 +0000 (09:30 +0300)]
vhost/scsi: use vmalloc for order-10 allocation

As vhost scsi device struct is large, if the device is
created on a busy system, kzalloc() might fail, so this patch does a
fallback to vzalloc().

As vmalloc() adds overhead on data-path, add __GFP_REPEAT
to kzalloc() flags to do this fallback only when really needed.

Reviewed-by: Asias He <asias@redhat.com>
Reported-by: Dan Aloni <alonid@stratoscale.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
10 years agobatman-adv: set the TAG flag for the vid passed to BLA
Antonio Quartulli [Wed, 11 Sep 2013 17:14:44 +0000 (19:14 +0200)]
batman-adv: set the TAG flag for the vid passed to BLA

When receiving or sending a packet a packet on a VLAN, the
vid has to be marked with the TAG flag in order to make any
component in batman-adv understand that the packet is coming
from a really tagged network.

This fix the Bridge Loop Avoidance behaviour which was not
able to send announces over VLAN interfaces.

Introduced by 0b1da1765fdb00ca5d53bc95c9abc70dfc9aae5b
("batman-adv: change VID semantic in the BLA code")

Signed-off-by: Antonio Quartulli <antonio@open-mesh.org>
Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
10 years agobio-integrity: Fix use of bs->bio_integrity_pool after free
Bjorn Helgaas [Wed, 29 May 2013 22:29:55 +0000 (16:29 -0600)]
bio-integrity: Fix use of bs->bio_integrity_pool after free

This fixes a copy and paste error introduced by 9f060e2231
("block: Convert integrity to bvec_alloc_bs()").

Found by Coverity (CID 1020654).

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Kent Overstreet <koverstreet@google.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
10 years agoMIPS: Optimize current_cpu_type() for better code.
Ralf Baechle [Tue, 17 Sep 2013 08:25:47 +0000 (10:25 +0200)]
MIPS: Optimize current_cpu_type() for better code.

 o Move current_cpu_type() to a separate header file
 o #ifdefing on supported CPU types lets modern GCC know that certain
   code in callers may be discarded ideally turning current_cpu_type() into
   a function returning a constant.
 o Use current_cpu_type() rather than direct access to struct cpuinfo_mips.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5833/

10 years agoUSB: pl2303: distinguish between original and cloned HX chips
Frank Schäfer [Sat, 14 Sep 2013 13:36:48 +0000 (15:36 +0200)]
USB: pl2303: distinguish between original and cloned HX chips

According to Prolific, several (unauthorized) cheap and less functional
clones of the PL2303HX chip are in circulation. [1]
I've had the chance to test such a cloned device and it turned out that
it doesn't support any baud rates above 115200 baud (original: 6 Mbaud)
It also doesn't support the divisior based baud rate encoding method,
so no continuous baud rate adjustment is possible.
Nevertheless, these devices have been working (unintentionally) with
the driver up to commit 61fa8d694b ("pl2303: also use the divisor based
baud rate encoding method for baud rates < 115200 with HX chips"), and
this commit broke support for them.
Fortunately, it is pretty simple to distinguish between the original
and the cloned HX chips, so I've added a check and an extra chip type
to keep the clones working.
The same check is used by the latest Prolific Windows driver, so it
should be solid.

[1] http://www.prolific.com.tw/US/ShowProduct.aspx?p_id=225&pcid=41

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoUSB: Faraday fotg210: fix email addresses
Dave Jones [Tue, 3 Sep 2013 21:46:26 +0000 (17:46 -0400)]
USB: Faraday fotg210: fix email addresses

Update the MODULE_AUTHOR field of the Faraday OTG drivers to reflect
current maintainers email address.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoUSB: fix typo in usb serial simple driver Kconfig
Dave Jones [Tue, 3 Sep 2013 21:18:38 +0000 (17:18 -0400)]
USB: fix typo in usb serial simple driver Kconfig

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoRevert "USB: EHCI: support running URB giveback in tasklet context"
Greg Kroah-Hartman [Thu, 12 Sep 2013 20:58:42 +0000 (13:58 -0700)]
Revert "USB: EHCI: support running URB giveback in tasklet context"

This reverts commit 428aac8a81058e2303677a8fbf26670229e51d3a.

This isn't quite ready for 3.12, we need some more EHCI driver changes
that are just now showing up.  So revert this for now, and queue it up
later for 3.13.

Reported-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoKVM: VMX: set "blocked by NMI" flag if EPT violation happens during IRET from NMI
Gleb Natapov [Sun, 15 Sep 2013 08:07:23 +0000 (11:07 +0300)]
KVM: VMX: set "blocked by NMI" flag if EPT violation happens during IRET from NMI

Set "blocked by NMI" flag if EPT violation happens during IRET from NMI
otherwise NMI can be called recursively causing stack corruption.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
10 years agousb: s3c-hsotg: do not disconnect gadget when receiving ErlySusp intr
Chanho Park [Thu, 12 Sep 2013 14:18:49 +0000 (16:18 +0200)]
usb: s3c-hsotg: do not disconnect gadget when receiving ErlySusp intr

DWC2 databook indicates if the core sets "ErlySusp" bit, an idle state has been
detected on the USB for 3 ms. This situation can be occurred when waiting
a request from user daemon. So, we should keep the connection between udc and
gadget even though this interrupt is occurred.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: s3c-hsotg: fix unregistration function
Marek Szyprowski [Thu, 12 Sep 2013 14:18:48 +0000 (16:18 +0200)]
usb: s3c-hsotg: fix unregistration function

After driver conversion to udc_start/udc_stop infrastructure (commit
"usb:hsotg:samsung: Use new udc_start and udc_stop callbacks"
f65f0f1098) the gadget unregistration function is almost always called
with 'driver' parameter being NULL, what caused that the unregistration
code has not been executed at all. This is a leftover from the earlier
verison of this function (which used simple start/stop interface), where
driver parameter was obligatory.

This patch removes the NULL check for the 'driver' pointer and removes
all dereferences of it. It also moves disabling voltage regulators out
of the atomic context, because handling regulators (which are usually
i2c devices) might require sleeping.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agoMerge tag 'imx-fixes-3.12' of git://git.linaro.org/people/shawnguo/linux-2.6 into...
Olof Johansson [Tue, 17 Sep 2013 16:08:24 +0000 (09:08 -0700)]
Merge tag 'imx-fixes-3.12' of git://git.linaro.org/people/shawnguo/linux-2.6 into fixes

From Shawn Guo, imx fixes for 3.12:

* A couple of clock driver and device tree fixes
* A bug fix for clk-fixup-mux to get imx6sl back to boot
* A L2 cache setting fix for imx6q
* One pinctrl macro fix for UART2 DTE entries

* tag 'imx-fixes-3.12' of git://git.linaro.org/people/shawnguo/linux-2.6:
  ARM: dts: imx6q: fix the wrong offset of the Pad Mux register
  ARM: imx: i.mx6d/q: disable the double linefill feature of PL310
  ARM: imx51.dtsi: fix PATA device clock
  ARM: mach-imx: clk-imx51-imx53: Fix 'spdif1_pred' clock registration
  ARM: imx: initialize clk_init_data.flags for clk-fixup-mux
  ARM: imx27.dtsi: fix CSPI PER clock id

Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agomtd: nand: pxa3xx: Remove unneeded ifdef CONFIG_OF
Ezequiel Garcia [Mon, 12 Aug 2013 17:14:46 +0000 (14:14 -0300)]
mtd: nand: pxa3xx: Remove unneeded ifdef CONFIG_OF

There's no need to enclose this code within idef CONFIG_OF,
because the OF framework provides no-op stubs if CONFIG_OF=n.

Cc: devicetree@vger.kernel.org
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: multi_v7_defconfig: enable ARM_ATAG_DTB_COMPAT
Olof Johansson [Mon, 16 Sep 2013 16:01:24 +0000 (09:01 -0700)]
ARM: multi_v7_defconfig: enable ARM_ATAG_DTB_COMPAT

Without this, legacy platforms that can boot with a multiplatform
kernel but that need the DTB to be appended, won't have a way to pass
firmware-set bootargs to the kernel.

This is needed to boot multi_v7_defconfig on snowball, for instance.

Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: ux500: disable outer cache debug
Linus Walleij [Mon, 16 Sep 2013 12:22:04 +0000 (14:22 +0200)]
ARM: ux500: disable outer cache debug

This fixes a multiplatform regression on the Ux500.

When compiling the Ux500 platforms in multiplatform configurations
both PL310_ERRATA_588369 and PL310_ERRATA_727915 would crash the
platform when trying to launch the init process.

The Ux500 cannot access the debug registers of the PL310, it will
just crash if you try this. So disable this by setting the debug
callback to NULL when initializing the l2x0 on this platform.

Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agousb: gadget: f_mass_storage: reset endpoint driver data when disabled
Peter Oh [Mon, 16 Sep 2013 21:21:14 +0000 (14:21 -0700)]
usb: gadget: f_mass_storage: reset endpoint driver data when disabled

Gadgets endpoint driver data is a criteria to judge that
whether the endpoints are in use or not. When gadget gets
assigned an endpoint from endpoint list, they check its
driver data if the driver data is NULL.

If the driver data is not NULL then they regard it as in use.
Therefore all of gadgets should reset their endpoints driver
data to NULL as they are disabled. Otherwise it causes a leak
of endpoint resource.

Signed-off-by: Peter Oh <poh@broadcom.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: host: fsl-mph-dr-of: Staticize local symbols
Sachin Kamat [Mon, 16 Sep 2013 11:03:52 +0000 (16:33 +0530)]
usb: host: fsl-mph-dr-of: Staticize local symbols

Local symbols used in this file are made static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: f_eem: Staticize eem_alloc
Sachin Kamat [Mon, 16 Sep 2013 06:14:46 +0000 (11:44 +0530)]
usb: gadget: f_eem: Staticize eem_alloc

'eem_alloc' is local to this file. Make it static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: f_ecm: Staticize ecm_alloc
Sachin Kamat [Mon, 16 Sep 2013 06:14:45 +0000 (11:44 +0530)]
usb: gadget: f_ecm: Staticize ecm_alloc

'ecm_alloc' is local to this file. Make it static.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: phy: omap-usb3: Fix return value
Sachin Kamat [Mon, 16 Sep 2013 05:40:10 +0000 (11:10 +0530)]
usb: phy: omap-usb3: Fix return value

The function returns a pointer. Hence return NULL instead of 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: gadget: avoid memory leak when failing to allocate all eps
David Cohen [Thu, 12 Sep 2013 00:42:47 +0000 (17:42 -0700)]
usb: dwc3: gadget: avoid memory leak when failing to allocate all eps

If dwc3_gadget_init_endpoint() fails after allocate some of the eps, we
need to free their memory to avoid leak.

Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: remove extcon dependency
Heikki Krogerus [Tue, 10 Sep 2013 13:37:51 +0000 (16:37 +0300)]
usb: dwc3: remove extcon dependency

It is required by the OMAP glue driver, but it already depends
on it. The core driver should not depend on it. This will
allow the use of the PCI glue driver again.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: add '__ref' for rndis_config_register() and cdc_config_register()
Chen Gang [Mon, 2 Sep 2013 10:14:42 +0000 (18:14 +0800)]
usb: gadget: add '__ref' for rndis_config_register() and cdc_config_register()

They are only called by '__ref' function multi_bind(), and they will
call '__init' functions, so recommend to let them '__ref' too.

The related warnings:

  WARNING: drivers/usb/gadget/g_multi.o(.text+0xded6): Section mismatch in reference from the variable .LM2921 to the variable .init.text:_rndis_do_config
  The function .LM2921() references
  the variable __init _rndis_do_config.
  This is often because .LM2921 lacks a __init
  annotation or the annotation of _rndis_do_config is wrong.

  WARNING: drivers/usb/gadget/g_multi.o(.text+0xdf16): Section mismatch in reference from the variable .LM2953 to the variable .init.text:_cdc_do_config
  The function .LM2953() references
  the variable __init _cdc_do_config.
  This is often because .LM2953 lacks a __init
  annotation or the annotation of _cdc_do_config is wrong.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: dwc3: pci: add support for BayTrail
Heikki Krogerus [Tue, 17 Sep 2013 07:38:13 +0000 (10:38 +0300)]
usb: dwc3: pci: add support for BayTrail

Add PCI id for Intel BayTrail.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agoMIPS: Fix accessing to per-cpu data when flushing the cache
Ralf Baechle [Tue, 17 Sep 2013 10:44:31 +0000 (12:44 +0200)]
MIPS: Fix accessing to per-cpu data when flushing the cache

This fixes the following issue

BUG: using smp_processor_id() in preemptible [00000000] code: kjournald/1761
caller is blast_dcache32+0x30/0x254
Call Trace:
[<8047f02c>] dump_stack+0x8/0x34
[<802e7e40>] debug_smp_processor_id+0xe0/0xf0
[<80114d94>] blast_dcache32+0x30/0x254
[<80118484>] r4k_dma_cache_wback_inv+0x200/0x288
[<80110ff0>] mips_dma_map_sg+0x108/0x180
[<80355098>] ide_dma_prepare+0xf0/0x1b8
[<8034eaa4>] do_rw_taskfile+0x1e8/0x33c
[<8035951c>] ide_do_rw_disk+0x298/0x3e4
[<8034a3c4>] do_ide_request+0x2e0/0x704
[<802bb0dc>] __blk_run_queue+0x44/0x64
[<802be000>] queue_unplugged.isra.36+0x1c/0x54
[<802beb94>] blk_flush_plug_list+0x18c/0x24c
[<802bec6c>] blk_finish_plug+0x18/0x48
[<8026554c>] journal_commit_transaction+0x3b8/0x151c
[<80269648>] kjournald+0xec/0x238
[<8014ac00>] kthread+0xb8/0xc0
[<8010268c>] ret_from_kernel_thread+0x14/0x1c

Caches in most systems are identical - but not always, so we can't avoid
the use of smp_call_function() by just looking at the boot CPU's data,
have to fiddle with preemption instead.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5835

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
Linus Torvalds [Tue, 17 Sep 2013 15:40:49 +0000 (11:40 -0400)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile

Pull more tile architecture updates from Chris Metcalf:
 "This second batch of changes is just cleanup of various kinds from
  doing some tidying work in the sources.

  Some dead code is removed, comment typos fixed, whitespace and style
  issues cleaned up, and some header updates from our internal
  "upstream" architecture team"

* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  tile: remove stray blank space
  tile: <arch/> header updates from upstream
  tile: improve gxio iorpc autogenerated code style
  tile: double default VMALLOC space
  tile: remove stale arch/tile/kernel/futex_64.S
  tile: remove HUGE_VMAP dead code
  tile: use pmd_pfn() instead of casting via pte_t
  tile: fix typos in comment in arch/tile/kernel/unaligned.c

10 years agousb: gadget: cdc2: fix conversion to new interface of f_ecm
Andrzej Pietrasiewicz [Thu, 1 Aug 2013 14:07:48 +0000 (16:07 +0200)]
usb: gadget: cdc2: fix conversion to new interface of f_ecm

This fixes commit a38a275030086d95306555e544fc7c0e65ccd00e
(usb: gadget: cdc2: convert to new interface of f_ecm)

The invocation of usb_get_function_instance() is in cdc_bind()
and should not be repeated in cdc_do_config().

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: fix a bug and a WARN_ON in dummy-hcd
Alan Stern [Tue, 30 Jul 2013 19:18:15 +0000 (15:18 -0400)]
usb: gadget: fix a bug and a WARN_ON in dummy-hcd

This patch fixes a NULL pointer dereference and a WARN_ON in
dummy-hcd.  These things were the result of moving to the UDC core
framework, and possibly of changes to that framework.

Now unloading a gadget driver causes the UDC to be stopped after the
gadget driver is unbound, not before.  Therefore the "driver" argument
to dummy_udc_stop() can be NULL, so we must not try to print the
driver's name without checking first.

Also, the UDC framework automatically unregisters the gadget when the
UDC is deleted.  Therefore a sysfs attribute file attached to the
gadget must be removed before the UDC is deleted, not after.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: <stable@vger.kernel.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agousb: gadget: mv_u3d_core: fix violation of locking discipline in mv_u3d_ep_disable()
Alexey Khoroshilov [Tue, 23 Jul 2013 20:20:17 +0000 (00:20 +0400)]
usb: gadget: mv_u3d_core: fix violation of locking discipline in mv_u3d_ep_disable()

mv_u3d_nuke() expects to be calles with ep->u3d->lock held,
because mv_u3d_done() does. But mv_u3d_ep_disable() calls it
without lock that can lead to unpleasant consequences.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Felipe Balbi <balbi@ti.com>
10 years agostaging: line6: add bounds check in snd_toneport_source_put()
Dan Carpenter [Fri, 13 Sep 2013 08:07:13 +0000 (11:07 +0300)]
staging: line6: add bounds check in snd_toneport_source_put()

"source" comes from the user in snd_ctl_elem_write() so it needs to be
checked.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: comedi: Fix dependencies for drivers misclassified as PCI
Ben Hutchings [Sun, 1 Sep 2013 19:18:49 +0000 (20:18 +0100)]
Staging: comedi: Fix dependencies for drivers misclassified as PCI

The Fastwel UNIOxx-5 is a PC/104 board, so put COMEDI_UNIOXX5 under
COMEDI_ISA_DRIVERS.

The DIL/Net-PC 1486 is a 486 system, so put COMEDI_SSV_DNP under
COMEDI_MISC_DRIVERS and add a dependency on X86_32 || COMPILE_TEST.

Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: Adjust RX gain
Larry Finger [Wed, 4 Sep 2013 20:56:07 +0000 (15:56 -0500)]
staging: r8188eu: Adjust RX gain

In some circumstances, the performance of this driver is highly degraded,
and ifconfig reports large numbers of dropped packets. By increasing the
maximum RX gain from 0x3e to 0x4e, performance is greatly improved.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: Fix smatch warning in core/rtw_ieee80211.
Larry Finger [Sat, 31 Aug 2013 23:17:59 +0000 (18:17 -0500)]
staging: r8188eu: Fix smatch warning in core/rtw_ieee80211.

Smatch shows the following warning:
drivers/staging/rtl8188eu/core/rtw_ieee80211.c:161 rtw_set_ie() info: ignoring unreachable code.

The cause is a module exit tracing statement after a return.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: Fix smatch error in core/rtw_mlme_ext.c
Larry Finger [Sat, 31 Aug 2013 23:18:00 +0000 (18:18 -0500)]
staging: r8188eu: Fix smatch error in core/rtw_mlme_ext.c

Smatch reports the following warning:
"drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:8328 mlme_evt_hdl()
 error: buffer overflow 'wlanevents' 24 <= 24"

  8321          /*  checking if event code is valid */
  8322          if (evt_code >= MAX_C2HEVT) {
                    ^^^^^^^^^^^^^^^^^^^^^^
  8323                  RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\nEvent Code(%d) mismatch!\n", evt_code));
  8324                  goto _abort_event_;
  8325          }
  8326
  8327          /*  checking if event size match the event parm size */
  8328          if ((wlanevents[evt_code].parmsize != 0) &&
                     ^^^^^^^^^^^^^^^^^^^^
  8329              (wlanevents[evt_code].parmsize != evt_sz)) {
  8330                  RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_,
  8331                           ("\nEvent(%d) Parm Size mismatch (%d vs %d)!\n",
  8332                           evt_code, wlanevents[evt_code].parmsize, evt_sz));
  8333                  goto _abort_event_;
  8334          }

This warning results because the number of items in "enum rtw_c2h_event",
which determines the value of MAX_C2HEVT, is one more than in "struct wlanevents".
Adding an extra dummy event to the latter fixes the problem.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: Fix Smatch off-by-one warning in hal/rtl8188e_hal_init.c
Larry Finger [Sat, 31 Aug 2013 23:17:58 +0000 (18:17 -0500)]
staging: r8188eu: Fix Smatch off-by-one warning in hal/rtl8188e_hal_init.c

Smatch reports the following warning:
"drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c:2008
Hal_ReadPowerValueFromPROM_8188E()
 error: buffer overflow 'pwrInfo24G->IndexBW40_Base[rfPath]' 5 <= 5"

drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
  2005                          /* 2.4G default value */
  2006                          for (group = 0; group < MAX_CHNL_GROUP_24G; group++) {
  2007                                  pwrInfo24G->IndexCCK_Base[rfPath][group] =      EEPROM_DEFAULT_24G_INDEX;
  2008                                  pwrInfo24G->IndexBW40_Base[rfPath][group] =     EEPROM_DEFAULT_24G_INDEX;

The reason is that IndexCCK_Base[] has MAX_CHNL_GROUP_24G elements, but
IndexBW40_Base is smaller by 1. Make them both have MAX_CHNL_GROUP_24G
elements.

Reported by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: Disable lustre file system for MIPS, SH, and XTENSA
Guenter Roeck [Mon, 9 Sep 2013 01:03:00 +0000 (18:03 -0700)]
staging: Disable lustre file system for MIPS, SH, and XTENSA

mips allmodconfig fails with

ERROR: "copy_from_user_page" [drivers/staging/lustre/lustre/libcfs/libcfs.ko]
undefined!

which is due to LUSTRE using copy_from_user_page which is not exported by any
architecture. Unfortunately, LUSTRE can only be built as module, so there is no
easy fix.

MIPS, SH, and optionally XTENSA implement copy_from_user_page as unexported
functions. Disable LUSTRE for those.

Cc: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoRevert "staging: zram: Add auto loading of module if user opens /dev/zram."
Greg Kroah-Hartman [Thu, 12 Sep 2013 22:41:31 +0000 (15:41 -0700)]
Revert "staging: zram: Add auto loading of module if user opens /dev/zram."

This reverts commit c70bda992c12e593e411c02a52e4bd6985407539.

It's incorrect, Kay writes:
Please just remove it. "devname" is meant to be used for
single-instance devices with a static dev_t, never for things
like zramX.

It will not do anything useful here, it does nothing really
without a statically assigned dev_t, and it should not be used
for devices of this kind anyway.

Reported-by: Tom Gundersen <teg@jklm.no>
Reported-by: Kay Sievers <kay@vrfy.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: octeon-ethernet: rgmii: enable interrupts that we can handle
Aaro Koskinen [Thu, 5 Sep 2013 18:44:01 +0000 (21:44 +0300)]
staging: octeon-ethernet: rgmii: enable interrupts that we can handle

Enable only those interrupts that we can handle & acknowledge in the
interrupt handler.

At least on EdgeRouter Lite, the hardware may occasionally interrupt with
some error condition when the physical link status changes frequently.
Since the interrupt condition is not acked properly, this leads to the
following warning and the IRQ gets disabled completely:

[   41.324700] eth0: Link down
[   44.324721] eth0: 1000 Mbps Full duplex, port  0, queue  0
[   44.885590] irq 117: nobody cared (try booting with the "irqpoll" option)
[   44.892397] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.11.0-rc5-edge-los.git-27d042f-dirty-00950-gaa42f2d-dirty #8
[   44.902825] Stack : ffffffff815c0000 0000000000000004 0000000000000003 0000000000000000
  ffffffff81fd0000 ffffffff815c0000 0000000000000004 ffffffff8118530c
  ffffffff815c0000 ffffffff811858d8 0000000000000000 0000000000000000
  ffffffff81fd0000 ffffffff81fc0000 ffffffff8152f3a0 ffffffff815b7bf7
  ffffffff81fc6688 ffffffff815b8060 0000000000000000 0000000000000000
  0000000000000000 ffffffff815346c8 ffffffff815346b0 ffffffff814a6a18
  ffffffff8158b848 ffffffff81145614 ffffffff81593800 ffffffff81187174
  ffffffff815b7d00 ffffffff8158b760 0000000000000000 ffffffff814a9184
  0000000000000000 0000000000000000 0000000000000000 0000000000000000
  0000000000000000 ffffffff811203b8 0000000000000000 0000000000000000
  ...
[   44.968408] Call Trace:
[   44.970873] [<ffffffff811203b8>] show_stack+0x68/0x80
[   44.975937] [<ffffffff814a9184>] dump_stack+0x78/0xb8
[   44.980999] [<ffffffff811aac54>] __report_bad_irq+0x44/0x108
[   44.986662] [<ffffffff811ab238>] note_interrupt+0x248/0x2a0
[   44.992240] [<ffffffff811a85e4>] handle_irq_event_percpu+0x144/0x200
[   44.998598] [<ffffffff811a86f4>] handle_irq_event+0x54/0x90
[   45.004176] [<ffffffff811ab908>] handle_level_irq+0xd0/0x148
[   45.009839] [<ffffffff811a7b04>] generic_handle_irq+0x34/0x50
[   45.015589] [<ffffffff8111dae8>] do_IRQ+0x18/0x30
[   45.020301] [<ffffffff8110486c>] plat_irq_dispatch+0x74/0xb8
[   45.025958]
[   45.027451] handlers:
[   45.029731] [<ffffffff813fca10>] cvm_oct_rgmii_rml_interrupt
[   45.035397] Disabling IRQ #117
[   45.038742] Port 0 receive error code 13, packet dropped
[   46.324719] eth0: Link down
[   48.324733] eth0: 1000 Mbps Full duplex, port  0, queue  0

Reported-by: "Jason A. Donenfeld" <Jason@zx2c4.com>
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: David Daney <david.daney@cavium.com>
Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: octeon-ethernet: remove skb alloc failure warnings
Aaro Koskinen [Thu, 5 Sep 2013 18:44:00 +0000 (21:44 +0300)]
staging: octeon-ethernet: remove skb alloc failure warnings

Remove skb allocation failure warnings. They will trigger a page
allocation warning already. Also, one of the warnings was not ratelimited,
causing the box to lock up under heavy traffic & low memory.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: David Daney <david.daney@cavium.com>
Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: octeon-ethernet: make dropped packets to consume NAPI budget
Aaro Koskinen [Thu, 5 Sep 2013 18:43:59 +0000 (21:43 +0300)]
staging: octeon-ethernet: make dropped packets to consume NAPI budget

We should count also dropped packets, otherwise the NAPI handler may
end up running too long.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrivers/staging/lustre/lustre/ptlrpc/sec_bulk.c: rename PTRS_PER_PAGE
Andrew Morton [Wed, 11 Sep 2013 20:38:04 +0000 (13:38 -0700)]
drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c: rename PTRS_PER_PAGE

It duplicates the definition in arch/alpha/include/asm/pgtable.h and emits
warnings.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Cc: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgnc: fix potential format string flaw
Kees Cook [Wed, 11 Sep 2013 04:41:16 +0000 (21:41 -0700)]
staging: dgnc: fix potential format string flaw

Make sure that format strings cannot leak into printk() calls from the
msgbuf string.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: lustre: clean up format string usages
Kees Cook [Wed, 11 Sep 2013 04:37:19 +0000 (21:37 -0700)]
staging: lustre: clean up format string usages

This fixes up the usage of snprintf, strncpy, and format strings in the
call to kthread_run to avoid ever accidentally allowing a format string
into the thread name.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: fix overflows and format strings
Kees Cook [Wed, 11 Sep 2013 04:40:43 +0000 (21:40 -0700)]
staging: dgap: fix overflows and format strings

The boot message buffer could potentially overflow the stack and the
heap. Additionally make sure format strings could not leak into printk()
calls.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: xillybus: fix format string usage
Kees Cook [Wed, 11 Sep 2013 04:38:04 +0000 (21:38 -0700)]
staging: xillybus: fix format string usage

Makes sure format string cannot leak into device_create() call.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: Fix uninitialized variable change_inx
Geert Uytterhoeven [Fri, 6 Sep 2013 12:45:36 +0000 (14:45 +0200)]
staging: r8188eu: Fix uninitialized variable change_inx

drivers/staging/rtl8188eu/core/rtw_wlan_util.c: In function ‘WMMOnAssocRsp’:
drivers/staging/rtl8188eu/core/rtw_wlan_util.c:634: warning: ‘change_inx’ may be used uninitialized in this function

And the compiler is right: change_inx should be initialized to false.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/lustre: Correct default for LUSTRE_TRANSLATE_ERRNOS
Geert Uytterhoeven [Thu, 5 Sep 2013 08:49:01 +0000 (10:49 +0200)]
staging/lustre: Correct default for LUSTRE_TRANSLATE_ERRNOS

LUSTRE_TRANSLATE_ERRNOS is never enabled, a "true" is not a valid value.
Use "default y" instead of "default true" to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/vt6656: Fix screwed up indentation in swGetOFDMControlRate
Dave Jones [Thu, 5 Sep 2013 04:00:52 +0000 (00:00 -0400)]
staging/vt6656: Fix screwed up indentation in swGetOFDMControlRate

The indentation in the swGetOFDMControlRate function is screwed up.
At first it appears that there are missing braces on a multi-line if, but
looking at history, commit dd0a774fc727ee793780197beb3f2cf80bfefa99
("staging: vt6656: card/main_usb/device use new structure names")
incorrectly indented the two lines below.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/rtl8188eu: pass channel list by reference instead of copying struct.
Dave Jones [Wed, 4 Sep 2013 23:45:39 +0000 (19:45 -0400)]
staging/rtl8188eu: pass channel list by reference instead of copying struct.

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrm/nouveau/ttm: prevent double-free in nouveau_sgdma_create_ttm() failure path
Ben Skeggs [Tue, 17 Sep 2013 04:13:32 +0000 (14:13 +1000)]
drm/nouveau/ttm: prevent double-free in nouveau_sgdma_create_ttm() failure path

TTM calls the destructor on its own already...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/bios/init: fix thinko in INIT_CONFIGURE_MEM
Ben Skeggs [Tue, 17 Sep 2013 00:20:31 +0000 (10:20 +1000)]
drm/nouveau/bios/init: fix thinko in INIT_CONFIGURE_MEM

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/kms: enable for non-vga pci classes
Ben Skeggs [Tue, 10 Sep 2013 03:20:34 +0000 (13:20 +1000)]
drm/nouveau/kms: enable for non-vga pci classes

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agodrm/nouveau/bios/init: stub opcode 0xaa
Ben Skeggs [Tue, 10 Sep 2013 02:11:01 +0000 (12:11 +1000)]
drm/nouveau/bios/init: stub opcode 0xaa

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
10 years agoARM: dts: OMAP5: fix ocp2scp DTS data
Felipe Balbi [Wed, 21 Aug 2013 14:31:31 +0000 (20:01 +0530)]
ARM: dts: OMAP5: fix ocp2scp DTS data

Fix the DTS data for ocp2scp node by adding the
missing reg property.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
10 years agoARM: dts: OMAP5: fix reg property size
Felipe Balbi [Wed, 21 Aug 2013 14:31:30 +0000 (20:01 +0530)]
ARM: dts: OMAP5: fix reg property size

USB3 block has a 64KiB space, another 64KiB is
used for the wrapper.

Without this change, resource_size() will get
confused and driver won't probe because size
will be negative.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
10 years agoARM: dts: am335x-bone*: add DT for BeagleBone Black
Koen Kooi [Mon, 9 Sep 2013 14:29:21 +0000 (16:29 +0200)]
ARM: dts: am335x-bone*: add DT for BeagleBone Black

The BeagleBone Black is basically a regular BeagleBone with eMMC and
HDMI added, so create a common dtsi both can use.

IMPORTANT: booting the existing am335x-bone.dts will blow up the HDMI
transceiver after a dozen boots with an uSD card inserted because LDO
will be at 3.3V instead of 1.8.

MMC support for AM335x still isn't in, so only the LDO change has been
added.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Tested-by: Tom Rini <trini@ti.com>
Tested-by: Matt Porter <matt.porter@linaro.org>
Acked-by: Kevin Hilman <khilman@linaro.org>
Tested-by: Kevin Hilman <khilman@linaro.org>
Tested-by: Joel Fernandes <joelf@ti.com>
Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
10 years agoARM: dts: omap3-beagle-xm: fix string error in compatible property
Robert Nelson [Wed, 7 Aug 2013 14:14:15 +0000 (09:14 -0500)]
ARM: dts: omap3-beagle-xm: fix string error in compatible property

The beagle and beagle-xm entries were inside the same double quote.
Split them to have two distinct entries.

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
Signed-off-by: Benoit Cousson <bcousson@baylibre.com>