firefly-linux-kernel-4.4.55.git
13 years agoMerge branch 'android-2.6.36' into android-tegra-2.6.36
Colin Cross [Sat, 8 Jan 2011 01:16:59 +0000 (17:16 -0800)]
Merge branch 'android-2.6.36' into android-tegra-2.6.36

13 years agoinput: keyreset: Allow reset function to be overriden
Colin Cross [Fri, 7 Jan 2011 22:52:56 +0000 (14:52 -0800)]
input: keyreset: Allow reset function to be overriden

Change-Id: Ibb3dda05772b2e89d7b2646689944d309cb1f74e
Signed-off-by: Colin Cross <ccross@android.com>
13 years agoARM: 6490/1: MM: bugfix: initialize spinlock for init_mm.context
MyungJoo Ham [Tue, 23 Nov 2010 10:39:23 +0000 (11:39 +0100)]
ARM: 6490/1: MM: bugfix: initialize spinlock for init_mm.context

init_mm used at kernel/sched.c:idle_task_exit() has spin_lock
(init_mm.context.id_lock) that is not initialized when spin_lock/unlock
is called at an ARM machine. Note that mm_struct.context.id_lock is
usually initialized except for the instance of init_mm at
linux/arch/arm/mm/context.c

Not initializing this spinlock incurs "BUG: pinlock bad magic"
warning when spinlock debug is enabled. We have observed such
instances when testing PM in S5PC210 machines.

Change-Id: I52c6c6d035c220822a5675faaf8d163a3535985d
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Colin Cross <ccross@android.com>
13 years agoMerge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36
Colin Cross [Fri, 7 Jan 2011 04:32:16 +0000 (20:32 -0800)]
Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36

13 years agovideo: tegra: host: Disable 3d powergating
Colin Cross [Fri, 7 Jan 2011 04:16:10 +0000 (20:16 -0800)]
video: tegra: host: Disable 3d powergating

It is possible for the 3d block to generate an invalid memory
request during the power up sequence in some cases.  Workaround
is to disable 3d block power gating.

Change-Id: I10efad1f7d3dada7cd3fe18e268f06d60bdbab67
Signed-off-by: Colin Cross <ccross@android.com>
13 years ago[ARM] tegra: fuse: Add function to get Tegra revision
Colin Cross [Sun, 17 Oct 2010 22:00:08 +0000 (15:00 -0700)]
[ARM] tegra: fuse: Add function to get Tegra revision

Change-Id: I11783f5784454fec143393336195db40c9aa3160
Signed-off-by: Colin Cross <ccross@android.com>
13 years agoMerge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36
Colin Cross [Fri, 7 Jan 2011 02:12:28 +0000 (18:12 -0800)]
Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36

13 years agoMerge branch 'android-2.6.36' into android-tegra-2.6.36
Colin Cross [Fri, 7 Jan 2011 02:12:22 +0000 (18:12 -0800)]
Merge branch 'android-2.6.36' into android-tegra-2.6.36

13 years agoARM: tegra: Add emc_clk_rate field to dc platform data
James Wylder [Wed, 5 Jan 2011 21:27:03 +0000 (15:27 -0600)]
ARM: tegra: Add emc_clk_rate field to dc platform data

If passed in, use the required emc_clk_rate passed in from the
board file.  If no value set use ULONG_MAX as before.

Change-Id: I301f9fea8bf7297722b5e91e34c0dc7796c6095f
Signed-off-by: James Wylder <james.wylder@motorola.com>
13 years agoARM: tegra: timer: Separate clocksource and sched_clock
Colin Cross [Wed, 17 Nov 2010 21:03:46 +0000 (13:03 -0800)]
ARM: tegra: timer: Separate clocksource and sched_clock

tegra_clocksource_read should not use cnt32_to_63, wrapping is
already handled in the clocksource code.

Change-Id: Ic4ab38b74fea4be430937427aa6112aab31d41ec
Signed-off-by: Colin Cross <ccross@android.com>
13 years agousb: host: tegra: Fix enumeration after lp0
Benoit Goby [Wed, 5 Jan 2011 02:59:42 +0000 (18:59 -0800)]
usb: host: tegra: Fix enumeration after lp0

Fix enumeration when a device is plugged while the host is in lp0 state.

Change-Id: Idb491f347172daac8a5603ed098b422b15cc534e
Signed-off-by: Benoit Goby <benoit@android.com>
13 years agousb: host: tegra: Fix a possible int storm on resume from lp0
Benoit Goby [Wed, 5 Jan 2011 01:40:30 +0000 (17:40 -0800)]
usb: host: tegra: Fix a possible int storm on resume from lp0

usbcore will reenable usb interrupts later once the bus has been
resumed.

Change-Id: If78088bc86710f50293d84234d764655f4bba979
Signed-off-by: Benoit Goby <benoit@android.com>
13 years agoMerge branch linux-tegra-2.6.36 into android-tegra-2.6.36
Erik Gilling [Wed, 5 Jan 2011 01:51:22 +0000 (17:51 -0800)]
Merge branch linux-tegra-2.6.36 into android-tegra-2.6.36

Change-Id: Iec42f1fa234c03c6267f91ba0553d1c651b9ba94

13 years agovideo: tegra: fix three overlay window blending
Ari Hirvonen [Thu, 30 Dec 2010 13:27:28 +0000 (15:27 +0200)]
video: tegra: fix three overlay window blending

Change-Id: I36e2540b5b98817b87efbe4ca2b1f4d4f19ceba4
Signed-off-by: Michael I. Gold <gold@nvidia.com>
13 years agovideo: tegra: fix typo from register header
Ari Hirvonen [Thu, 30 Dec 2010 13:18:18 +0000 (15:18 +0200)]
video: tegra: fix typo from register header

Change-Id: Ifa7b454791f2d32cd1d12a8930890e061e835ef6
Signed-off-by: Michael I. Gold <gold@nvidia.com>
13 years agocpufreq interactive governor: fix crash on CPU shutdown
Todd Poynor [Fri, 24 Dec 2010 01:33:07 +0000 (17:33 -0800)]
cpufreq interactive governor: fix crash on CPU shutdown

Don't reference the saved copy of the CPU's cpufreq policy
pointer after the governor has been stopped for the CPU.

When the governor is stopped for a CPU:

* Use del_timer_sync() to wait for a currently-running timer
function to stop.

* Delete the timer when the governor is stopped for the
associated CPU, not when the last CPU is stopped.

* Flush any speed down work ongoing.

* Reset the timestamp that is used to tell if the timer function
has had a chance to run since last idle exit.

Check the governor enabled flag for the CPU before re-arming the
timer from within the timer function and at idle exit (in case
stopping the governor at runtime).

Check the governor enabled flag for the CPU in the worker
function and thread before using the policy pointer.  (There is
still a tiny window in the thread that needs more work to close.)

