pandora-kernel.git
12 years agoALSA: usb-audio - Support for Roland GAIA SH-01 Synthesizer
John F Leach [Tue, 29 Nov 2011 00:41:27 +0000 (19:41 -0500)]
ALSA: usb-audio - Support for Roland GAIA SH-01 Synthesizer

Added table quirks entry for Roland GAIA SH-01 Synthesizer based upon
Roland SH-201 table entry as template.  USB MIDI and audio was tested
with Muse and Audacity.

Signed-off-by: John F Leach <jfleach@jfleach.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge branch 'nf' of git://1984.lsi.us.es/net
David S. Miller [Tue, 29 Nov 2011 06:20:55 +0000 (01:20 -0500)]
Merge branch 'nf' of git://1984.lsi.us.es/net

12 years agosctp: integer overflow in sctp_auth_create_key()
Xi Wang [Tue, 22 Nov 2011 15:55:30 +0000 (15:55 +0000)]
sctp: integer overflow in sctp_auth_create_key()

The previous commit 30c2235c is incomplete and cannot prevent integer
overflows. For example, when key_len is 0x80000000 (INT_MAX + 1), the
left-hand side of the check, (INT_MAX - key_len), which is unsigned,
becomes 0xffffffff (UINT_MAX) and bypasses the check.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoxfs: validate acl count
Christoph Hellwig [Sun, 20 Nov 2011 15:35:32 +0000 (15:35 +0000)]
xfs: validate acl count

This prevents in-memory corruption and possible panics if the on-disk
ACL is badly corrupted.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
12 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
Linus Torvalds [Tue, 29 Nov 2011 03:28:32 +0000 (19:28 -0800)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: convert drivers/hwmon/* to use module_platform_driver()
  hwmon: Remove redundant spi driver bus initialization

12 years agoUSB: linux-cdc-acm.inf: add support for the acm_ms gadget
Klaus Schwarzkopf [Mon, 28 Nov 2011 12:03:25 +0000 (13:03 +0100)]
USB: linux-cdc-acm.inf: add support for the acm_ms gadget

Support for the acm_ms usb gadget on windows.

Signed-off-by: Klaus Schwarzkopf <schwarzkopf@sensortherm.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoEHCI : Fix a regression in the ISO scheduler
Matthieu CASTET [Mon, 28 Nov 2011 10:30:22 +0000 (11:30 +0100)]
EHCI : Fix a regression in the ISO scheduler

Fix a regression that was introduced by commit
811c926c538f7e8d3c08b630dd5844efd7e000f6 (USB: EHCI: fix HUB TT scheduling
issue with iso transfer).

We detect an error if next == start, but this means uframe 0 can't be allocated
anymore for iso transfer...

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux
Linus Torvalds [Tue, 29 Nov 2011 00:37:35 +0000 (16:37 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/aegl/linux

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
  efivars: add missing parameter to efi_pstore_read()

12 years agoefivars: add missing parameter to efi_pstore_read()
Christoph Fritz [Mon, 28 Nov 2011 22:49:33 +0000 (23:49 +0100)]
efivars: add missing parameter to efi_pstore_read()

In the case where CONFIG_PSTORE=n, the function efi_pstore_read() doesn't
have the correct list of parameters. This patch provides a definition
of efi_pstore_read() with 'char **buf' added to fix this warning:
"drivers/firmware/efivars.c:609: warning: initialization from".

problem introduced in commit f6f8285132907757ef84ef8dae0a1244b8cde6ac

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
12 years agoASoC: Supply dcs_codes for newer WM1811 revisions
Mark Brown [Mon, 28 Nov 2011 18:48:46 +0000 (18:48 +0000)]
ASoC: Supply dcs_codes for newer WM1811 revisions

Based on initial data.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoipv6: Set mcast_hops to IPV6_DEFAULT_MCASTHOPS when -1 was given.
Li Wei [Sun, 27 Nov 2011 21:33:34 +0000 (21:33 +0000)]
ipv6: Set mcast_hops to IPV6_DEFAULT_MCASTHOPS when -1 was given.

We need to set np->mcast_hops to it's default value at this moment
otherwise when we use it and found it's value is -1, the logic to
get default hop limit doesn't take multicast into account and will
return wrong hop limit(IPV6_DEFAULT_HOPLIMIT) which is for unicast.

Signed-off-by: Li Wei <lw@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Fix corruption in /proc/*/net/dev_mcast
Anton Blanchard [Sun, 27 Nov 2011 21:14:46 +0000 (21:14 +0000)]
net: Fix corruption in /proc/*/net/dev_mcast

I just hit this during my testing. Isn't there another bug lurking?

BUG kmalloc-8: Redzone overwritten

INFO: 0xc0000000de9dec48-0xc0000000de9dec4b. First byte 0x0 instead of 0xcc
INFO: Allocated in .__seq_open_private+0x30/0xa0 age=0 cpu=5 pid=3896
.__kmalloc+0x1e0/0x2d0
.__seq_open_private+0x30/0xa0
.seq_open_net+0x60/0xe0
.dev_mc_seq_open+0x4c/0x70
.proc_reg_open+0xd8/0x260
.__dentry_open.clone.11+0x2b8/0x400
.do_last+0xf4/0x950
.path_openat+0xf8/0x480
.do_filp_open+0x48/0xc0
.do_sys_open+0x140/0x250
syscall_exit+0x0/0x40

dev_mc_seq_ops uses dev_seq_start/next/stop but only allocates
sizeof(struct seq_net_private) of private data, whereas it expects
sizeof(struct dev_iter_state):

struct dev_iter_state {
struct seq_net_private p;
unsigned int pos; /* bucket << BUCKET_SPACE + offset */
};

Create dev_seq_open_ops and use it so we don't have to expose
struct dev_iter_state.

[ Problem added by commit f04565ddf52e4 (dev: use name hash for
  dev_seq_ops) -Eric ]

Signed-off-by: Anton Blanchard <anton@samba.org>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoASoC: Error out if we can't generate a LRCLK at all for WM8994
Mark Brown [Mon, 28 Nov 2011 21:16:56 +0000 (21:16 +0000)]
ASoC: Error out if we can't generate a LRCLK at all for WM8994

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branch 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
Linus Torvalds [Mon, 28 Nov 2011 21:55:59 +0000 (13:55 -0800)]
Merge branch 'for-3.2-fixes' of git://git./linux/kernel/git/tj/cgroup

* 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
  cgroup_freezer: fix freezing groups with stopped tasks

12 years agoMerge branch 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
Linus Torvalds [Mon, 28 Nov 2011 21:49:43 +0000 (13:49 -0800)]
Merge branch 'for-3.2-fixes' of git://git./linux/kernel/git/tj/percpu

* 'for-3.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
  percpu: explain why per_cpu_ptr_to_phys() is more complicated than necessary
  percpu: fix chunk range calculation
  percpu: rename pcpu_mem_alloc to pcpu_mem_zalloc

12 years agoPM: Update comments describing device power management callbacks
Rafael J. Wysocki [Wed, 23 Nov 2011 20:20:32 +0000 (21:20 +0100)]
PM: Update comments describing device power management callbacks

The comments describing device power management callbacks in
include/pm.h are outdated and somewhat confusing, so make them
reflect the reality more accurately.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoPM / Sleep: Update documentation related to system wakeup
Rafael J. Wysocki [Wed, 23 Nov 2011 20:20:15 +0000 (21:20 +0100)]
PM / Sleep: Update documentation related to system wakeup

The system wakeup section of Documentation/power/devices.txt is
outdated, so make it agree with the current code.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoPM / Runtime: Make documentation follow the new behavior of irq_safe
Rafael J. Wysocki [Wed, 23 Nov 2011 20:20:07 +0000 (21:20 +0100)]
PM / Runtime: Make documentation follow the new behavior of irq_safe

The runtime PM core code behavior related to the power.irq_safe
device flag has changed recently and the documentation should be
modified to reflect it.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoPM / Sleep: Correct inaccurate information in devices.txt
Rafael J. Wysocki [Wed, 23 Nov 2011 20:19:57 +0000 (21:19 +0100)]
PM / Sleep: Correct inaccurate information in devices.txt

The documentation file Documentation/power/devices.txt contains some
information that isn't correct any more due to code modifications
made after that file had been created (or updated last time).  Fix
this.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoPM / Domains: Document how PM domains are used by the PM core
Rafael J. Wysocki [Wed, 23 Nov 2011 20:18:39 +0000 (21:18 +0100)]
PM / Domains: Document how PM domains are used by the PM core

The current power management documentation in Documentation/power/
either doesn't cover PM domains at all, or gives inaccurate
information about them, so update the relevant files in there to
follow the code.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoIB/qib: Fix over-scheduling of QSFP work
Mike Marciniszyn [Wed, 9 Nov 2011 22:07:22 +0000 (17:07 -0500)]
IB/qib: Fix over-scheduling of QSFP work

Don't over-schedule QSFP work on driver initialization.  It could end
up being run simultaneously on two different CPUs resulting in bad
EEPROM reads.  In combination with setting the physical IB link state
prior to the IBC being brought out of reset, this can cause the link
state machine to start training early with wrong settings.

Signed-off-by: Mitko Haralanov <mitko@qlogic.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
12 years agoRDMA/cxgb4: Fix retry with MPAv1 logic for MPAv2
Kumar Sanghvi [Mon, 28 Nov 2011 16:39:15 +0000 (22:09 +0530)]
RDMA/cxgb4: Fix retry with MPAv1 logic for MPAv2

Fix logic so that we don't retry with MPAv1 once we have done that
already.  Otherwise, we end up retrying with MPAv1 even when its not
needed on getting peer aborts - and this could lead to kernel panic.

Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
12 years agoRDMA/cxgb4: Fix iw_cxgb4 count_rcqes() logic
Jonathan Lallinger [Thu, 20 Oct 2011 18:25:14 +0000 (13:25 -0500)]
RDMA/cxgb4: Fix iw_cxgb4 count_rcqes() logic

Fix another place in the code where logic dealing with the t4_cqe was
using the wrong QID.  This fixes the counting logic so that it tests
against the SQ QID instead of the RQ QID when counting RCQES.