Change-Id: Ifaddf7a495a8dae15a579a57bdc654f7c47f6ada
Signed-off-by: Todd Poynor <toddpoynor@google.com>
13 years agoi2c: i2c-tegra: Return error code on partial master_xfer transfer
Colin Cross [Thu, 30 Dec 2010 05:15:12 +0000 (21:15 -0800)]
i2c: i2c-tegra: Return error code on partial master_xfer transfer

It is unclear what the correct return value is when
master_xfer gets an error part way through a set of
messages, but other drivers seem to return the error
code of the individual failed message instead of
the number of successful messages.  Convert the Tegra
i2c driver to do the same.

Change-Id: Iacda4b6d7591bfe644b93564b93356a0cda3134f
Signed-off-by: Colin Cross <ccross@android.com>
13 years agoARM: smp_twd: Use cpufreq notifiers to update prescalers
Colin Cross [Thu, 30 Dec 2010 04:45:10 +0000 (20:45 -0800)]
ARM: smp_twd: Use cpufreq notifiers to update prescalers

Change-Id: I957d5ca8580d4e7a98fb9fc754ca8f00133940d9
Signed-off-by: Colin Cross <ccross@android.com>
13 years agoARM: tegra: cpufreq: Remove direct calls to localtimer
Colin Cross [Thu, 30 Dec 2010 04:43:50 +0000 (20:43 -0800)]
ARM: tegra: cpufreq: Remove direct calls to localtimer

The localtimer code will use a cpufreq notifier to update
the prescalers.

Change-Id: Ie0587d7eaec628ff11bf40636f78597574cd63ec
Signed-off-by: Colin Cross <ccross@android.com>
13 years agoARM: smp_twd: Avoid recalibrating local timer
Colin Cross [Thu, 30 Dec 2010 03:51:35 +0000 (19:51 -0800)]
ARM: smp_twd: Avoid recalibrating local timer

Change-Id: I10af3139ecd0dc1ef54e7a8e5258ee6fb29bfb0c
Signed-off-by: Colin Cross <ccross@android.com>
13 years agoARM: tegra: cpufreq thermal throttling cleanups
Todd Poynor [Tue, 21 Dec 2010 19:12:31 +0000 (11:12 -0800)]
ARM: tegra: cpufreq thermal throttling cleanups

Various review feedback, including:

Keep a global throttling index that specifies a ceiling CPU speed, lowered by one
at each delay interval (while the temperature alarm continues to be signalled).
Avoid lowering the throttle too far based on a transitory lowering of speed
requested by the governor.

Restore governor-requested speed when throttling turned off.

Add cpufreq sysfs attribute for checking throttling state.

Make throttling workqueue high-priority.

Cosmetic changes.

Change-Id: I068bf32115927fa61282f17f4a8798f2aee0b530
Signed-off-by: Todd Poynor <toddpoynor@google.com>
13 years agoMerge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36
Colin Cross [Thu, 30 Dec 2010 00:15:17 +0000 (16:15 -0800)]
Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36

13 years agoARM: tegra: clock: Add function to set SDMMC tap delay
Colin Cross [Tue, 28 Dec 2010 22:54:10 +0000 (14:54 -0800)]
ARM: tegra: clock: Add function to set SDMMC tap delay

The SDMMC controllers have extra bits in the clock source
register that adjust the delay between the clock and data
to compenstate for delays on the PCB.  The values need to
be set from the clock code so the clock can be locked
during the read-modify-write on the clock source register.

Change-Id: Id25b7cc01fa4ec48478b60aefdf5e59bb040fbf2
Signed-off-by: Colin Cross <ccross@android.com>
13 years agocrypto: tegra-aes: reduce ivsize to 16 bytes and priority to 100
Varun Wadekar [Mon, 27 Dec 2010 12:47:35 +0000 (18:17 +0530)]
crypto: tegra-aes: reduce ivsize to 16 bytes and priority to 100

Change-Id: I6f5a7107d1140cf67f6029111cb4df312ac1183c
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
13 years agocrypto: tegra-aes: initialise bsev/vde clocks per operation
Varun Wadekar [Mon, 27 Dec 2010 06:53:47 +0000 (12:23 +0530)]
crypto: tegra-aes: initialise bsev/vde clocks per operation

Change-Id: Iaddea9ba9d3bee9c987776f37225dee483684274
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
13 years ago[ARM] tegra: clocks: add clock entry for bsev
Varun Wadekar [Mon, 27 Dec 2010 10:04:59 +0000 (15:34 +0530)]
[ARM] tegra: clocks: add clock entry for bsev

Change-Id: I7ec657c30b84c65705b38a390bdc44b64cd5ea36
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
13 years agousb: ehci: tegra: Don't change the hcd state on restart
Benoit Goby [Tue, 28 Dec 2010 23:33:49 +0000 (15:33 -0800)]
usb: ehci: tegra: Don't change the hcd state on restart

usbcore will change it once the bus has been resumed. This fixes
the "hub 3-0:1.0: activate --> -22" error on resume.

Change-Id: Icff283a60634b4d003e77aafb5a5127d415cbd3f
Signed-off-by: Benoit Goby <benoit@android.com>
13 years agoARM: tegra: usb_phy: Use utmi_phy_preresume for usb1 too
Benoit Goby [Sat, 18 Dec 2010 01:25:12 +0000 (17:25 -0800)]
ARM: tegra: usb_phy: Use utmi_phy_preresume for usb1 too

This prevents disconnects on resume.

Change-Id: I16a9e826df0d6c992e0e4480d38badba6cc9dfec
Signed-off-by: Benoit Goby <benoit@android.com>
13 years agotegra SDHCI: Make debugging printk properly a debugging printk
Todd Poynor [Thu, 23 Dec 2010 20:55:08 +0000 (12:55 -0800)]
tegra SDHCI: Make debugging printk properly a debugging printk

Tegra SDMMC clock enable/disable seems to be working well enough,
don't need this extra spew.

Change-Id: I8bce2a6b26a72b9b3af2eec873bca0177f149ca3
Signed-off-by: Todd Poynor <toddpoynor@google.com>
13 years agoARM: Stop irqsoff trace on return to user
Todd Poynor [Tue, 9 Nov 2010 04:26:23 +0000 (20:26 -0800)]
ARM: Stop irqsoff trace on return to user

If the irqsoff tracer is in use, stop tracing the interrupt disable
interval when returning to userspace.  Tracing userspace execution
time as interrupts disabled time is not helpful for kernel
performance analysis purposes.  Only do so if the irqsoff tracer
is enabled, to avoid overhead purely for lockdep, which doesn't
care.

Change-Id: I74cde7dd0c4c3a783af34e76bd4efc1f85315abe
Signed-off-by: Todd Poynor <toddpoynor@google.com>
13 years agoMerge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36
Colin Cross [Wed, 22 Dec 2010 02:38:13 +0000 (18:38 -0800)]
Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36