Signed-off by: Jonathan Lallinger <jonathan@ogc.us>
Signed-off by: Steve Wise <swise@ogc.us>
Signed-off-by: Roland Dreier <roland@purestorage.com>
12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux
Linus Torvalds [Mon, 28 Nov 2011 19:27:57 +0000 (11:27 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/aegl/linux

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
  pstore: pass allocated memory region back to caller

12 years agoregulator: twl: fix twl4030 support for smps regulators
Tero Kristo [Mon, 28 Nov 2011 14:53:19 +0000 (16:53 +0200)]
regulator: twl: fix twl4030 support for smps regulators

SMPS regulator voltage control differs from the one of the LDO ones.
Current TWL code was using LDO regulator ops for controlling the SMPS
regulators, which fails. This was fixed fixed by adding separate
regulator type which uses correct logic and calculations for the
voltage levels.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
12 years agomac80211: fix race between the AGG SM and the Tx data path
Emmanuel Grumbach [Sun, 27 Nov 2011 13:29:44 +0000 (15:29 +0200)]
mac80211: fix race between the AGG SM and the Tx data path

When a packet is supposed to sent be as an a-MPDU, mac80211 sets
IEEE80211_TX_CTL_AMPDU to let the driver know. On the other
hand, mac80211 configures the driver for aggregration with the
ampdu_action callback.
There is race between these two mechanisms since the following
scenario can occur when the BA agreement is torn down:

Tx softIRQ   drv configuration
========== =================

check OPERATIONAL bit
Set the TX_CTL_AMPDU bit in the packet

clear OPERATIONAL bit
stop Tx AGG
Pass Tx packet to the driver.

In that case the driver would get a packet with TX_CTL_AMPDU set
although it has already been notified that the BA session has been
torn down.

To fix this, we need to synchronize all the Qdisc activity after we
cleared the OPERATIONAL bit. After that step, all the following
packets will be buffered until the driver reports it is ready to get
new packets for this RA / TID. This buffering allows not to run into
another race that would send packets with TX_CTL_AMPDU unset while
the driver hasn't been requested to tear down the BA session yet.

This race occurs in practice and iwlwifi complains with a WARN_ON
when it happens.

Cc: stable@kernel.org
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix race condition caused by late addBA response
Nikolay Martynov [Mon, 28 Nov 2011 08:18:00 +0000 (09:18 +0100)]
mac80211: fix race condition caused by late addBA response

If addBA responses comes in just after addba_resp_timer has
expired mac80211 will still accept it and try to open the
aggregation session. This causes drivers to be confused and
in some cases even crash.

This patch fixes the race condition and makes sure that if
addba_resp_timer has expired addBA response is not longer
accepted and we do not try to open half-closed session.

Cc: stable@vger.kernel.org
Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
[some adjustments]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Revert change that broke AR928X on Acer Ferrari One
Rafael J. Wysocki [Sat, 26 Nov 2011 22:37:43 +0000 (23:37 +0100)]
ath9k: Revert change that broke AR928X on Acer Ferrari One

Revert a hunk in drivers/net/wireless/ath/ath9k/hw.c introduced by
commit 2577c6e8f2320f1d2f09be122efef5b9118efee4 (ath9k_hw: Add
support for AR946/8x chipsets) that caused a nasty regression to
appear on my Acer Ferrari One (the box locks up entirely at random
times after the wireless has been started without any way to get
debug information out of it).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: fix lps_lock deadlock
Stanislaw Gruszka [Mon, 28 Nov 2011 09:33:40 +0000 (10:33 +0100)]
rtlwifi: fix lps_lock deadlock

rtl_lps_leave can be called from interrupt context, so we have to
disable interrupts when taking lps_lock.

Below is full lockdep info about deadlock:

[   93.815269] =================================
[   93.815390] [ INFO: inconsistent lock state ]
[   93.815472] 2.6.41.1-3.offch.fc15.x86_64.debug #1
[   93.815556] ---------------------------------
[   93.815635] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
[   93.815743] swapper/0 [HC0[0]:SC1[1]:HE1:SE0] takes:
[   93.815832]  (&(&rtlpriv->locks.lps_lock)->rlock){+.?...}, at: [<ffffffffa025dad6>] rtl_lps_leave+0x26/0x103 [rtlwifi]
[   93.815947] {SOFTIRQ-ON-W} state was registered at:
[   93.815947]   [<ffffffff8108e10d>] __lock_acquire+0x369/0xd0c
[   93.815947]   [<ffffffff8108efb3>] lock_acquire+0xf3/0x13e
[   93.815947]   [<ffffffff814e981d>] _raw_spin_lock+0x45/0x79
[   93.815947]   [<ffffffffa025de34>] rtl_swlps_rf_awake+0x5a/0x76 [rtlwifi]
[   93.815947]   [<ffffffffa025aec0>] rtl_op_config+0x12a/0x32a [rtlwifi]
[   93.815947]   [<ffffffffa01d614b>] ieee80211_hw_config+0x124/0x129 [mac80211]
[   93.815947]   [<ffffffffa01e0af3>] ieee80211_dynamic_ps_disable_work+0x32/0x47 [mac80211]
[   93.815947]   [<ffffffff81075aa5>] process_one_work+0x205/0x3e7
[   93.815947]   [<ffffffff81076753>] worker_thread+0xda/0x15d
[   93.815947]   [<ffffffff8107a119>] kthread+0xa8/0xb0
[   93.815947]   [<ffffffff814f3184>] kernel_thread_helper+0x4/0x10
[   93.815947] irq event stamp: 547822
[   93.815947] hardirqs last  enabled at (547822): [<ffffffff814ea1a7>] _raw_spin_unlock_irqrestore+0x45/0x61
[   93.815947] hardirqs last disabled at (547821): [<ffffffff814e9987>] _raw_spin_lock_irqsave+0x22/0x8e
[   93.815947] softirqs last  enabled at (547790): [<ffffffff810623ed>] _local_bh_enable+0x13/0x15
[   93.815947] softirqs last disabled at (547791): [<ffffffff814f327c>] call_softirq+0x1c/0x30
[   93.815947]
[   93.815947] other info that might help us debug this:
[   93.815947]  Possible unsafe locking scenario:
[   93.815947]
[   93.815947]        CPU0
[   93.815947]        ----
[   93.815947]   lock(&(&rtlpriv->locks.lps_lock)->rlock);
[   93.815947]   <Interrupt>
[   93.815947]     lock(&(&rtlpriv->locks.lps_lock)->rlock);
[   93.815947]
[   93.815947]  *** DEADLOCK ***
[   93.815947]
[   93.815947] no locks held by swapper/0.
[   93.815947]
[   93.815947] stack backtrace:
[   93.815947] Pid: 0, comm: swapper Not tainted 2.6.41.1-3.offch.fc15.x86_64.debug #1
[   93.815947] Call Trace:
[   93.815947]  <IRQ>  [<ffffffff814dfd00>] print_usage_bug+0x1e7/0x1f8
[   93.815947]  [<ffffffff8101a849>] ? save_stack_trace+0x2c/0x49
[   93.815947]  [<ffffffff8108d55c>] ? print_irq_inversion_bug.part.18+0x1a0/0x1a0
[   93.815947]  [<ffffffff8108dc8a>] mark_lock+0x106/0x220
[   93.815947]  [<ffffffff8108e099>] __lock_acquire+0x2f5/0xd0c
[   93.815947]  [<ffffffff810152af>] ? native_sched_clock+0x34/0x36
[   93.830125]  [<ffffffff810152ba>] ? sched_clock+0x9/0xd
[   93.830125]  [<ffffffff81080181>] ? sched_clock_local+0x12/0x75
[   93.830125]  [<ffffffffa025dad6>] ? rtl_lps_leave+0x26/0x103 [rtlwifi]
[   93.830125]  [<ffffffff8108efb3>] lock_acquire+0xf3/0x13e
[   93.830125]  [<ffffffffa025dad6>] ? rtl_lps_leave+0x26/0x103 [rtlwifi]
[   93.830125]  [<ffffffff814e981d>] _raw_spin_lock+0x45/0x79
[   93.830125]  [<ffffffffa025dad6>] ? rtl_lps_leave+0x26/0x103 [rtlwifi]
[   93.830125]  [<ffffffff81422467>] ? skb_dequeue+0x62/0x6d
[   93.830125]  [<ffffffffa025dad6>] rtl_lps_leave+0x26/0x103 [rtlwifi]
[   93.830125]  [<ffffffffa025f677>] _rtl_pci_ips_leave_tasklet+0xe/0x10 [rtlwifi]
[   93.830125]  [<ffffffff8106281f>] tasklet_action+0x8d/0xee
[   93.830125]  [<ffffffff810629ce>] __do_softirq+0x112/0x25a
[   93.830125]  [<ffffffff814f327c>] call_softirq+0x1c/0x30
[   93.830125]  [<ffffffff81010bf6>] do_softirq+0x4b/0xa1
[   93.830125]  [<ffffffff81062d7d>] irq_exit+0x5d/0xcf
[   93.830125]  [<ffffffff814f3b7e>] do_IRQ+0x8e/0xa5
[   93.830125]  [<ffffffff814ea533>] common_interrupt+0x73/0x73
[   93.830125]  <EOI>  [<ffffffff8108b825>] ? trace_hardirqs_off+0xd/0xf
[   93.830125]  [<ffffffff812bb6d5>] ? intel_idle+0xe5/0x10c
[   93.830125]  [<ffffffff812bb6d1>] ? intel_idle+0xe1/0x10c
[   93.830125]  [<ffffffff813f8d5e>] cpuidle_idle_call+0x11c/0x1fe
[   93.830125]  [<ffffffff8100e2ef>] cpu_idle+0xab/0x101
[   93.830125]  [<ffffffff814c6373>] rest_init+0xd7/0xde
[   93.830125]  [<ffffffff814c629c>] ? csum_partial_copy_generic+0x16c/0x16c
[   93.830125]  [<ffffffff81d4bbb0>] start_kernel+0x3dd/0x3ea
[   93.830125]  [<ffffffff81d4b2c4>] x86_64_start_reservations+0xaf/0xb3
[   93.830125]  [<ffffffff81d4b140>] ? early_idt_handlers+0x140/0x140
[   93.830125]  [<ffffffff81d4b3ca>] x86_64_start_kernel+0x102/0x111

Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=755154

Reported-by: vjain02@students.poly.edu
Reported-and-tested-by: Oliver Paukstadt <pstadt@sourcentral.org>
Cc: stable@vger.kernel.org
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: don't stop a single aggregation session twice
Johannes Berg [Thu, 24 Nov 2011 19:06:14 +0000 (20:06 +0100)]
mac80211: don't stop a single aggregation session twice

Nikolay noticed (by code review) that mac80211 can
attempt to stop an aggregation session while it is
already being stopped. So to fix it, check whether
stop is already being done and bail out if so.

Also move setting the STOPPING state into the lock
so things are properly atomic.

Cc: stable@vger.kernel.org
Reported-by: Nikolay Martynov <mar.kolya@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonl80211: fix MAC address validation
Eliad Peller [Thu, 24 Nov 2011 16:13:56 +0000 (18:13 +0200)]
nl80211: fix MAC address validation

MAC addresses have a fixed length. The current
policy allows passing < ETH_ALEN bytes, which
might result in reading beyond the buffer.

Cc: stable@vger.kernel.org
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoxHCI: reset-on-resume quirk for NEC uPD720200
Andiry Xu [Thu, 17 Nov 2011 05:07:44 +0000 (13:07 +0800)]
xHCI: reset-on-resume quirk for NEC uPD720200

Julian Sikorski reports NEC uPD720200 does not work stable after suspend
and resume. Re-initialize the host in xhci_resume().

This should be backported to stable kernels as old as 2.6.37.  The
kernel will need to include
commit c877b3b2ad5cb9d4fe523c5496185cc328ff3ae9
"xhci: Add reset on resume quirk for asrock p67 host"
for this patch to work.

Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Reported-by: Julian Sikorski <belegdol@gmail.com>
Tested-by: Julian Sikorski <belegdol@gmail.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
12 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Mon, 28 Nov 2011 17:05:23 +0000 (09:05 -0800)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/exynos: fixed wrong err ptr usage and destroy call in exeception
  drm/exynos: Add disable of manager
  drm/exynos: include linux/module.h
  drm/exynos: fix vblank bug.
  drm/exynos: changed buffer structure.
  drm/exynos: removed unnecessary variable.
  drm/exynos: use gem create function generically
  drm/exynos: checked for null pointer
  drm/exynos: added crtc dpms for disable crtc
  drm/exynos: removed meaningless parameter from fbdev update
  drm/exynos: restored kernel_fb_list when reiniting fb_helper
  drm/exynos: changed exynos_drm_display to exynos_drm_display_ops
  drm/exynos: added manager object to connector
  drm/exynos: fixed converting between display mode and timing
  drm/exynos: fixed connector flag with hpd and interlace scan for hdmi
  drm/exynos: added kms poll for handling hpd event

12 years agoMerge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Mon, 28 Nov 2011 16:59:11 +0000 (08:59 -0800)]
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  SUNRPC: Ensure we return EAGAIN in xs_nospace if congestion is cleared

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Mon, 28 Nov 2011 16:53:36 +0000 (08:53 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (28 commits)
  ALSA: hda - Fix jack-detection control of VT1708
  ALSA: hda - cut and paste typo in cs420x_models[]
  ALSA: hda/realtek - Minor cleanup
  ALSA: hda/realtek - Fix missing inits of item indices for auto-mic
  ALSA: hda - Fix invalid pin and GPIO for Apple laptops with CS codecs
  ALSA: hda - Check subdevice mask in snd_hda_check_board_codec_sid_config()
  ALSA: hda - fail ELD reading early
  ALSA: lx6464es - fix device communication via command bus
  ALSA: lx6464es - command buffer API cleanup
  ALSA: hda - repoll ELD content for multiple times
  ALSA: hdspm - Fix PCI ID for PCIe RME MADI cards
  ASoC: Ensure WM8731 register cache is synced when resuming from disabled
  ALSA: cs5535 - Fix an endianness conversion
  ASoC: cs4271: Fix wrong mask parameter in some snd_soc_update_bits calls
  ASoC: wm_hubs: fix DB_RANGE size
  ASoC: wm9090: fix DB_RANGE size
  ASoC: wm8993: fix DB_RANGE size
  ASoC: wm8962: fix DB_RANGE size
  ASoC: sgtl5000: fix DB_RANGE size
  ASoC: rt5631: fix DB_RANGE size
  ...

12 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 28 Nov 2011 16:43:52 +0000 (08:43 -0800)]
Merge branch 'timers-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  hrtimer: Fix extra wakeups from __remove_hrtimer()
  timekeeping: add arch_offset hook to ktime_get functions
  clocksource: Avoid selecting mult values that might overflow when adjusted
  time: Improve documentation of timekeeeping_adjust()

12 years agoMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 28 Nov 2011 16:43:32 +0000 (08:43 -0800)]
Merge branch 'irq-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  genirq: Don't allow per cpu interrupts to be suspended