Conflicts:
drivers/usb/gadget/composite.c

Change-Id: I1a332ec21da62aea98912df9a01cf0282ed50ee1

13 years agoMerge commit 'v2.6.36.2' into linux-tegra-2.6.36
Colin Cross [Wed, 22 Dec 2010 02:34:37 +0000 (18:34 -0800)]
Merge commit 'v2.6.36.2' into linux-tegra-2.6.36

13 years agoMerge remote branch 'common/android-2.6.36' into android-tegra-2.6.36
Rebecca Schultz Zavin [Tue, 21 Dec 2010 19:51:19 +0000 (11:51 -0800)]
Merge remote branch 'common/android-2.6.36' into android-tegra-2.6.36

13 years agoMerge remote branch 'tegra/linux-tegra-2.6.36' into android-tegra-2.6.36
Rebecca Schultz Zavin [Tue, 21 Dec 2010 19:51:15 +0000 (11:51 -0800)]
Merge remote branch 'tegra/linux-tegra-2.6.36' into android-tegra-2.6.36

13 years agostaging: android: lowmemorykiller: Ignore shmem pages in page-cache
Arve Hjønnevåg [Wed, 24 Nov 2010 01:29:04 +0000 (17:29 -0800)]
staging: android: lowmemorykiller: Ignore shmem pages in page-cache

Change-Id: Ia54fc50b7dcabfeb71eb487c652803f83e2f3d8e
Signed-off-by: Arve Hjønnevåg <arve@android.com>
13 years agostaging: android: lowmemorykiller: Don't wait more than one second for a process...
Arve Hjønnevåg [Wed, 24 Nov 2010 02:20:28 +0000 (18:20 -0800)]
staging: android: lowmemorykiller: Don't wait more than one second for a process to die

If a process forked and the child process was killed by the
lowmemorykiller, the lowmemory killer would be disabled until
the parent process reaped the child or it died itself.

Change-Id: I709b1a4e1b1a1970e51d26a39fcbee57977bbc7f
Signed-off-by: Arve Hjønnevåg <arve@android.com>
13 years agolowmemorykiller: don't unregister notifier from atomic context
Rabin Vincent [Thu, 9 Sep 2010 05:18:21 +0000 (10:48 +0530)]
lowmemorykiller: don't unregister notifier from atomic context

The lowmemorykiller registers an atomic notifier for notfication of when
the task is freed.  From this atomic notifier callback, it removes the
atomic notifier via task_free_unregister().  This is incorrect because
atomic_notifier_chain_unregister() calls syncronize_rcu(), which can
sleep, which shouldn't be done from an atomic notifier.

Fix this by registering the notifier during init, and only unregister it
if the lowmemorykiller is unloaded.

Change-Id: I1577b04e617bc2b2e39dcb490fcfc9ce660eb7ec
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
13 years ago[ARM] tegra: ventana: remove pda-power device
Varun Wadekar [Wed, 8 Dec 2010 12:51:59 +0000 (18:21 +0530)]
[ARM] tegra: ventana: remove pda-power device

pda-power is only needed on pdas and phones.

Change-Id: I46a668cc0ee3f4b23c63de48251591cf4a8f99e8
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
13 years agonet: wireless: bcm4329: Update to version 4.218.248-18
Greg Goldman [Tue, 21 Dec 2010 19:14:17 +0000 (11:14 -0800)]
net: wireless: bcm4329: Update to version 4.218.248-18

- Improve BT-coex to differentiate HID and SCO device during DHCP session
- Enforce DTIM=1 for any SoftAP settings to optimize internal memory logic

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoARM: tegra: cpufreq: Change function signature for CPU speed throttling
Todd Poynor [Mon, 20 Dec 2010 23:53:54 +0000 (15:53 -0800)]
ARM: tegra: cpufreq: Change function signature for CPU speed throttling

The NCT1008 driver is now passed a function pointer from the board
file's platform data to be called when alarms are asserted or
deasserted.  Switch to a single function for throttling
enable/disable suitable for calling via the temperature alarm
callback.

Change-Id: Ic0eb1566a68e151216e26dfb6ed6f4bc7a273ddb
Signed-off-by: Todd Poynor <toddpoynor@google.com>
13 years agoARM: tegra: Make CPU thermal throttling configurable
Todd Poynor [Sat, 18 Dec 2010 03:36:23 +0000 (19:36 -0800)]
ARM: tegra: Make CPU thermal throttling configurable

Based on work by Dmitriy Gruzman and Varun Wadekar.

Change-Id: I64d765628223b7ef1ec493b9e409ea11e9391b94
Signed-off-by: Todd Poynor <toddpoynor@google.com>
13 years agomfd: Remove tps6586x device ID check
Stephen Warren [Thu, 9 Dec 2010 17:30:11 +0000 (10:30 -0700)]
mfd: Remove tps6586x device ID check

... and convert it to a dev_info print at probe time.

There are many variants of this chip with different values of VERSIONCRC.
The set of values is large, and not useful to enumerate. All are SW
compatible. The difference lies in default settings of the various power
rails, and other similar differences. The driver, or clients of the
driver, shouldn't be affected by this, since all rails should be
programmed into the desired state in all cases for correct operation.

Derived-from-code-by: Andrew Chew <achew@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agomfd: Add TPS658621C device ID
Andrew Chew [Tue, 19 Oct 2010 09:08:36 +0000 (11:08 +0200)]
mfd: Add TPS658621C device ID

The interface for this device should be identical to that of the
TPS658521A.

Signed-off-by: Andrew Chew <achew@nvidia.com>
Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
13 years agoMerge branch 'android-2.6.36' into android-tegra-2.6.36
Colin Cross [Sat, 18 Dec 2010 01:23:38 +0000 (17:23 -0800)]
Merge branch 'android-2.6.36' into android-tegra-2.6.36

13 years agocgroup: Remove call to synchronize_rcu in cgroup_attach_task
Colin Cross [Wed, 24 Nov 2010 05:37:04 +0000 (21:37 -0800)]
cgroup: Remove call to synchronize_rcu in cgroup_attach_task

synchronize_rcu can be very expensive, averaging 100 ms in
some cases.  In cgroup_attach_task, it is used to prevent
a task->cgroups pointer dereferenced in an RCU read side
critical section from being invalidated, by delaying the
call to put_css_set until after an RCU grace period.

To avoid the call to synchronize_rcu, make the put_css_set
call rcu-safe by moving the deletion of the css_set links
into free_css_set_work, scheduled by the rcu callback
free_css_set_rcu.