12 years agogenirq: fix regression in irqfixup, irqpoll
Edward Donovan [Mon, 28 Nov 2011 04:07:34 +0000 (23:07 -0500)]
genirq: fix regression in irqfixup, irqpoll

Commit fa27271bc8d2("genirq: Fixup poll handling") introduced a
regression that broke irqfixup/irqpoll for some hardware configurations.

Amidst reorganizing 'try_one_irq', that patch removed a test that
checked for 'action->handler' returning IRQ_HANDLED, before acting on
the interrupt.  Restoring this test back returns the functionality lost
since 2.6.39.  In the current set of tests, after 'action' is set, it
must precede '!action->next' to take effect.

With this and my previous patch to irq/spurious.c, c75d720fca8a, all
IRQ regressions that I have encountered are fixed.

Signed-off-by: Edward Donovan <edward.donovan@numble.net>
Reported-and-tested-by: Rogério Brito <rbrito@ime.usp.br>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org (2.6.39+)
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoregulator: fix use after free bug
Lothar Waßmann [Mon, 28 Nov 2011 14:38:37 +0000 (15:38 +0100)]
regulator: fix use after free bug

This is caused by dereferencing 'rdev' after device_unregister() in
the regulator_unregister() function.  'rdev' is freed by
device_unregister(), so it must not be dereferenced after this call.

[Edited commit message for legibility -- broonie]

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoMerge branch 'exynos-drm' of git://git.infradead.org/users/kmpark/linux-samsung into...
Dave Airlie [Mon, 28 Nov 2011 14:17:09 +0000 (14:17 +0000)]
Merge branch 'exynos-drm' of git://git.infradead.org/users/kmpark/linux-samsung into drm-fixes

* 'exynos-drm' of git://git.infradead.org/users/kmpark/linux-samsung:
  drm/exynos: fixed wrong err ptr usage and destroy call in exeception
  drm/exynos: Add disable of manager
  drm/exynos: include linux/module.h
  drm/exynos: fix vblank bug.
  drm/exynos: changed buffer structure.
  drm/exynos: removed unnecessary variable.
  drm/exynos: use gem create function generically
  drm/exynos: checked for null pointer
  drm/exynos: added crtc dpms for disable crtc
  drm/exynos: removed meaningless parameter from fbdev update
  drm/exynos: restored kernel_fb_list when reiniting fb_helper
  drm/exynos: changed exynos_drm_display to exynos_drm_display_ops
  drm/exynos: added manager object to connector
  drm/exynos: fixed converting between display mode and timing
  drm/exynos: fixed connector flag with hpd and interlace scan for hdmi
  drm/exynos: added kms poll for handling hpd event

12 years agoregulator: aat2870: Fix the logic of checking if no id is matched in aat2870_get_regu...
Axel Lin [Mon, 28 Nov 2011 06:06:31 +0000 (14:06 +0800)]
regulator: aat2870: Fix the logic of checking if no id is matched in aat2870_get_regulator