The decrement of the cgroup refcount is no longer
synchronous with the call to put_css_set, which can result
in the cgroup refcount staying positive after the last call
to cgroup_attach_task returns.  To allow the cgroup to be
deleted with cgroup_rmdir synchronously after
cgroup_attach_task, have rmdir check the refcount of all
associated css_sets.  If cgroup_rmdir is called on a cgroup
for which the css_sets all have refcount zero but the
cgroup refcount is nonzero, reuse the rmdir waitqueue to
block the rmdir until free_css_set_work is called.

Signed-off-by: Colin Cross <ccross@android.com>
13 years agocgroup: Set CGRP_RELEASABLE when adding to a cgroup
Colin Cross [Wed, 24 Nov 2010 05:37:03 +0000 (21:37 -0800)]
cgroup: Set CGRP_RELEASABLE when adding to a cgroup

Changes the meaning of CGRP_RELEASABLE to be set on any cgroup
that has ever had a task or cgroup in it, or had css_get called
on it.  The bit is set in cgroup_attach_task, cgroup_create,
and __css_get.  It is not necessary to set the bit in
cgroup_fork, as the task is either in the root cgroup, in
which can never be released, or the task it was forked from
already set the bit in croup_attach_task.

Signed-off-by: Colin Cross <ccross@android.com>
13 years agoMerge remote branch 'tegra/linux-tegra-2.6.36' into android-tegra-2.6.36
Rebecca Schultz Zavin [Fri, 17 Dec 2010 23:29:50 +0000 (15:29 -0800)]
Merge remote branch 'tegra/linux-tegra-2.6.36' into android-tegra-2.6.36

13 years agovideo: tegra: nvmap: Add logging to some error conditions
Rebecca Schultz Zavin [Fri, 17 Dec 2010 23:06:38 +0000 (15:06 -0800)]
video: tegra: nvmap: Add logging to some error conditions

Change-Id: I1ec34fd4a6bb21a6d84912a7228c209f459261be
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
13 years agoMerge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36
Colin Cross [Fri, 17 Dec 2010 07:09:45 +0000 (23:09 -0800)]
Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36

13 years agocrypto: tegra-aes: Disable clock at end of probe
Colin Cross [Thu, 16 Dec 2010 20:51:22 +0000 (12:51 -0800)]
crypto: tegra-aes: Disable clock at end of probe

Change-Id: Ie5b98b705a7ec70782df5dc0aec69438b699661c
Signed-off-by: Colin Cross <ccross@android.com>
13 years agoMerge remote branch android-2.6.36 into android-tegra-2.6.36
Erik Gilling [Wed, 15 Dec 2010 02:10:08 +0000 (18:10 -0800)]
Merge remote branch android-2.6.36 into android-tegra-2.6.36

Change-Id: Ice30bc601132f829abd664c68ddc61cbcdb8668c

13 years agoMerge remote branch 'tegra/linux-tegra-2.6.36' into android-tegra-2.6.36
Dima Zavin [Tue, 14 Dec 2010 22:12:05 +0000 (14:12 -0800)]
Merge remote branch 'tegra/linux-tegra-2.6.36' into android-tegra-2.6.36

13 years ago[ARM] tegra: ventana: register AES device
Varun Wadekar [Sun, 17 Oct 2010 00:44:37 +0000 (06:14 +0530)]
[ARM] tegra: ventana: register AES device

Change-Id: I5badd8d4967d7a98439b6f4b5d1329b28ee0c2d4
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
13 years ago[ARM] tegra: add aes to devices.c
Varun Wadekar [Sun, 17 Oct 2010 00:40:43 +0000 (06:10 +0530)]
[ARM] tegra: add aes to devices.c

Change-Id: Id13075009d785e784ae6bd0feb9b29f3fa7184df
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
13 years agocrypto: driver for tegra AES hardware
Varun Wadekar [Mon, 18 Oct 2010 11:29:31 +0000 (16:59 +0530)]
crypto: driver for tegra AES hardware

driver supports ecb/cbc/ansi_x9.31rng modes, 128, 192 and 256-bit key sizes
and encrypt/decrypt using ssk.

Change-Id: I63e03ead5b53adc5e44cf5b60f9f700dea2a2e61
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
13 years agoARM: tegra: hardware arbitration semaphore support
Varun Wadekar [Fri, 15 Oct 2010 17:12:14 +0000 (22:42 +0530)]
ARM: tegra: hardware arbitration semaphore support

add apis to use the hardware arbitration semaphores in order
to share hardware modules between kernel drivers and AVP
firmware (e.g., the BSEA (audio bitstream) engine and
AES block)

Change-Id: I500ef0797223bc702151ad14e0e2156f50644a2a
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
13 years agoARM: tegra: duplicate vde clock for aes in tegra2_clocks
Varun Wadekar [Wed, 10 Nov 2010 12:51:21 +0000 (18:21 +0530)]
ARM: tegra: duplicate vde clock for aes in tegra2_clocks

Change-Id: If5ad2bfe767c7c43e83fd78ac1cb3d9c62fe785d
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
13 years agoARM: tegra: add VDE and arb semaphores to iomap.h
Varun Wadekar [Fri, 15 Oct 2010 17:04:33 +0000 (22:34 +0530)]
ARM: tegra: add VDE and arb semaphores to iomap.h

Change-Id: Ic47b80d1c7fdf04305afbea4b34d6c9e9c9304ad
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
13 years agoUSB: gadget: composite: Use separate switches for connected and config state
Mike Lockwood [Sat, 11 Dec 2010 00:30:15 +0000 (16:30 -0800)]
USB: gadget: composite: Use separate switches for connected and config state

Also remove disconnect debouncing, which didn't actually work on some platforms

Signed-off-by: Mike Lockwood <lockwood@android.com>
13 years agoMerge remote branch android-2.6.36 into android-tegra-2.6.36
Erik Gilling [Tue, 14 Dec 2010 05:12:12 +0000 (21:12 -0800)]
Merge remote branch android-2.6.36 into android-tegra-2.6.36

Change-Id: Ifd4c8ddc62f0c6e213d203498891d151d9b06442

13 years agoMerge remote branch linux-tegra-2.6.36 into android-tegra
Erik Gilling [Tue, 14 Dec 2010 05:11:04 +0000 (21:11 -0800)]
Merge remote branch linux-tegra-2.6.36 into android-tegra

Change-Id: I90cac044708a1b51ed15374b20709180ed92270a

13 years agovideo: tegra: fix HDMI audio programming
Erik Gilling [Tue, 14 Dec 2010 04:51:43 +0000 (20:51 -0800)]
video: tegra: fix HDMI audio programming

This was causing the Onkyo TXNR708 to drop out audio.

Change-Id: I9b9fd782d39d60c3207ea140a94d074b1338c7fa
Signed-off-by: Erik Gilling <konkers@android.com>
13 years agoPM: Wait for completion of the parent resume before resuming
Benoit Goby [Mon, 13 Dec 2010 23:27:06 +0000 (15:27 -0800)]
PM: Wait for completion of the parent resume before resuming

If the parent device is in the DPM_RESUMING state, resume might get called
before the parent's resume has completed, because dpm_wait won't get
called. This issue was introduced by:
3d46a3c PM: Prevent waiting forever on asynchronous resume after abort

Wait for completion of the parent resume if the parent state is >= DPM_OFF
or == DPM_RESUMING

Change-Id: I14a4e16426f61efceaefedc7e772f53b7522b5dd
Signed-off-by: Benoit Goby <benoit@android.com>
13 years agonet: wireless: bcm4329: Update to Version 4.218.248-17
Greg Goldman [Mon, 13 Dec 2010 17:57:24 +0000 (09:57 -0800)]
net: wireless: bcm4329: Update to Version 4.218.248-17

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoUSB: gadget: acm,rndis: IAD class, subclass & prot should match 1st iface
John Michelau [Fri, 10 Dec 2010 19:51:19 +0000 (13:51 -0600)]
USB: gadget: acm,rndis: IAD class, subclass & prot should match 1st iface

Microsoft recommends that the class and subclass fields of
an IAD match the same fields from the first interface in the
collection that the IAD is grouping. In practice, we are also
finding that the protocol fields should also match. Without
this change, the default Microsoft composite driver may not
group interfaces properly, which is what allows child
function drivers with IAD's to load correctly.

Signed-off-by: Mike Lockwood <lockwood@android.com>
13 years agoUSB: gadget: composite: Dynamically set IAD bFirstInterface
John Michelau [Fri, 10 Dec 2010 18:09:53 +0000 (12:09 -0600)]
USB: gadget: composite: Dynamically set IAD bFirstInterface

bFirstInterface should be set equal to bInterfaceNumber of
the first interface in a grouping. It's currently being set
only when a composite device is bound, and it does not get
updated when functions are enabled or disabled.

Signed-off-by: Mike Lockwood <lockwood@android.com>
13 years agoUSB: gadget: android Fix gadget descriptor compliance for IAD's
John Michelau [Fri, 10 Dec 2010 17:33:54 +0000 (11:33 -0600)]
USB: gadget: android Fix gadget descriptor compliance for IAD's

USB-IF core team mandates that composite devices containing
IAD's must use bDeviceClass=0xEF, bDeviceSubClass=0x02, &
bDeviceProtocol=0x01 instead of the usual 0x00 in all fields.
This is not a problem currently on Linux hosts, but it is a
problem when connecting to Windows hosts. Without this change
the default Microsoft composite driver will not group
interfaces properly, which is what allows child function
drivers with IAD's to load correctly.

Signed-off-by: Mike Lockwood <lockwood@android.com>
13 years agousb: host: tegra: Remove clear PORT_RESUME to clear PORT_SUSPEND
Jay Cheng [Tue, 7 Dec 2010 15:15:32 +0000 (10:15 -0500)]
usb: host: tegra: Remove clear PORT_RESUME to clear PORT_SUSPEND

PORT_SUSPEND bit will be cleared by the host controller when PORT_RESUME
change to 0.

Change-Id: I94a72f51be1cebee414f11ace89a7e8b3249278d
Signed-off-by: Jay Cheng <jacheng@nvidia.com>
13 years agotegra: video: host: fix race condition in hostintr wait list
Varun Wadekar [Tue, 23 Nov 2010 14:33:02 +0000 (20:03 +0530)]
tegra: video: host: fix race condition in hostintr wait list

Change-Id: I5e58f5fe8935741441e2b30f585bb997b6317d3d
Author: Alex Frid <afrid@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
13 years agoLinux 2.6.36.2
Greg Kroah-Hartman [Thu, 9 Dec 2010 22:17:27 +0000 (14:17 -0800)]
Linux 2.6.36.2

13 years agoUn-inline get_pipe_info() helper function
Linus Torvalds [Mon, 29 Nov 2010 00:27:19 +0000 (16:27 -0800)]
Un-inline get_pipe_info() helper function

commit 72083646528d4887b920deb71b37e09bc7d227bb upstream.

This avoids some include-file hell, and the function isn't really
important enough to be inlined anyway.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoExport 'get_pipe_info()' to other users
Linus Torvalds [Sun, 28 Nov 2010 22:09:57 +0000 (14:09 -0800)]
Export 'get_pipe_info()' to other users

commit c66fb347946ebdd5b10908866ecc9fa05ee2cf3d upstream.

And in particular, use it in 'pipe_fcntl()'.

The other pipe functions do not need to use the 'careful' version, since
they are only ever called for things that are already known to be pipes.

The normal read/write/ioctl functions are called through the file
operations structures, so if a file isn't a pipe, they'd never get
called.  But pipe_fcntl() is special, and called directly from the
generic fcntl code, and needs to use the same careful function that the
splice code is using.

Cc: Jens Axboe <jaxboe@fusionio.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoRename 'pipe_info()' to 'get_pipe_info()'
Linus Torvalds [Sun, 28 Nov 2010 21:56:09 +0000 (13:56 -0800)]
Rename 'pipe_info()' to 'get_pipe_info()'

commit 71993e62a47dabddf10302807d6aa260455503f4 upstream.

.. and change it to take the 'file' pointer instead of an inode, since
that's what all users want anyway.

The renaming is preparatory to exporting it to other users.  The old
'pipe_info()' name was too generic and is already used elsewhere, so
before making the function public we need to use a more specific name.

Cc: Jens Axboe <jaxboe@fusionio.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agonmi: fix clock comparator revalidation
Heiko Carstens [Thu, 25 Nov 2010 08:52:45 +0000 (09:52 +0100)]
nmi: fix clock comparator revalidation

commit e8129c642155616d9e2160a75f103e127c8c3708 upstream.

On each machine check all registers are revalidated. The save area for
the clock comparator however only contains the upper most seven bytes
of the former contents, if valid.
Therefore the machine check handler uses a store clock instruction to
get the current time and writes that to the clock comparator register
which in turn will generate an immediate timer interrupt.
However within the lowcore the expected time of the next timer
interrupt is stored. If the interrupt happens before that time the
handler won't be called. In turn the clock comparator won't be
reprogrammed and therefore the interrupt condition stays pending which
causes an interrupt loop until the expected time is reached.

On NOHZ machines this can result in unresponsive machines since the
time of the next expected interrupted can be a couple of days in the
future.

To fix this just revalidate the clock comparator register with the
expected value.
In addition the special handling for udelay must be changed as well.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agor8169: fix checksum broken
Shan Wei [Fri, 12 Nov 2010 00:15:25 +0000 (00:15 +0000)]
r8169: fix checksum broken

commit d5d3ebe3be5c5123f2d444e186717f45284151e2 upstream.

If r8196 received packets with invalid sctp/igmp(not tcp, udp) checksum, r8196 set skb->ip_summed
wit CHECKSUM_UNNECESSARY. This cause that upper protocol don't check checksum field.