In current implementation, the pointer ri is not NULL if no id is matched.
Fix it by checking i == ARRAY_SIZE(aat2870_regulators) if no id is matched.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
12 years agojme: PHY configuration for compatible issue
Aries Lee [Mon, 21 Nov 2011 10:20:42 +0000 (10:20 +0000)]
jme: PHY configuration for compatible issue

To perform PHY calibration and set a different EA value by chip ID,
Whenever the NIC chip power on, ie booting or resuming, we need to
force HW to calibrate PHY parameter again, and also set a proper EA
value which gather from experiment.

Those procedures help to reduce compatible issues(NIC is unable to link
up in some special case) in giga speed.

Signed-off-by: AriesLee <AriesLee@jmicron.com>
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'fbdev-for-linus' of git://github.com/schandinat/linux-2.6
Linus Torvalds [Sun, 27 Nov 2011 20:05:56 +0000 (12:05 -0800)]
Merge branch 'fbdev-for-linus' of git://github.com/schandinat/linux-2.6

* 'fbdev-for-linus' of git://github.com/schandinat/linux-2.6:
  viafb: correct sync polarity for OLPC DCON
  video:da8xx-fb: Disable and reset sequence on version2 of LCDC
  OMAPDSS: DISPC: skip scaling calculations when not scaling
  OMAPFB: fix compilation warnings due to missing include
  OMAPDSS: HDMI: fix returned HDMI pixel clock

12 years agoath9k: Revert change that broke AR928X on Acer Ferrari One
Rafael J. Wysocki [Sat, 26 Nov 2011 22:37:43 +0000 (23:37 +0100)]
ath9k: Revert change that broke AR928X on Acer Ferrari One

Revert a hunk in drivers/net/wireless/ath/ath9k/hw.c introduced by
commit 2577c6e8f232 ("ath9k_hw: Add support for AR946/8x chipsets") that
caused a nasty regression to appear on my Acer Ferrari One (the box
locks up entirely at random times after the wireless has been started
without any way to get debug information out of it).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoStaging: comedi: fix integer overflow in do_insnlist_ioctl()
Xi Wang [Fri, 25 Nov 2011 21:46:51 +0000 (16:46 -0500)]
Staging: comedi: fix integer overflow in do_insnlist_ioctl()

There is a potential integer overflow in do_insnlist_ioctl() if
userspace passes in a large insnlist.n_insns.  The call to kmalloc()
would allocate a small buffer, leading to a memory corruption.

The bug was reported by Dan Carpenter <dan.carpenter@oracle.com>
and Haogang Chen <haogangchen@gmail.com>.  The patch was suggested by
Ian Abbott <abbotti@mev.co.uk> and Lars-Peter Clausen <lars@metafoo.de>.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: Haogang Chen <haogangchen@gmail.com>.
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoRevert "Staging: comedi: integer overflow in do_insnlist_ioctl()"
Greg Kroah-Hartman [Sun, 27 Nov 2011 19:34:34 +0000 (04:34 +0900)]
Revert "Staging: comedi: integer overflow in do_insnlist_ioctl()"

This reverts commit e384a41141949843899affcf51f4e6e646c1fe9f.
It's not the correct way to solve this issue.

Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Sun, 27 Nov 2011 16:59:07 +0000 (17:59 +0100)]
Merge branch 'fix/hda' into for-linus

12 years agoALSA: hda - Fix jack-detection control of VT1708
Takashi Iwai [Thu, 24 Nov 2011 15:33:09 +0000 (16:33 +0100)]
ALSA: hda - Fix jack-detection control of VT1708

VT1708 has no support for unsolicited events per jack-plug, the driver
implements the workq for polling the jack-detection.  The mixer element
"Jack Detect" was supposed to control this behavior on/off, but this
doesn't work properly as is now.  The workq is always started and the
HP automute is always enabled.

This patch fixes the jack-detect control behavior by triggering / stopping
the work appropriately at the state change.  Also the work checks the
internal state to continue scheduling or not.

Cc: <stable@kernel.org> [v3.1]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - cut and paste typo in cs420x_models[]
Dan Carpenter [Thu, 24 Nov 2011 11:48:24 +0000 (14:48 +0300)]
ALSA: hda - cut and paste typo in cs420x_models[]

The CS420X_IMAC27 was copied from the line before but CS420X_APPLE
was clearly intented.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoASoC: Correct name of Speyside Main Speaker widget
Mark Brown [Sun, 27 Nov 2011 15:54:49 +0000 (15:54 +0000)]
ASoC: Correct name of Speyside Main Speaker widget

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoUSB: whci-hcd: fix endian conversion in qset_clear()
Dan Carpenter [Tue, 22 Nov 2011 07:28:31 +0000 (10:28 +0300)]
USB: whci-hcd: fix endian conversion in qset_clear()

qset->qh.link is an __le64 field and we should be using cpu_to_le64()
to fill it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoUSB: usb-storage: unusual_devs entry for Kingston DT 101 G2
Qinglin Ye [Wed, 23 Nov 2011 15:39:32 +0000 (23:39 +0800)]
USB: usb-storage: unusual_devs entry for Kingston DT 101 G2

Kingston DT 101 G2 replies a wrong tag while transporting, add an
unusal_devs entry to ignore the tag validation.

Signed-off-by: Qinglin Ye <yestyle@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agousb: option: add SIMCom SIM5218
Veli-Pekka Peltola [Thu, 24 Nov 2011 20:08:56 +0000 (22:08 +0200)]
usb: option: add SIMCom SIM5218

Tested with SIM5218EVB-KIT evaluation kit.

Signed-off-by: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agousb: option: add Huawei E353 controlling interfaces
Dirk Nehring [Thu, 24 Nov 2011 18:22:23 +0000 (19:22 +0100)]
usb: option: add Huawei E353 controlling interfaces

This patch creates the missing controlling devices for the Huawei E353
HSPA+ stick.

Signed-off-by: Dirk Nehring <dnehring@gmx.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: comedi: integer overflow in do_insnlist_ioctl()
Dan Carpenter [Fri, 4 Nov 2011 18:20:43 +0000 (21:20 +0300)]
Staging: comedi: integer overflow in do_insnlist_ioctl()

There is an integer overflow here that could cause memory corruption
on 32 bit systems.