I am not family with r8196 driver. I try to guess the meaning of RxProtoIP and IPFail.
RxProtoIP stands for received IPv4 packet that upper protocol is not tcp and udp.
!(opts1 & IPFail) is true means that driver correctly to check checksum in IPv4 header.

If it's right, I think we should not set ip_summed wit CHECKSUM_UNNECESSARY for my sctp packets
with invalid checksum.

If it's not right, please tell me.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agor8169: revert "Handle rxfifo errors on 8168 chips"
françois romieu [Mon, 8 Nov 2010 13:23:05 +0000 (13:23 +0000)]
r8169: revert "Handle rxfifo errors on 8168 chips"

commit 53f57357ff0afc37804f4e82ee3123e0c0a2cad6 upstream.

The original patch helps under obscure conditions (no pun) but
some 8168 do not like it. The change needs to be tightened with
a specific 8168 version.

This reverts commit 801e147cde02f04b5c2f42764cd43a89fc7400a2
("r8169: Handle rxfifo errors on 8168 chips").

Regression at https://bugzilla.kernel.org/show_bug.cgi?id=20882

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Tested-by: Andreas Radke <a.radke@arcor.de>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Daniel J Blueman <daniel.blueman@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agor8169: (re)init phy on resume
Stanislaw Gruszka [Wed, 20 Oct 2010 22:25:42 +0000 (22:25 +0000)]
r8169: (re)init phy on resume

commit fccec10b33503a2b1197c8e7a3abd30443bedb08 upstream.

Fix switching device to low-speed mode after resume reported in:
https://bugzilla.redhat.com/show_bug.cgi?id=502974

Reported-and-tested-by: Laurentiu Badea <bugzilla-redhat@wotevah.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agor8169: fix rx checksum offload
Eric Dumazet [Mon, 6 Sep 2010 03:04:05 +0000 (20:04 -0700)]
r8169: fix rx checksum offload

commit adea1ac7effbddbe60a9de6d63462bfe79289e59 upstream.

While porting GRO to r8169, I found this driver has a bug in its rx
path.

All skbs given to network stack had their ip_summed set to
CHECKSUM_NONE, while hardware said they had correct TCP/UDP checksums.

The reason is driver sets skb->ip_summed on the original skb before the
copy eventually done by copybreak. The fresh skb gets the ip_summed =
CHECKSUM_NONE value, forcing network stack to recompute checksum, and
preventing my GRO patch to work.

Fix is to make the ip_summed setting after skb copy.

Note : rx_copybreak current value is 16383, so all frames are copied...

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agomsp3400: fix mute audio regression
Hans Verkuil [Sun, 17 Oct 2010 10:24:20 +0000 (07:24 -0300)]
msp3400: fix mute audio regression

commit 0310871d8f71da4ad8643687fbc40f219a0dac4d upstream.

The switch to the new control framework caused a regression where the audio was
no longer unmuted after the carrier scan finished.

The original code attempted to set the volume control to its current value in
order to have the set-volume control code to be called that handles the volume
and muting. However, the framework will not call that code unless the new volume
value is different from the old.

Instead we now call msp_s_ctrl directly.

It is a bit of a hack: we really need a v4l2_ctrl_refresh_ctrl function for this
(or something along those lines).

Thanks to Andy Walls for bisecting this and to Shane Shrybman for reporting it!

Reported-by: Shane Shrybman <shrybman@teksavvy.com>
Thanks-to: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoqla2xxx: Add module parameter to enable/disable GFF_ID device type check.
Chad Dupuis [Fri, 15 Oct 2010 18:27:40 +0000 (11:27 -0700)]
qla2xxx: Add module parameter to enable/disable GFF_ID device type check.

commit 4da26e162b69d89c3186a35a052c05e61a555637 upstream.

Add the module parameter ql2xgffidenable to disable/enable the use of the
GFF_ID name server command to prevent non FCP SCSI devices from being added to
the driver's internal fc_port database.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agocfg80211: fix extension channel checks to initiate communication
Luis R. Rodriguez [Sat, 13 Nov 2010 00:31:23 +0000 (16:31 -0800)]
cfg80211: fix extension channel checks to initiate communication

commit 9236d838c920e90708570d9bbd7bb82d30a38130 upstream.

When operating in a mode that initiates communication and using
HT40 we should fail if we cannot use both primary and secondary
channels to initiate communication. Our current ht40 allowmap
only covers STA mode of operation, for beaconing modes we need
a check on the fly as the mode of operation is dynamic and
there other flags other than disable which we should read
to check if we can initiate communication.

Do not allow for initiating communication if our secondary HT40
channel has is either disabled, has a passive scan flag, a
no-ibss flag or is a radar channel. Userspace now has similar
checks but this is also needed in-kernel.

Reported-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agords: Integer overflow in RDS cmsg handling
Dan Rosenberg [Wed, 17 Nov 2010 06:37:16 +0000 (06:37 +0000)]
rds: Integer overflow in RDS cmsg handling

commit 218854af84038d828a32f061858b1902ed2beec6 upstream.

In rds_cmsg_rdma_args(), the user-provided args->nr_local value is
restricted to less than UINT_MAX.  This seems to need a tighter upper
bound, since the calculation of total iov_size can overflow, resulting
in a small sock_kmalloc() allocation.  This would probably just result
in walking off the heap and crashing when calling rds_rdma_pages() with
a high count value.  If it somehow doesn't crash here, then memory
corruption could occur soon after.

Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoeconet: fix CVE-2010-3848
Phil Blundell [Wed, 24 Nov 2010 19:51:47 +0000 (11:51 -0800)]
econet: fix CVE-2010-3848

commit a27e13d370415add3487949c60810e36069a23a6 upstream.

Don't declare variable sized array of iovecs on the stack since this
could cause stack overflow if msg->msgiovlen is large.  Instead, coalesce
the user-supplied data into a new buffer and use a single iovec for it.

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoeconet: fix CVE-2010-3850
Phil Blundell [Wed, 24 Nov 2010 19:49:53 +0000 (11:49 -0800)]
econet: fix CVE-2010-3850

commit 16c41745c7b92a243d0874f534c1655196c64b74 upstream.

Add missing check for capable(CAP_NET_ADMIN) in SIOCSIFADDR operation.

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoeconet: disallow NULL remote addr for sendmsg(), fixes CVE-2010-3849
Phil Blundell [Wed, 24 Nov 2010 19:49:19 +0000 (11:49 -0800)]
econet: disallow NULL remote addr for sendmsg(), fixes CVE-2010-3849

commit fa0e846494792e722d817b9d3d625a4ef4896c96 upstream.

Later parts of econet_sendmsg() rely on saddr != NULL, so return early
with EINVAL if NULL was passed otherwise an oops may occur.

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoext4: fix NULL pointer dereference in print_daily_error_info()
Sergey Senozhatsky [Thu, 28 Oct 2010 01:30:04 +0000 (21:30 -0400)]
ext4: fix NULL pointer dereference in print_daily_error_info()

commit a1c6c5698d53db4c47a25c3a8d11731a4d7b8370 upstream.

Fix NULL pointer dereference in print_daily_error_info, when
called on unmounted fs (EXT4_SB(sb) returns NULL), by removing error
reporting timer in ext4_put_super.

Google-Bug-Id: 3017663

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agocrypto: padlock - Fix AES-CBC handling on odd-block-sized input
Herbert Xu [Thu, 4 Nov 2010 18:38:39 +0000 (14:38 -0400)]
crypto: padlock - Fix AES-CBC handling on odd-block-sized input

commit c054a076a1bd4731820a9c4d638b13d5c9bf5935 upstream.

On certain VIA chipsets AES-CBC requires the input/output to be
a multiple of 64 bytes.  We had a workaround for this but it was
buggy as it sent the whole input for processing when it is meant
to only send the initial number of blocks which makes the rest
a multiple of 64 bytes.

As expected this causes memory corruption whenever the workaround
kicks in.

Reported-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agox25: Prevent crashing when parsing bad X.25 facilities
Dan Rosenberg [Fri, 12 Nov 2010 20:44:42 +0000 (12:44 -0800)]
x25: Prevent crashing when parsing bad X.25 facilities

commit 5ef41308f94dcbb3b7afc56cdef1c2ba53fa5d2f upstream.

Now with improved comma support.

On parsing malformed X.25 facilities, decrementing the remaining length
may cause it to underflow.  Since the length is an unsigned integer,
this will result in the loop continuing until the kernel crashes.

This patch adds checks to ensure decrementing the remaining length does
not cause it to wrap around.

Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agocan-bcm: fix minor heap overflow
Oliver Hartkopp [Wed, 10 Nov 2010 12:10:30 +0000 (12:10 +0000)]
can-bcm: fix minor heap overflow

commit 0597d1b99fcfc2c0eada09a698f85ed413d4ba84 upstream.

On 64-bit platforms the ASCII representation of a pointer may be up to 17
bytes long. This patch increases the length of the buffer accordingly.

http://marc.info/?l=linux-netdev&m=128872251418192&w=2

Reported-by: Dan Rosenberg <drosenberg@vsecurity.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
CC: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agofilter: make sure filters dont read uninitialized memory
David S. Miller [Wed, 10 Nov 2010 18:38:24 +0000 (10:38 -0800)]
filter: make sure filters dont read uninitialized memory

commit 57fe93b374a6b8711995c2d466c502af9f3a08bb upstream.

There is a possibility malicious users can get limited information about
uninitialized stack mem array. Even if sk_run_filter() result is bound
to packet length (0 .. 65535), we could imagine this can be used by
hostile user.

Initializing mem[] array, like Dan Rosenberg suggested in his patch is
expensive since most filters dont even use this array.

Its hard to make the filter validation in sk_chk_filter(), because of
the jumps. This might be done later.

In this patch, I use a bitmap (a single long var) so that only filters
using mem[] loads/stores pay the price of added security checks.

For other filters, additional cost is a single instruction.

[ Since we access fentry->k a lot now, cache it in a local variable
  and mark filter entry pointer as const. -DaveM ]

Reported-by: Dan Rosenberg <drosenberg@vsecurity.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agokbuild: use getopt_long(), not its _only() variant
Arnaud Lacombe [Mon, 23 Aug 2010 16:01:24 +0000 (12:01 -0400)]
kbuild: use getopt_long(), not its _only() variant

commit c94d3fb01fb6db1899cdf53ea4eb9d38e08a08fe upstream.

NetBSD lacks getopt_long_only() whereas getopt_long() works just fine.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agovlan: Avoid hwaccel vlan packets when vid not used.
Jesse Gross [Mon, 8 Nov 2010 21:23:01 +0000 (13:23 -0800)]
vlan: Avoid hwaccel vlan packets when vid not used.

[This patch applies only to 2.6.36 stable.  The problem was introduced
in that release and is already fixed by larger changes to the vlan
code in 2.6.37.]

Normally hardware accelerated vlan packets are quickly dropped if
there is no corresponding vlan device configured.  The one exception
is promiscuous mode, where we allow all of these packets through so
they can be picked up by tcpdump.  However, this behavior causes a
crash if we actually try to receive these packets.  This fixes that
crash by ignoring packets with vids not corresponding to a configured
device in the vlan hwaccel routines and then dropping them before they
get to consumers in the network stack.

Reported-by: Ben Greear <greearb@candelatech.com>
Tested-by: Nikola Ciprich <extmaillist@linuxbox.cz>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agomemory corruption in X.25 facilities parsing
andrew hendry [Wed, 3 Nov 2010 12:54:53 +0000 (12:54 +0000)]
memory corruption in X.25 facilities parsing

commit a6331d6f9a4298173b413cf99a40cc86a9d92c37 upstream.

Signed-of-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoOMAP3: DMA: Errata i541: sDMA FIFO draining does not finish
Peter Ujfalusi [Mon, 11 Oct 2010 21:18:56 +0000 (14:18 -0700)]
OMAP3: DMA: Errata i541: sDMA FIFO draining does not finish

commit 0e4905c0199d683497833be60a428c784d7575b8 upstream.

Implement the suggested workaround for OMAP3 regarding to sDMA draining
issue, when the channel is disabled on the fly.
This errata affects the following configuration:
sDMA transfer is source synchronized
Buffering is enabled
SmartStandby is selected.

The issue can be easily reproduced by creating overrun situation while
recording audio.
Either introduce load to the CPU:
nice -19 arecord -D hw:0 -M -B 10000 -F 5000 -f dat > /dev/null & \
dd if=/dev/urandom of=/dev/null

or suspending the arecord, and resuming it:
arecord -D hw:0 -M -B 10000 -F 5000 -f dat > /dev/null
CTRL+Z; fg; CTRL+Z; fg; ...

In case of overrun audio stops DMA, and restarts it (without reseting
the sDMA channel). When we hit this errata in stop case (sDMA drain did
not complete), at the coming start the sDMA will not going to be
operational (it is still draining).
This leads to DMA stall condition.
On OMAP3 we can recover with sDMA channel reset, it has been observed
that by introducing unrelated sDMA activity might also help (reading
from MMC for example).

The same errata exists for OMAP2, where the suggestion is to disable the
buffering to avoid this type of error.
On OMAP3 the suggestion is to set sDMA to NoStandby before disabling
the channel, and wait for the drain to finish, than configure sDMA to
SmartStandby again.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by : Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by : Manjunath Kondaiah G <manjugk@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoomap: dma: Fix buffering disable bit setting for omap24xx
Jarkko Nikula [Mon, 11 Oct 2010 21:18:45 +0000 (14:18 -0700)]
omap: dma: Fix buffering disable bit setting for omap24xx