insnlist.n_insns could be a very high value size calculation for
kmalloc() could overflow resulting in a smaller "insns" than
expected.  In the for (i = 0; i < insnlist.n_insns; i++) {... loop
we would read past the end of the buffer, possibly corrupting memory
as well.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: comedi: fix signal handling in read and write
Federico Vaga [Sat, 29 Oct 2011 07:47:39 +0000 (09:47 +0200)]
Staging: comedi: fix signal handling in read and write

After sleeping on a wait queue, signal_pending(current) should be
checked (not before sleeping).

Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: comedi: fix mmap_count
Federico Vaga [Sat, 29 Oct 2011 07:45:39 +0000 (09:45 +0200)]
Staging: comedi: fix mmap_count

In comedi_fops, mmap_count is decremented at comedi_vm_ops->close but
it is not incremented at comedi_vm_ops->open. This may result in a negative
counter.  The patch introduces the open method to keep the counter
consistent.

The bug was triggerd by this sample code:

        mmap(0, ...., comedi_fd);
        fork();
        exit(0);

Acked-by: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: comedi: fix oops for USB DAQ devices.
Bernd Porr [Tue, 8 Nov 2011 21:23:03 +0000 (21:23 +0000)]
staging: comedi: fix oops for USB DAQ devices.

This fixes kernel oops when an USB DAQ device is plugged out while it's
communicating with the userspace software.

Signed-off-by: Bernd Porr <berndporr@f2s.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: comedi: usbduxsigma: Fixed wrong range for the analogue channel.
Bernd Porr [Tue, 8 Nov 2011 21:21:37 +0000 (21:21 +0000)]
staging: comedi: usbduxsigma: Fixed wrong range for the analogue channel.

It's actually +/-2.65V/2 and not +/-2.65V.

Signed-off-by: Bernd Porr <berndporr@f2s.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:rts_pstor:Complete scanning_done variable
wwang [Mon, 31 Oct 2011 07:02:53 +0000 (15:02 +0800)]
staging:rts_pstor:Complete scanning_done variable

Complete scanning_done variable if rtsx-scan thread created failed.

Signed-off-by: wwang <wei_wang@realsil.com.cn>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: usbip: bugfix for deadlock
Bart Westgeest [Tue, 1 Nov 2011 19:01:28 +0000 (15:01 -0400)]
staging: usbip: bugfix for deadlock

Interrupts must be disabled prior to calling usb_hcd_unlink_urb_from_ep.
If interrupts are not disabled, it can potentially lead to a deadlock.
The deadlock is readily reproduceable on a slower (ARM based) device
such as the TI Pandaboard.

Signed-off-by: Bart Westgeest <bart@elbrys.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoinet: add a redirect generation id in inetpeer
Eric Dumazet [Sat, 26 Nov 2011 12:13:44 +0000 (12:13 +0000)]
inet: add a redirect generation id in inetpeer

Now inetpeer is the place where we cache redirect information for ipv4
destinations, we must be able to invalidate informations when a route is
added/removed on host.

As inetpeer is not yet namespace aware, this patch adds a shared
redirect_genid, and a per inetpeer redirect_genid. This might be changed
later if inetpeer becomes ns aware.

Cache information for one inerpeer is valid as long as its
redirect_genid has the same value than global redirect_genid.

Reported-by: Arkadiusz Miśkiewicz <a.miskiewicz@gmail.com>
Tested-by: Arkadiusz Miśkiewicz <a.miskiewicz@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoARM: 7177/1: GIC: avoid skipping non-existent PPIs in irq_start calculation
Will Deacon [Fri, 25 Nov 2011 18:23:36 +0000 (19:23 +0100)]
ARM: 7177/1: GIC: avoid skipping non-existent PPIs in irq_start calculation

Commit 4294f8baa ("ARM: gic: add irq_domain support") defines irq_start
as irq_start = (irq_start & ~31) + 16; On a platform with a GIC and a
CPU without PPIs, this results in irq_start being off by 16.

This patch fixes gic_init so that we only carve out a PPI space when
PPIs exist for the GIC being initialised.

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: 7176/1: cpu_pm: register GIC PM notifier only once
Marc Zyngier [Fri, 25 Nov 2011 16:58:19 +0000 (17:58 +0100)]
ARM: 7176/1: cpu_pm: register GIC PM notifier only once

When multiple GICs exist on a platform (RealView PB1176/11MP),
we must make sure the PM notifier block is only registered
once, otherwise we end up corrupting the PM notifier list.

The fix is to only register the notifier when initializing
the first GIC, as the power management functions seem
to iterate over all the registered GICs.

Tested on PB11MP and PB1176.

Reported-by: Will Deacon <will.deacon@arm.com>
Tested-by: Will Deacon <will.deacon@arm.com>
Cc: Colin Cross <ccross@android.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: 7175/1: add subname parameter to mfp_set_groupg callers
Axel Lin [Thu, 24 Nov 2011 23:23:28 +0000 (00:23 +0100)]
ARM: 7175/1: add subname parameter to mfp_set_groupg callers

commit 798681bf "ARM: 7158/1: add new MFP implement for NUC900"
adds subname parameter for mfp_set_groupg.

Thus add subname parameter to the callers.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Wan Zongshun <mcuos.com@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: 7174/1: Fix build error in kprobes test code on Thumb2 kernels
Jon Medhurst [Thu, 24 Nov 2011 12:01:08 +0000 (13:01 +0100)]
ARM: 7174/1: Fix build error in kprobes test code on Thumb2 kernels

When compiling kprobes-test-thumb.c an error like below may occur:

/tmp/ccKcuJcG.s:19179: Error: offset out of range

This is caused by the compiler underestimating the size of the inline
assembler instructions containing ".space 0x1000" and failing to spill
the literal pool in time to prevent the generation of PC relative load
instruction with invalid offsets.

The fix implemented by this patch is to replace a single large .space
directive by a number of 4 byte .space's. This requires splitting the
macros which generate test cases for branch instructions into two forms:
one with, and one without support for inserting extra code between
branch and target.

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Jon Medhurst <jon.medhurst@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: 7172/1: dma: Drop GFP_COMP for DMA memory allocations
Sumit Bhattacharya [Wed, 23 Nov 2011 23:47:12 +0000 (00:47 +0100)]
ARM: 7172/1: dma: Drop GFP_COMP for DMA memory allocations

dma_alloc_coherent wants to split pages after allocation in order to
reduce the memory footprint. This does not work well with GFP_COMP
pages, so drop this flag before allocation.

This patch is ported from arch/avr32
(commit 3611553ef985ef7c5863c8a94641738addd04cff).

[swarren: s/HUGETLB_PAGE/HUGETLBFS/ in comment, minor comment cleanup]

Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: 7171/1: unwind: add unwind directives to bitops assembly macros
Will Deacon [Wed, 23 Nov 2011 10:28:25 +0000 (11:28 +0100)]
ARM: 7171/1: unwind: add unwind directives to bitops assembly macros

The bitops functions (e.g. _test_and_set_bit) on ARM do not have unwind
annotations and therefore the kernel cannot backtrace out of them on a
fatal error (for example, NULL pointer dereference).

This patch annotates the bitops assembly macros with UNWIND annotations
so that we can produce a meaningful backtrace on error. Callers of the
macros are modified to pass their function name as a macro parameter,
enforcing that the macros are used as standalone function implementations.

Acked-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: 7170/2: fix compilation breakage in entry-armv.S
Guennadi Liakhovetski [Tue, 22 Nov 2011 22:42:12 +0000 (23:42 +0100)]
ARM: 7170/2: fix compilation breakage in entry-armv.S

Fix compilation failure, when Thumb support is not enabled:

arch/arm/kernel/entry-armv.S: Assembler messages:
arch/arm/kernel/entry-armv.S:501: Error: backward ref to unknown label "2:"
arch/arm/kernel/entry-armv.S:502: Error: backward ref to unknown label "3:"
make[2]: *** [arch/arm/kernel/entry-armv.o] Error 1

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Reviewed-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoARM: 7168/1: use cache type functions for arch_get_unmapped_area
Rob Herring [Tue, 22 Nov 2011 03:01:06 +0000 (04:01 +0100)]
ARM: 7168/1: use cache type functions for arch_get_unmapped_area

There are already cache type decoding functions, so use those instead
of custom decode code which only works for ARMv6.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years agoAF_UNIX: Fix poll blocking problem when reading from a stream socket
Alexey Moiseytsev [Mon, 21 Nov 2011 13:35:25 +0000 (13:35 +0000)]
AF_UNIX: Fix poll blocking problem when reading from a stream socket

poll() call may be blocked by concurrent reading from the same stream
socket.

Signed-off-by: Alexey Moiseytsev <himeraster@gmail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoiio: iio_event_getfd -- fix ev_int build failure
Andy Whitcroft [Fri, 25 Nov 2011 10:56:22 +0000 (10:56 +0000)]
iio: iio_event_getfd -- fix ev_int build failure

Fix build failure in staging iio driver:

.../drivers/staging/iio/industrialio-core.c: In function 'iio_event_getfd':
.../drivers/staging/iio/industrialio-core.c:262:32: error:
'ev_int' undeclared (first use in this function)

Also convert the rest of the function to use the new variable.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodm9000: Fix check for disabled wake on LAN
Mark Brown [Mon, 21 Nov 2011 07:51:56 +0000 (07:51 +0000)]
dm9000: Fix check for disabled wake on LAN

We're trying to check if any options are defined which isn't wha the
existing code does due to confusing & and &&.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agol2tp: ensure sk->dst is still valid
Florian Westphal [Fri, 25 Nov 2011 06:47:16 +0000 (06:47 +0000)]
l2tp: ensure sk->dst is still valid

When using l2tp over ipsec, the tunnel will hang when rekeying
occurs. Reason is that the transformer bundle attached to the dst entry
is now in STATE_DEAD and thus xfrm_output_one() drops all packets
(XfrmOutStateExpired increases).

Fix this by calling __sk_dst_check (which drops the stale dst
if xfrm dst->check callback finds that the bundle is no longer valid).

Cc: James Chapman <jchapman@katalix.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodecnet: proper socket refcounting
Eric Dumazet [Mon, 21 Nov 2011 00:21:55 +0000 (00:21 +0000)]
decnet: proper socket refcounting

Better use sk_reset_timer() / sk_stop_timer() helpers to make sure we
dont access already freed/reused memory later.

Reported-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Tested-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Revert ARCNET and PHYLIB to tristate options
Ben Hutchings [Fri, 25 Nov 2011 14:40:02 +0000 (14:40 +0000)]
net: Revert ARCNET and PHYLIB to tristate options

commit 88491d8103498a6166f70d5999902fec70924314 ("drivers/net: Kconfig
& Makefile cleanup") changed the type of these options to bool, but
they select code that could (and still can) be built as modules.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: Don't use the cached pmtu informations for input routes
Steffen Klassert [Wed, 23 Nov 2011 02:14:50 +0000 (02:14 +0000)]
ipv4: Don't use the cached pmtu informations for input routes

The pmtu informations on the inetpeer are visible for output and
input routes. On packet forwarding, we might propagate a learned
pmtu to the sender. As we update the pmtu informations of the
inetpeer on demand, the original sender of the forwarded packets
might never notice when the pmtu to that inetpeer increases.
So use the mtu of the outgoing device on packet forwarding instead
of the pmtu to the final destination.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoroute: struct rtable can be const in rt_is_input_route and rt_is_output_route
Steffen Klassert [Wed, 23 Nov 2011 02:14:15 +0000 (02:14 +0000)]
route: struct rtable can be const in rt_is_input_route and rt_is_output_route

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Move mtu handling down to the protocol depended handlers
Steffen Klassert [Wed, 23 Nov 2011 02:13:31 +0000 (02:13 +0000)]
net: Move mtu handling down to the protocol depended handlers

We move all mtu handling from dst_mtu() down to the protocol
layer. So each protocol can implement the mtu handling in
a different manner.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Rename the dst_opt default_mtu method to mtu
Steffen Klassert [Wed, 23 Nov 2011 02:12:51 +0000 (02:12 +0000)]
net: Rename the dst_opt default_mtu method to mtu

We plan to invoke the dst_opt->default_mtu() method unconditioally
from dst_mtu(). So rename the method to dst_opt->mtu() to match
the name with the new meaning.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoroute: Use the device mtu as the default for blackhole routes
Steffen Klassert [Wed, 23 Nov 2011 02:12:13 +0000 (02:12 +0000)]
route: Use the device mtu as the default for blackhole routes

As it is, we return null as the default mtu of blackhole routes.
This may lead to a propagation of a bogus pmtu if the default_mtu
method of a blackhole route is invoked. So return dst->dev->mtu
as the default mtu instead.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Sat, 26 Nov 2011 17:53:32 +0000 (09:53 -0800)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/44x: Add mtd ndfc to the ppx44x defconfig
  powerpc: Fix compiliation with hugetlbfs enabled
  arch/powerpc/sysdev/ehv_pic.c: add missing kfree
  powerpc/fsl-lbc: Fix for fsl_upm
  drivers/edac/mpc85xx_edac.c: fix memory controller compatible for edac
  powerpc/qe: Fixup QE_General4 errata
  powerpc/85xx: Fix compile error on p3060_qds.c
  powerpc/p3060qds: Fix select of 'MPC8xxx_GPIO'
  powerpc/p1023: set IRQ[4:6,11] to active-high level sensitive for PCIe

12 years agohwmon: convert drivers/hwmon/* to use module_platform_driver()
Axel Lin [Fri, 25 Nov 2011 07:31:00 +0000 (02:31 -0500)]
hwmon: convert drivers/hwmon/* to use module_platform_driver()

This patch converts the drivers in drivers/hwmon/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: Donggeun Kim <dg77.kim@samsung.com>
Cc: Simon Guinot <sguinot@lacie.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Ben Dooks <ben@simtec.co.uk>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: J Keerthy <j-keerthy@ti.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agoMerge git://github.com/herbertx/crypto
Linus Torvalds [Sat, 26 Nov 2011 05:55:07 +0000 (21:55 -0800)]
Merge git://github.com/herbertx/crypto

* git://github.com/herbertx/crypto:
  crypto: mv_cesa - fix hashing of chunks > 1920 bytes

12 years agoMerge branch 'gpio-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
Linus Torvalds [Sat, 26 Nov 2011 05:52:55 +0000 (21:52 -0800)]
Merge branch 'gpio-fixes' of git://git./linux/kernel/git/linusw/linux-stericsson

* 'gpio-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  gpio: pca953x: Staticise pca953x_get_altdata()

12 years agonetns: fix proxy ARP entries listing on a netns
Jorge Boncompte [DTI2] [Fri, 25 Nov 2011 18:24:49 +0000 (13:24 -0500)]
netns: fix proxy ARP entries listing on a netns

Skip entries from foreign network namespaces.

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agohwmon: Remove redundant spi driver bus initialization
Lars-Peter Clausen [Thu, 24 Nov 2011 15:29:14 +0000 (10:29 -0500)]
hwmon: Remove redundant spi driver bus initialization

In ancient times it was necessary to manually initialize the bus field of an
spi_driver to spi_bus_type. These days this is done in spi_register_driver(),
so we can drop the manual assignment.

The patch was generated using the following coccinelle semantic patch:
// <smpl>
@@
identifier _driver;
@@
struct spi_driver _driver = {
.driver = {
- .bus = &spi_bus_type,
},
};
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: lm-sensors@lm-sensors.org
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agonet/netlabel: copy and paste bug in netlbl_cfg_unlbl_map_add()
Dan Carpenter [Wed, 23 Nov 2011 21:18:20 +0000 (21:18 +0000)]
net/netlabel: copy and paste bug in netlbl_cfg_unlbl_map_add()

This was copy and pasted from the IPv4 code.  We're calling the
ip4 version of that function and map4 is NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoext4: fix racy use-after-free in ext4_end_io_dio()
Tejun Heo [Fri, 25 Nov 2011 00:22:24 +0000 (19:22 -0500)]
ext4: fix racy use-after-free in ext4_end_io_dio()

ext4_end_io_dio() queues io_end->work and then clears iocb->private;
however, io_end->work calls aio_complete() which frees the iocb
object.  If that slab object gets reallocated, then ext4_end_io_dio()
can end up clearing someone else's iocb->private, this use-after-free
can cause a leak of a struct ext4_io_end_t structure.

Detected and tested with slab poisoning.

[ Note: Can also reproduce using 12 fio's against 12 file systems with the
  following configuration file:

  [global]
  direct=1
  ioengine=libaio
  iodepth=1
  bs=4k
  ba=4k
  size=128m

  [create]
  filename=${TESTDIR}
  rw=write

  -- tytso ]

Google-Bug-Id: 5354697
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reported-by: Kent Overstreet <koverstreet@google.com>
Tested-by: Kent Overstreet <koverstreet@google.com>
Cc: stable@kernel.org
12 years agopowerpc/44x: Add mtd ndfc to the ppx44x defconfig
Tony Breeds [Tue, 22 Nov 2011 13:50:46 +0000 (13:50 +0000)]
powerpc/44x: Add mtd ndfc to the ppx44x defconfig

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Acked-by: Josh Boyer <jwboyer@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agopowerpc: Fix compiliation with hugetlbfs enabled
Kumar Gala [Thu, 24 Nov 2011 09:40:07 +0000 (09:40 +0000)]
powerpc: Fix compiliation with hugetlbfs enabled

arch/powerpc/mm/hugetlbpage.c: In function 'reserve_hugetlb_gpages':
arch/powerpc/mm/hugetlbpage.c:312:2: error: implicit declaration of function 'parse_args'

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agocgroup_freezer: fix freezing groups with stopped tasks
Michal Hocko [Tue, 22 Nov 2011 15:44:47 +0000 (07:44 -0800)]
cgroup_freezer: fix freezing groups with stopped tasks

2d3cbf8b (cgroup_freezer: update_freezer_state() does incorrect state
transitions) removed is_task_frozen_enough and replaced it with a simple
frozen call. This, however, breaks freezing for a group with stopped tasks
because those cannot be frozen and so the group remains in CGROUP_FREEZING
state (update_if_frozen doesn't count stopped tasks) and never reaches
CGROUP_FROZEN.

Let's add is_task_frozen_enough back and use it at the original locations
(update_if_frozen and try_to_freeze_cgroup). Semantically we consider
stopped tasks as frozen enough so we should consider both cases when
testing frozen tasks.

Testcase:
mkdir /dev/freezer
mount -t cgroup -o freezer none /dev/freezer
mkdir /dev/freezer/foo
sleep 1h &
pid=$!
kill -STOP $pid
echo $pid > /dev/freezer/foo/tasks
echo FROZEN > /dev/freezer/foo/freezer.state
while true
do
cat /dev/freezer/foo/freezer.state
[ "`cat /dev/freezer/foo/freezer.state`" = "FROZEN" ] && break
sleep 1
done
echo OK

Signed-off-by: Michal Hocko <mhocko@suse.cz>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Tomasz Buchert <tomasz.buchert@inria.fr>
Cc: Paul Menage <paul@paulmenage.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: stable@kernel.org
Signed-off-by: Tejun Heo <htejun@gmail.com>
12 years agoMerge branch 'fixes-dss' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind...
Arnd Bergmann [Thu, 24 Nov 2011 15:58:01 +0000 (15:58 +0000)]
Merge branch 'fixes-dss' of git://git./linux/kernel/git/tmlind/linux-omap into fixes

12 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux...
Arnd Bergmann [Thu, 24 Nov 2011 15:56:03 +0000 (15:56 +0000)]
Merge branch 'fixes' of git://git./linux/kernel/git/tmlind/linux-omap into fixes

12 years agoMerge branch 'at91/defconfig' into fixes
Arnd Bergmann [Thu, 24 Nov 2011 14:58:59 +0000 (14:58 +0000)]
Merge branch 'at91/defconfig' into fixes

12 years agoARM: at91: enable additional boards in existing soc defconfig files
Jean-Christophe PLAGNIOL-VILLARD [Sat, 15 Oct 2011 16:03:17 +0000 (00:03 +0800)]
ARM: at91: enable additional boards in existing soc defconfig files

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 years agoARM: at91: refresh soc defconfig files for 3.2
Jean-Christophe PLAGNIOL-VILLARD [Sat, 15 Oct 2011 16:07:20 +0000 (00:07 +0800)]
ARM: at91: refresh soc defconfig files for 3.2

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 years agoARM: at91: rename defconfig files appropriately
Jean-Christophe PLAGNIOL-VILLARD [Sat, 15 Oct 2011 16:07:20 +0000 (00:07 +0800)]
ARM: at91: rename defconfig files appropriately

rename all Atmel reference board as soc defconfig

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
12 years agoMerge branch 'mxs/for-arnd' of git://git.linaro.org/people/shawnguo/linux-2.6 into...
Arnd Bergmann [Thu, 24 Nov 2011 14:51:42 +0000 (14:51 +0000)]
Merge branch 'mxs/for-arnd' of git://git.linaro.org/people/shawnguo/linux-2.6 into fixes

12 years agoarch/powerpc/sysdev/ehv_pic.c: add missing kfree
Julia Lawall [Mon, 8 Aug 2011 11:18:02 +0000 (13:18 +0200)]
arch/powerpc/sysdev/ehv_pic.c: add missing kfree

At this point, ehv_pic has been allocated but not stored anywhere, so it
should be freed before leaving the function.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@exists@
local idexpression x;
statement S,S1;
expression E;
identifier fl;
expression *ptr != NULL;
@@

x = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...kfree(x)...+> }
     when any
     when != true x == NULL
x->fl
...>
(
if (x == NULL) S1
|
if (...) { ... when != x
               when forall
(
 return \(0\|<+...x...+>\|ptr\);
|
* return ...;
)
}
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>