commit 3e57f1626b5febe5cc99aa6870377deef3ae03cc upstream.

An errata workaround for omap24xx is not setting the buffering disable bit
25 what is the purpose but channel enable bit 7 instead.

Background for this fix is the DMA stalling issue with ASoC omap-mcbsp
driver. Peter Ujfalusi <peter.ujfalusi@nokia.com> has found an issue in
recording that the DMA stall could happen if there were a buffer overrun
detected by ALSA and the DMA was stopped and restarted due that. This
problem is known to occur on both OMAP2420 and OMAP3. It can recover on
OMAP3 after dma free, dma request and reconfiguration cycle. However, on
OMAP2420 it seems that only way to recover is a reset.

Problem was not visible before the commit c12abc0. That commit changed that
the McBSP transmitter/receiver is released from reset only when needed. That
is, only enabled McBSP transmitter without transmission was able to prevent
this DMA stall problem in receiving side and underlying problem did not show
up until now. McBSP transmitter itself seems to no be reason since DMA
stall does not recover by enabling the transmission after stall.

Debugging showed that there were a DMA write active during DMA stop time and
it never completed even when restarting the DMA. Experimenting showed that
the DMA buffering disable bit could be used to avoid stalling when using
source synchronized transfers. However that could have performance hit and
OMAP3 TRM states that buffering disable is not allowed for destination
synchronized transfers so subsequent patch will implement a method to
complete DMA writes when stopping.

This patch is based on assumtion that complete lock-up on OMAP2420 is
different but related problem. I don't have access to OMAP2420 errata but
I believe this old workaround here is put for a reason but unfortunately
a wrong bit was typed and problem showed up only now.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Manjunath Kondaiah G <manjugk@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoInput: i8042 - add Sony VAIO VPCZ122GX to nomux list
Dmitry Torokhov [Thu, 4 Nov 2010 16:12:44 +0000 (09:12 -0700)]
Input: i8042 - add Sony VAIO VPCZ122GX to nomux list

[Note that the mainline will not have this particular fix but rather
will blacklist entire VAIO line based off DMI board name. For stable
I am being a bit more cautious and blacklist one particular product.]

Trying to query/activate active multiplexing mode on this VAIO makes
both keyboard and touchpad inoperable. Futher kernels will blacklist
entire VAIO line, however here we blacklist just one particular model.

Reported-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agonet: Limit socket I/O iovec total length to INT_MAX.
David S. Miller [Thu, 28 Oct 2010 18:41:55 +0000 (11:41 -0700)]
net: Limit socket I/O iovec total length to INT_MAX.

commit 8acfe468b0384e834a303f08ebc4953d72fb690a upstream.

This helps protect us from overflow issues down in the
individual protocol sendmsg/recvmsg handlers.  Once
we hit INT_MAX we truncate out the rest of the iovec
by setting the iov_len members to zero.

This works because:

1) For SOCK_STREAM and SOCK_SEQPACKET sockets, partial
   writes are allowed and the application will just continue
   with another write to send the rest of the data.

2) For datagram oriented sockets, where there must be a
   one-to-one correspondance between write() calls and
   packets on the wire, INT_MAX is going to be far larger
   than the packet size limit the protocol is going to
   check for and signal with -EMSGSIZE.

Based upon a patch by Linus Torvalds.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agonet: Truncate recvfrom and sendto length to INT_MAX.
Linus Torvalds [Sat, 30 Oct 2010 23:43:10 +0000 (16:43 -0700)]
net: Truncate recvfrom and sendto length to INT_MAX.

commit 253eacc070b114c2ec1f81b067d2fed7305467b0 upstream.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agogenirq: Fix incorrect proc spurious output
Kenji Kaneshige [Tue, 30 Nov 2010 08:36:08 +0000 (17:36 +0900)]
genirq: Fix incorrect proc spurious output

commit 25c9170ed64a6551beefe9315882f754e14486f4 upstream.

Since commit a1afb637(switch /proc/irq/*/spurious to seq_file) all
/proc/irq/XX/spurious files show the information of irq 0.

Current irq_spurious_proc_open() passes on NULL as the 3rd argument,
which is used as an IRQ number in irq_spurious_proc_show(), to the
single_open(). Because of this, all the /proc/irq/XX/spurious file
shows IRQ 0 information regardless of the IRQ number.

To fix the problem, irq_spurious_proc_open() must pass on the
appropreate data (IRQ number) to single_open().

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Reviewed-by: Yong Zhang <yong.zhang0@gmail.com>
LKML-Reference: <4CF4B778.90604@jp.fujitsu.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agonohz/s390: fix arch_needs_cpu() return value on offline cpus
Heiko Carstens [Wed, 1 Dec 2010 09:08:01 +0000 (10:08 +0100)]
nohz/s390: fix arch_needs_cpu() return value on offline cpus

commit 398812159e328478ae49b4bd01f0d71efea96c39 upstream.

This fixes the same problem as described in the patch "nohz: fix
printk_needs_cpu() return value on offline cpus" for the arch_needs_cpu()
primitive:

arch_needs_cpu() may return 1 if called on offline cpus. When a cpu gets
offlined it schedules the idle process which, before killing its own cpu,
will call tick_nohz_stop_sched_tick().
That function in turn will call arch_needs_cpu() in order to check if the
local tick can be disabled. On offline cpus this function should naturally
return 0 since regardless if the tick gets disabled or not the cpu will be
dead short after. That is besides the fact that __cpu_disable() should already
have made sure that no interrupts on the offlined cpu will be delivered anyway.

In this case it prevents tick_nohz_stop_sched_tick() to call
select_nohz_load_balancer(). No idea if that really is a problem. However what
made me debug this is that on 2.6.32 the function get_nohz_load_balancer() is
used within __mod_timer() to select a cpu on which a timer gets enqueued.
If arch_needs_cpu() returns 1 then the nohz_load_balancer cpu doesn't get
updated when a cpu gets offlined. It may contain the cpu number of an offline
cpu. In turn timers get enqueued on an offline cpu and not very surprisingly
they never expire and cause system hangs.

This has been observed 2.6.32 kernels. On current kernels __mod_timer() uses
get_nohz_timer_target() which doesn't have that problem. However there might
be other problems because of the too early exit tick_nohz_stop_sched_tick()
in case a cpu goes offline.

This specific bug was indrocuded with 3c5d92a0 "nohz: Introduce
arch_needs_cpu".

In this case a cpu hotplug notifier is used to fix the issue in order to keep
the normal/fast path small. All we need to do is to clear the condition that
makes arch_needs_cpu() return 1 since it is just a performance improvement
which is supposed to keep the local tick running for a short period if a cpu
goes idle. Nothing special needs to be done except for clearing the condition.

Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>