pandora-kernel.git
12 years agotwl4030_bci_battery: Improved threshold setting
David Goldsmith [Mon, 20 Jun 2011 02:31:56 +0000 (04:31 +0200)]
twl4030_bci_battery: Improved threshold setting

12 years agoBCI: pass di pointer to avoid NULL pointer dereference later
Grazvydas Ignotas [Fri, 17 Jun 2011 12:31:44 +0000 (15:31 +0300)]
BCI: pass di pointer to avoid NULL pointer dereference later

12 years agoinput: vsense: round multipliers up
Grazvydas Ignotas [Fri, 10 Jun 2011 10:31:10 +0000 (13:31 +0300)]
input: vsense: round multipliers up

This will make read values consistent.

12 years agoupdate defconfig
Grazvydas Ignotas [Sun, 5 Jun 2011 16:55:09 +0000 (19:55 +0300)]
update defconfig

12 years agoARM: Expose some PMON registers through sysfs
Mans Rullgard [Sat, 28 Mar 2009 13:05:02 +0000 (13:05 +0000)]
ARM: Expose some PMON registers through sysfs

12 years agoARM: Add option to allow userspace access to performance counters
Mans Rullgard [Tue, 10 Nov 2009 00:52:56 +0000 (00:52 +0000)]
ARM: Add option to allow userspace access to performance counters

This adds an option to allow userspace access to the performance monitor
registers of the Cortex-A8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoARM: Add option to allow userspace PLE access
Mans Rullgard [Tue, 10 Nov 2009 00:41:54 +0000 (00:41 +0000)]
ARM: Add option to allow userspace PLE access

This adds a Kconfig option to allow userspace to access the L2 preload
engine (PLE) found in Cortex-A8.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoARM: Expose some CPU control registers via sysfs
Mans Rullgard [Tue, 10 Nov 2009 00:39:21 +0000 (00:39 +0000)]
ARM: Expose some CPU control registers via sysfs

This creates sysfs files under /sys/devices/system/cpu/cpuN
exposing the values of the control register, auxiliary control
register, and L2 cache auxiliary control register.  Writing to
the files allows setting the value of bits which are safe to
change at any time.

Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years agoModified charging logic to make it stop and start sooner, hopefully preventing puffing
David Goldsmith [Mon, 23 May 2011 14:54:41 +0000 (10:54 -0400)]
Modified charging logic to make it stop and start sooner, hopefully preventing puffing

[notasas@gmail.com: cleaned up comments a bit]
Signed-off-by: David Goldsmith <wizard@houseoffire.ca>
13 years agocifs: never ignore uid/gid override
Grazvydas Ignotas [Fri, 11 Mar 2011 22:08:51 +0000 (00:08 +0200)]
cifs: never ignore uid/gid override

this is what newer CIFS does too.

13 years ago[CIFS] Use posix open on file open when server supports it
Steve French [Tue, 3 Mar 2009 18:00:34 +0000 (18:00 +0000)]
[CIFS] Use posix open on file open when server supports it

Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years ago[CIFS] reopen file via newer posix open protocol operation if available
Steve French [Mon, 23 Feb 2009 20:43:11 +0000 (20:43 +0000)]
[CIFS] reopen file via newer posix open protocol operation if available

If the network connection crashes, and we have to reopen files, preferentially
use the newer cifs posix open protocol operation if the server supports it.

Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years ago[CIFS] improve posix semantics of file create
Steve French [Fri, 20 Feb 2009 04:32:45 +0000 (04:32 +0000)]
[CIFS] improve posix semantics of file create

Samba server added support for a new posix open/create/mkdir operation
a year or so ago, and we added support to cifs for mkdir to use it,
but had not added the corresponding code to file create.

The following patch helps improve the performance of the cifs create
path (to Samba and servers which support the cifs posix protocol
extensions).  Using Connectathon basic test1, with 2000 files, the
performance improved about 15%, and also helped reduce network traffic
(17% fewer SMBs sent over the wire) due to saving a network round trip
for the SetPathInfo on every file create.

It should also help the semantics (and probably the performance) of
write (e.g. when posix byte range locks are on the file) on file
handles opened with posix create, and adds support for a few flags
which would have to be ignored otherwise.

Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agoCRED: Wrap task credential accesses in the CIFS filesystem
David Howells [Thu, 13 Nov 2008 23:38:47 +0000 (10:38 +1100)]
CRED: Wrap task credential accesses in the CIFS filesystem

Wrap access to task credentials so that they can be separated more easily from
the task_struct during the introduction of COW creds.

Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().

Change some task->e?[ug]id to task_e?[ug]id().  In some places it makes more
sense to use RCU directly rather than a convenient wrapper; these will be
addressed by later patches.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: James Morris <jmorris@namei.org>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Cc: Steve French <sfrench@samba.org>
Cc: linux-cifs-client@lists.samba.org
Signed-off-by: James Morris <jmorris@namei.org>
13 years agocifs: posix fill in inode needed by posix open
Jeff Layton [Wed, 11 Feb 2009 13:08:28 +0000 (08:08 -0500)]
cifs: posix fill in inode needed by posix open

function needed to prepare for posix open

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agocifs: properly handle case where CIFSGetSrvInodeNumber fails
Jeff Layton [Wed, 11 Feb 2009 13:08:26 +0000 (08:08 -0500)]
cifs: properly handle case where CIFSGetSrvInodeNumber fails

...if it does then we pass a pointer to an unintialized variable for
the inode number to cifs_new_inode. Have it pass a NULL pointer instead.

Also tweak the function prototypes to reduce the amount of casting.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agocifs: refactor new_inode() calls and inode initialization
Jeff Layton [Tue, 10 Feb 2009 12:33:57 +0000 (07:33 -0500)]
cifs: refactor new_inode() calls and inode initialization

Move new inode creation into a separate routine and refactor the
callers to take advantage of it.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years ago[CIFS] some cleanup to dir.c prior to addition of posix_open
Steve French [Mon, 19 Jan 2009 02:38:35 +0000 (02:38 +0000)]
[CIFS] some cleanup to dir.c prior to addition of posix_open

Signed-off-by: Steve French <sfrench@us.ibm.com>
13 years agommc_block: do not DMA to stack
Ben Dooks [Mon, 8 Jun 2009 22:33:57 +0000 (23:33 +0100)]
mmc_block: do not DMA to stack

In the write recovery routine, the data to get from the card
is allocated from the stack. The DMA mapping documentation says
explicitly stack memory is not mappable by any of the DMA calls.

Change to using kmalloc() to allocate the memory for the result
from the card and then free it once we've finished with the
transaction.

[ Changed to GFP_KERNEL allocation - Pierre Ossman ]

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
13 years agommc_block: be prepared for oversized requests
Pierre Ossman [Fri, 10 Apr 2009 15:52:57 +0000 (17:52 +0200)]
mmc_block: be prepared for oversized requests

The block layer does not support very low sector count restrictions
so we need to be prepared to handle bigger requests than we can send
directly to the controller.

Problem found by Manuel Lauss.

Signed-off-by: Pierre Ossman <pierre@ossman.eu>
13 years agommc_block: ensure all sectors that do not have errors are read
Adrian Hunter [Wed, 31 Dec 2008 17:21:17 +0000 (18:21 +0100)]
mmc_block: ensure all sectors that do not have errors are read

If a card encounters an ECC error while reading a sector it will
timeout.  Instead of reporting the entire I/O request as having
an error, redo the I/O one sector at a time so that all readable
sectors are provided to the upper layers.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
13 years agommc_block: print better error messages
Adrian Hunter [Thu, 16 Oct 2008 09:55:25 +0000 (12:55 +0300)]
mmc_block: print better error messages

Add command response and card status to error
messages.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
13 years agommc_block: hard code 512 byte block size
Pierre Ossman [Sun, 31 Aug 2008 12:10:08 +0000 (14:10 +0200)]
mmc_block: hard code 512 byte block size

We use 512 byte blocks on all cards, and newer cards support nothing
else, so hard code it and make the code less complex.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
13 years agommc_block: inform block layer about sector count restriction
Pierre Ossman [Sat, 16 Aug 2008 19:34:02 +0000 (21:34 +0200)]
mmc_block: inform block layer about sector count restriction

Make sure we consider the maximum block count when we tell the block
layer about the maximum sector count. That way we don't have to chop
up the request ourselves.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
13 years agoarm: hack: set correct cacheline size
Grazvydas Ignotas [Mon, 31 Jan 2011 23:47:31 +0000 (01:47 +0200)]
arm: hack: set correct cacheline size

later kernels detect this, we'll hardcode it here like this.

13 years ago[ARM] 5534/1: kmalloc must return a cache line aligned buffer
Martin Fuzzey [Mon, 1 Jun 2009 08:19:37 +0000 (09:19 +0100)]
[ARM] 5534/1: kmalloc must return a cache line aligned buffer

Define ARCH_KMALLOC_MINALIGN in asm/cache.h
At the request of Russell also move ARCH_SLAB_MINALIGN to this file.

Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agopull in some macros for newer SGX
Grazvydas Ignotas [Sat, 22 Jan 2011 16:53:08 +0000 (18:53 +0200)]
pull in some macros for newer SGX

13 years agoAssume worst case hardware setting and reset it on boot
Urja Rannikko [Mon, 1 Nov 2010 22:36:01 +0000 (00:36 +0200)]
Assume worst case hardware setting and reset it on boot

This should prevent stuff like in the
"Overclocking Broke My Pandora" thread.

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
13 years agoDSS2: pull in some mainline omapfb code
Grazvydas Ignotas [Wed, 25 Aug 2010 20:17:38 +0000 (23:17 +0300)]
DSS2: pull in some mainline omapfb code

Main benefit is more strict mode checking to deny invalid modes.
Surely we need to update to latest driver eventually..

13 years agoDSS2: add some hackish FIR filter coefficient access
Grazvydas Ignotas [Tue, 24 Aug 2010 13:22:11 +0000 (16:22 +0300)]
DSS2: add some hackish FIR filter coefficient access

13 years agoOMAP: DSS2: make filter coefficient tables human readable
Grazvydas Ignotas [Mon, 23 Aug 2010 16:10:09 +0000 (19:10 +0300)]
OMAP: DSS2: make filter coefficient tables human readable

Reorganize scaler FIR filter data as FIR value tables from raw
register values. This makes them easier to understand and simplifies
register programming code.

No functional changes.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
13 years agopandora misc: add OPP limiter
Grazvydas Ignotas [Sun, 22 Aug 2010 19:23:19 +0000 (22:23 +0300)]
pandora misc: add OPP limiter

on EvilDragon's request

13 years agopandora misc: HACK to change OPP level according to set mhz
Urja Rannikko [Sun, 1 Aug 2010 09:18:08 +0000 (09:18 +0000)]
pandora misc: HACK to change OPP level according to set mhz

[notasas@gmail.com: made delay mandatory,
use newer opp values, some coding style]
Signed-off-by: Urja Rannikko <urjaman@gmail.com>
13 years agoleds: Fix TWL4030 PWM LED driver
Urja Rannikko [Sat, 31 Jul 2010 04:26:17 +0000 (04:26 +0000)]
leds: Fix TWL4030 PWM LED driver

When called in interrupt mode defers actual work using schedule_work().
Fixes heartbeat and timer trigger when used with this driver.

[notasas@gmail.com: adjusted to always use workqueue]
Signed-off-by: Urja Rannikko <urjaman@gmail.com>
13 years agobluetooth: hci_h4p: remove faulty timeout handling
Grazvydas Ignotas [Thu, 8 Jul 2010 19:18:22 +0000 (22:18 +0300)]
bluetooth: hci_h4p: remove faulty timeout handling

It was reported that it is only causing trouble.

Reported-by: Urja Rannikko <urjaman@gmail.com>
13 years agopandora: try to detect USB overcurrent condition
Grazvydas Ignotas [Thu, 8 Jul 2010 12:03:50 +0000 (15:03 +0300)]
pandora: try to detect USB overcurrent condition

It doesn't seem like the chip ever reports it, but let's at least
log something in case it does.

13 years agomisc: pandora: parse dpll register properly
Grazvydas Ignotas [Thu, 8 Jul 2010 11:58:25 +0000 (14:58 +0300)]
misc: pandora: parse dpll register properly

13 years ago[ARM] OMAP3 clock: avoid invalid FREQSEL values during DPLL rate rounding
Paul Walmsley [Wed, 28 Jan 2009 19:08:44 +0000 (12:08 -0700)]
[ARM] OMAP3 clock: avoid invalid FREQSEL values during DPLL rate rounding

The DPLL FREQSEL jitter correction bits are set based on a table in
the 34xx TRM, Table 4-38, according to the DPLL's internal clock
frequency "Fint."  Several Fint frequency ranges are missing from this
table.  Previously, we allowed these Fint frequency ranges to be
selected in the rate rounding code, but did not change the FREQSEL bits.
Correspondence with the OMAP hardware team indicates that Fint values
not in the table should not be used.  So, prevent them from being
selected during DPLL rate rounding.  This removes warnings and also
can prevent the chip from locking up.

The first pass through the rate rounding code will update the DPLL max
and min dividers appropriately, so later rate rounding passes will run
faster than the first.

Peter de Schrijver <peter.de-schrijver@nokia.com> put up with several
test cycles of this patch - thanks Peter.

linux-omap source commit is f9c1b82f55b60fc39eaa6e7aa1fbe380c0ffe2e9.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Peter de Schrijver <peter.de-schrijver@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years ago[ARM] OMAP3 clock: optimize DPLL rate rounding algorithm
Paul Walmsley [Wed, 28 Jan 2009 19:08:41 +0000 (12:08 -0700)]
[ARM] OMAP3 clock: optimize DPLL rate rounding algorithm

The previous DPLL rate rounding algorithm counted the divider (N) down
from the maximum to 1.  Since we currently use a broad DPLL rate
tolerance, and lower N values are more power-efficient, we can often
bypass several iterations through the loop by counting N upwards from
1.

Peter de Schrijver <peter.de-schrijver@nokia.com> put up with several
test cycles of this patch - thanks Peter.

linux-omap source commit is 6f6d82bb2f80fa20a841ac3e95a6f44a5a156188.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Peter de Schrijver <peter.de-schrijver@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years ago[ARM] OMAP3 clock: remove unnecessary dpll_data dereferences
Paul Walmsley [Wed, 28 Jan 2009 19:08:38 +0000 (12:08 -0700)]
[ARM] OMAP3 clock: remove unnecessary dpll_data dereferences

Remove some clutter from omap2_dpll_round_rate().

linux-omap source commit is 4625dceb8583c02a6d67ededc9f6a8347b6b8cb7.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoinput: vsense: add middle click
Urja Rannikko [Wed, 30 Jun 2010 04:18:44 +0000 (04:18 +0000)]
input: vsense: add middle click

Addition to mouse buttons mode; Down is middle click. Reorganized the
the logic a bit.

Signed-off-by: Urja Rannikko <urjaman@gmail.com>
13 years agoASoC: fix CLKX polarity
Grazvydas Ignotas [Wed, 16 Jun 2010 00:49:41 +0000 (03:49 +0300)]
ASoC: fix CLKX polarity

After mass production started it was found that several boards exhibit
noise problems during sound playback. After some investigation it was
determined that CLKX polarity is set incorrectly, and even if most boards
can tolerate this setting, there are some that don't.

Fix polarity setup in the board file. As the clock settings for input and
output now match, merge in and out functions and structures to simplify
code.

13 years agoASoC: add start treshold to prevent underflows in some cases
Grazvydas Ignotas [Thu, 10 Jun 2010 20:34:51 +0000 (23:34 +0300)]
ASoC: add start treshold to prevent underflows in some cases

This is useful for apps that don't rely on audio blocking and
feed fixed amount of samples over time period (like emulators).

13 years agoomap: DMA: Init CDAC to zero
manjugk manjugk [Thu, 4 Mar 2010 07:11:56 +0000 (07:11 +0000)]
omap: DMA: Init CDAC to zero

The register DMA4_CDAC needs to be initialized to zero
before starting DMA transfer.

Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Govindraj R <govindraj.raja@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Reported-by:S, Venkatraman <svenkatr@ti.com>
Signed-off-by: Manjunatha GK <manjugk@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoOMAP: dma_chan[lch_head].flag & OMAP_DMA_ACTIVE tested twice in omap_dma_unlink_lch()
Roel Kluin [Thu, 14 Jan 2010 02:10:29 +0000 (18:10 -0800)]
OMAP: dma_chan[lch_head].flag & OMAP_DMA_ACTIVE tested twice in omap_dma_unlink_lch()

The same flag and bits were tested twice.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoomap: Fix race condition in omap dma driver
Tao Hu [Wed, 11 Nov 2009 02:55:17 +0000 (18:55 -0800)]
omap: Fix race condition in omap dma driver

The bug could cause irq enable bit of one DMA channel is
cleared/set unexpectedly when 2 (or more) drivers are calling
omap_request_dma()/omap_free_dma() simultaneously

Signed-off-by: Fei Yang <AFY095@motorola.com>
Signed-off-by: Tao Hu <taohu@motorola.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoomap: SDMA: Fix omap_stop_dma() API for channel linking
Santosh Shilimkar [Thu, 22 Oct 2009 21:46:31 +0000 (14:46 -0700)]
omap: SDMA: Fix omap_stop_dma() API for channel linking

OMAP sDMA driver API omap_stop_dma() doesn't really stop the dma when used
in linking scenario.

The DMA channel needs to be disabled before resetting the chain.
Also fix clearing of the OMAP_DMA_ACTIVE status in the linked case.

Cc: Hari n <hari.zoom@gmail.com>
Cc: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP: Fix race in OMAP2/3 DMA IRQ handling
Juha Yrjola [Thu, 29 Jan 2009 16:57:12 +0000 (08:57 -0800)]
ARM: OMAP: Fix race in OMAP2/3 DMA IRQ handling

CSR must be cleared before invoking the callback.

If the callback function starts a new, fast DMA transfer on the same
channel, the completion status might lost if CSR is cleared after
the callback invocation.

Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoDSS2: make pan, set var not to wait for GO bits
Grazvydas Ignotas [Sun, 6 Jun 2010 21:51:19 +0000 (00:51 +0300)]
DSS2: make pan, set var not to wait for GO bits

In case we want to run faster than LCD refresh rate, we'll
eventually hit already set GO bit, and waiting for it to
clear will not allow to go faster then refresh, which is not
always desirable. Disable this behavior, anyone wanting to
sync can always use FBIO_WAITFORVSYNC.

13 years agoARM: OMAP: gptimer min_delta_ns corrected Release-2010-05/1
Aaro Koskinen [Thu, 29 Jan 2009 16:57:17 +0000 (08:57 -0800)]
ARM: OMAP: gptimer min_delta_ns corrected

When 32 kHz timer is used the min_delta_ns should be initialized so
that it reflects the timer programming cost. A write to the timer
device will be usually posted, but it takes roughly 3 cycles before
it is effective. If the timer is reprogrammed before that, the CPU
will stall until the previous write completes. This was pointed out by
Richard Woodruff.

Since the lower bound for min_delta_ns is 1000, the change is visible
only with tick rates less than 3 MHz.

Also note that the old value is incorrect for 32 kHz also due to
a rounding error, and it can cause the timer queue to hang (due to
clockevent code trying to program the timer with zero ticks).

Signed-off-by: Aaro Koskinen <Aaro.Koskinen@nokia.com>
Reviewed-by: Richard Woodruff <r-woodruff2@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoARM: OMAP2: drop redundant pending write check for gptimer
Paul Walmsley [Thu, 11 Dec 2008 01:36:33 +0000 (17:36 -0800)]
ARM: OMAP2: drop redundant pending write check for gptimer

omap_dm_timer_write_reg() already waits for pending writes to complete,
so the extra wait in omap_dm_timer_set_load() is superfluous.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
13 years agoMerge branch 'pandora-27-omap1' into pandora-27-omap1_rework
Grazvydas Ignotas [Fri, 7 May 2010 14:03:11 +0000 (17:03 +0300)]
Merge branch 'pandora-27-omap1' into pandora-27-omap1_rework

13 years agoMerge branch 'master' of git://git.infradead.org/users/dedekind/ubifs-v2.6.27 into...
Grazvydas Ignotas [Fri, 7 May 2010 13:58:24 +0000 (16:58 +0300)]
Merge branch 'master' of git://git.infradead.org/users/dedekind/ubifs-v2.6.27 into pandora-27-omap1_rework

13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux...
Grazvydas Ignotas [Fri, 7 May 2010 13:52:18 +0000 (16:52 +0300)]
Merge branch 'master' of git://git./linux/kernel/git/stable/linux-2.6.27.y into pandora-27-omap1_rework

Conflicts:
drivers/usb/musb/davinci.c
security/Kconfig

13 years agogpio-keys: enable autorepeat
Grazvydas Ignotas [Wed, 5 May 2010 23:15:34 +0000 (02:15 +0300)]
gpio-keys: enable autorepeat

do this to be consistent with keypad and to make framebuffer console
more useful.

13 years agoInput: gpio-keys - add flag to allow auto repeat
Dominic Curran [Tue, 28 Oct 2008 02:30:53 +0000 (22:30 -0400)]
Input: gpio-keys - add flag to allow auto repeat

This patch adds a flag to gpio-key driver to turn on the input subsystems
auto repeat feature if needed.

Signed-off-by: Dominic Curran <dcurran@ti.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agodon't touch i2c until it's ready
Grazvydas Ignotas [Tue, 4 May 2010 14:55:03 +0000 (17:55 +0300)]
don't touch i2c until it's ready

13 years agonew NAND layout and enable UBI in defconfig
Grazvydas Ignotas [Sat, 1 May 2010 21:27:28 +0000 (00:27 +0300)]
new NAND layout and enable UBI in defconfig

13 years agomtd: omap2 fix prefetch mode read issue
Vimal Singh [Thu, 7 Jan 2010 06:46:26 +0000 (12:16 +0530)]
mtd: omap2 fix prefetch mode read issue

There is a bug in nand prefetch read routine, which comes into effect
only if nand device is a 16-bit device (as we have in zoom boards).
This bug is effective only with below combination of conditions:
1. nand deivce, in use, is a 16 bit device
2. nand driver supports 'subpage' read
3. SW ECC is in use

This was not seen old  kernel (ex: .23), because when, in early days,
we tested this (nand prefetch read in LDP boards) there was no
'subpage read' support.
Later when we had subpage read in (.27) kernel, we had hw ecc enabled
always in our internal tree. So, we missed this bug.

This patch fixes the issue.

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
13 years agomtd: omap: adding DMA mode support in nand prefetch/post-write
vimal singh [Mon, 13 Jul 2009 10:59:16 +0000 (16:29 +0530)]
mtd: omap: adding DMA mode support in nand prefetch/post-write

This patch adds DMA mode support for nand prefetch/post-write engine.

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
13 years agomtd: omap: add support for nand prefetch-read and post-write
vimal singh [Mon, 13 Jul 2009 10:56:24 +0000 (16:26 +0530)]
mtd: omap: add support for nand prefetch-read and post-write

This patch adds prefetch support to access nand flash in mpu mode.
This patch also adds 8-bit nand support (omap_read/write_buf8).
Prefetch can be used for both 8- and 16-bit devices.

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
13 years agomtd: nand: fix build failure and incorrect return from omap_wait()
vimal singh [Sat, 27 Jun 2009 05:37:06 +0000 (11:07 +0530)]
mtd: nand: fix build failure and incorrect return from omap_wait()

We need to include jiffies.h manually in some cases, and the status
returned from omap_wait() was broken in two separate ways.

Also add cond_resched() to the loop.

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
13 years agomtd: nand: add OMAP2/OMAP3 NAND driver
Vimal Singh [Tue, 12 May 2009 20:47:03 +0000 (13:47 -0700)]
mtd: nand: add OMAP2/OMAP3 NAND driver

This driver is present in the OMAP tree, now pushing it to MTD.

Original author(s):
       Jian Zhang <jzhang@ti.com>

Signed-off-by: Vimal Singh <vimalsingh@ti.com>
Cc: Jian Zhang <jzhang@ti.com>
Cc: Artem Bityutskiy <dedekind@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
13 years agoremove NAND driver to apply mainline version
Grazvydas Ignotas [Sat, 1 May 2010 20:01:48 +0000 (23:01 +0300)]
remove NAND driver to apply mainline version

13 years agoMerge branch 'master' of git://git.infradead.org/users/dedekind/ubifs-v2.6.27 into...
Grazvydas Ignotas [Sat, 1 May 2010 16:00:58 +0000 (19:00 +0300)]
Merge branch 'master' of git://git.infradead.org/users/dedekind/ubifs-v2.6.27 into pandora-27-omap1

14 years agoinput: rename pwrbutton and touchscreen
Grazvydas Ignotas [Mon, 26 Apr 2010 20:46:51 +0000 (23:46 +0300)]
input: rename pwrbutton and touchscreen

14 years agopandora: enable supplies on boot
Grazvydas Ignotas [Mon, 26 Apr 2010 12:29:34 +0000 (15:29 +0300)]
pandora: enable supplies on boot

We don't want to rely on bootloader for this, this would be unneeded
dependency.

14 years agoOMAP3 clock: lessen amount of noisy messages
Artem Bityutskiy [Tue, 12 May 2009 23:34:40 +0000 (17:34 -0600)]
OMAP3 clock: lessen amount of noisy messages

On our system we see the following messages:

Disabling unused clock "gpt2_ick"
Disabling unused clock "gpt3_ick"
Disabling unused clock "gpt4_ick"
Disabling unused clock "gpt5_ick"
...

The messages have KERN_INFO level and if you have serial
console, they normally go there. I do not think it is good
idea to print that much stuff there. Moreover, messages
are not properly prefixed and for mortals it is not
immeadietly clear where they come from.

Let's give them debugging level instead.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
[paul@pwsan.com: trimmed debugging output in patch description]

14 years agoinput: twl4030keypad: use generic name
Grazvydas Ignotas [Mon, 26 Apr 2010 11:53:53 +0000 (14:53 +0300)]
input: twl4030keypad: use generic name

14 years agoinput: vsense: mbuttons functionality, more /proc control, refactoring
Grazvydas Ignotas [Mon, 26 Apr 2010 11:24:21 +0000 (14:24 +0300)]
input: vsense: mbuttons functionality, more /proc control, refactoring

14 years agoupdate defconfig
Grazvydas Ignotas [Tue, 20 Apr 2010 15:16:56 +0000 (18:16 +0300)]
update defconfig

this defconfig is used for test kernels

14 years agoDSS2: update gamma for TD043MTEA1 panel
Grazvydas Ignotas [Tue, 20 Apr 2010 15:14:01 +0000 (18:14 +0300)]
DSS2: update gamma for TD043MTEA1 panel

14 years agopandora: platform data for wl1251
Grazvydas Ignotas [Tue, 20 Apr 2010 13:25:51 +0000 (16:25 +0300)]
pandora: platform data for wl1251

14 years agoAdd a very basic platform driver module to bring up the SDIO WiFi so that the platfor...
David-John Willis [Sun, 30 Aug 2009 18:31:31 +0000 (19:31 +0100)]
Add a very basic platform driver module to bring up the SDIO WiFi so that the platform stuff is no longer hacked into the WL1251 driver (TODO: Clean up and move somewhere more mainline friendly).

14 years agoSDIO patches to put some card into into platform devices (hack) to match WL1251 driver.
David-John Willis [Mon, 22 Jun 2009 19:49:31 +0000 (20:49 +0100)]
SDIO patches to put some card into into platform devices (hack) to match WL1251 driver.

14 years agousb otg: remove PM dependency
Grazvydas Ignotas [Thu, 8 Apr 2010 21:58:25 +0000 (00:58 +0300)]
usb otg: remove PM dependency

It can function fine without it.

14 years agoLinux 2.6.27.46 v2.6.27.46
Greg Kroah-Hartman [Thu, 1 Apr 2010 22:53:33 +0000 (15:53 -0700)]
Linux 2.6.27.46

14 years agohwmon: (coretemp) Add missing newline to dev_warn() message
Dean Nelson [Mon, 29 Mar 2010 20:03:00 +0000 (22:03 +0200)]
hwmon: (coretemp) Add missing newline to dev_warn() message

commit 4d7a5644e4adfafe76c2bd8ee168e3f3b5dae3a8 upstream.

Add missing newline to dev_warn() message string. This is more of an issue
with older kernels that don't automatically add a newline if it was missing
from the end of the previous line.

Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: fix usbfs regression
Alan Stern [Sat, 6 Mar 2010 20:04:03 +0000 (15:04 -0500)]
USB: fix usbfs regression

commit 7152b592593b9d48b33f8997b1dfd6df9143f7ec upstream.

This patch (as1352) fixes a bug in the way isochronous input data is
returned to userspace for usbfs transfers.  The entire buffer must be
copied, not just the first actual_length bytes, because the individual
packets will be discontiguous if any of them are short.

Reported-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotmpfs: cleanup mpol_parse_str()
KOSAKI Motohiro [Tue, 23 Mar 2010 20:35:32 +0000 (13:35 -0700)]
tmpfs: cleanup mpol_parse_str()

commit 926f2ae04f183098cf9a30521776fb2759c8afeb upstream.

mpol_parse_str() made lots 'err' variable related bug.  Because it is ugly
and reviewing unfriendly.

This patch simplifies it.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agodoc: add the documentation for mpol=local
KOSAKI Motohiro [Tue, 23 Mar 2010 20:35:33 +0000 (13:35 -0700)]
doc: add the documentation for mpol=local

commit 5574169613b40b85d6f4c67208fa4846b897a0a1 upstream.

commit 3f226aa1c (mempolicy: support mpol=local tmpfs mount option) added
new mpol=local mount option.  but it didn't add a documentation.

This patch does it.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotmpfs: handle MPOL_LOCAL mount option properly
KOSAKI Motohiro [Tue, 23 Mar 2010 20:35:31 +0000 (13:35 -0700)]
tmpfs: handle MPOL_LOCAL mount option properly

commit 12821f5fb942e795f8009ece14bde868893bd811 upstream.

commit 71fe804b6d5 (mempolicy: use struct mempolicy pointer in
shmem_sb_info) added mpol=local mount option.  but its feature is broken
since it was born.  because such code always return 1 (i.e.  mount
failure).

This patch fixes it.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotmpfs: mpol=bind:0 don't cause mount error.
KOSAKI Motohiro [Tue, 23 Mar 2010 20:35:30 +0000 (13:35 -0700)]
tmpfs: mpol=bind:0 don't cause mount error.

commit d69b2e63e9172afb4d07c305601b79a55509ac4c upstream.

Currently, following mount operation cause mount error.

% mount -t tmpfs -ompol=bind:0 none /tmp

Because commit 71fe804b6d5 (mempolicy: use struct mempolicy pointer in
shmem_sb_info) corrupted MPOL_BIND parse code.

This patch restore the needed one.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotmpfs: fix oops on mounts with mpol=default
Ravikiran G Thirumalai [Tue, 23 Mar 2010 20:35:28 +0000 (13:35 -0700)]
tmpfs: fix oops on mounts with mpol=default

commit 413b43deab8377819aba1dbad2abf0c15d59b491 upstream.

Fix an 'oops' when a tmpfs mount point is mounted with the mpol=default
mempolicy.

Upon remounting a tmpfs mount point with 'mpol=default' option, the mount
code crashed with a null pointer dereference.  The initial problem report
was on 2.6.27, but the problem exists in mainline 2.6.34-rc as well.  On
examining the code, we see that mpol_new returns NULL if default mempolicy
was requested.  This 'NULL' mempolicy is accessed to store the node mask
resulting in oops.

The following patch fixes it.

Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agob44 WOL setup: one-bit-off stack corruption kernel panic fix
Stanislav Brabec [Wed, 9 Dec 2009 05:00:22 +0000 (21:00 -0800)]
b44 WOL setup: one-bit-off stack corruption kernel panic fix

commit e0188829cb724e7d12a2d4e343b368ff1d6e1471 upstream.

About 50% of shutdowns of b44 Ethernet adapter ends by kernel panic
with kernels compiled with stack-protector.

Checking b44_magic_pattern() return values, one call of
b44_magic_pattern() returns 127. It means, that set_bit(128, pmask)
was called on line 1509. It means that bit 0 of 17th byte of pmask was
overwritten. But pmask has only 16 bytes. Stack corruption happens.

It seems that set_bit() on line 1509 always writes one bit off.

The fix does not only solve the stack corruption, but also makes Wake
On LAN working on my onboard B44 on Asus A7V-333X mainboard.

It seems that this problem affects all kernel versions since commit
725ad800 ([PATCH] b44: add wol for old nic) on 2006-06-20.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoV4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini()
Francesco Lavra [Thu, 31 Dec 2009 11:47:11 +0000 (08:47 -0300)]
V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini()

commit 19f48cb105b7fa18d0dcab435919a3a29b7a7c4c upstream.

this patch fixes a memory leak which occurs when an em28xx card with DVB
extension is unplugged or its DVB extension driver is unloaded. In
dvb_fini(), dev->dvb must be freed before being set to NULL, as is done
in dvb_init() in case of error.
Note that this bug is also present in the latest stable kernel release.

Signed-off-by: Francesco Lavra <francescolavra@interfree.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agobonding: ignore updelay param when there is no active slave
Jiri Pirko [Fri, 24 Apr 2009 03:57:29 +0000 (03:57 +0000)]
bonding: ignore updelay param when there is no active slave

commit 41f8910040639eb106b1a5b5301aab79ecde4940 upstream.

Pointed out by Sean E. Millichamp.

Quote from Documentation/networking/bonding.txt:
"Note that when a bonding interface has no active links, the
driver will immediately reuse the first link that goes up, even if the
updelay parameter has been specified (the updelay is ignored in this
case).  If there are slave interfaces waiting for the updelay timeout
to expire, the interface that first went into that state will be
immediately reused.  This reduces down time of the network if the
value of updelay has been overestimated, and since this occurs only in
cases with no connectivity, there is no additional penalty for
ignoring the updelay."

This patch actually changes the behaviour in this way.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agocoredump: suppress uid comparison test if core output files are pipes
Neil Horman [Fri, 5 Mar 2010 21:44:16 +0000 (13:44 -0800)]
coredump: suppress uid comparison test if core output files are pipes

commit 76595f79d76fbe6267a51b3a866a028d150f06d4 upstream.

Modify uid check in do_coredump so as to not apply it in the case of
pipes.

This just got noticed in testing.  The end of do_coredump validates the
uid of the inode for the created file against the uid of the crashing
process to ensure that no one can pre-create a core file with different
ownership and grab the information contained in the core when they
shouldn' tbe able to.  This causes failures when using pipes for a core
dumps if the crashing process is not root, which is the uid of the pipe
when it is created.

The fix is simple.  Since the check for matching uid's isn't relevant for
pipes (a process can't create a pipe that the uermodehelper code will open
anyway), we can just just skip it in the event ispipe is non-zero

Reverts a pipe-affecting change which was accidentally made in

: commit c46f739dd39db3b07ab5deb4e3ec81e1c04a91af
: Author:     Ingo Molnar <mingo@elte.hu>
: AuthorDate: Wed Nov 28 13:59:18 2007 +0100
: Commit:     Linus Torvalds <torvalds@woody.linux-foundation.org>
: CommitDate: Wed Nov 28 10:58:01 2007 -0800
:
:     vfs: coredumping fix

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: maximilian attems <max@stro.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agox86, ia32_aout: do not kill argument mapping
Jiri Slaby [Wed, 10 Feb 2010 19:55:16 +0000 (20:55 +0100)]
x86, ia32_aout: do not kill argument mapping

commit 318f6b228ba88a394ef560efc1bfe028ad5ae6b6 upstream.

Do not set current->mm->mmap to NULL in 32-bit emulation on 64-bit
load_aout_binary after flush_old_exec as it would destroy already
set brpm mapping with arguments.

Introduced by b6a2fea39318e43fee84fa7b0b90d68bed92d2ba
mm: variable length argument support
where the argument mapping in bprm was added.

[ hpa: this is a regression from 2.6.22... time to kill a.out? ]

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
LKML-Reference: <1265831716-7668-1-git-send-email-jslaby@suse.cz>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ollie Wild <aaw@google.com>
Cc: x86@kernel.org
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agofix LOOKUP_FOLLOW on automount "symlinks"
Al Viro [Tue, 16 Feb 2010 18:09:36 +0000 (18:09 +0000)]
fix LOOKUP_FOLLOW on automount "symlinks"

commit ac278a9c505092dd82077a2446af8f9fc0d9c095 upstream.

Make sure that automount "symlinks" are followed regardless of LOOKUP_FOLLOW;
it should have no effect on them.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoKVM: x86: check for cr3 validity in ioctl_set_sregs
Marcelo Tosatti [Thu, 16 Apr 2009 11:30:44 +0000 (08:30 -0300)]
KVM: x86: check for cr3 validity in ioctl_set_sregs

commit 59839dfff5eabca01cc4e20b45797a60a80af8cb upstream.

Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity
checking for the new cr3 value:

"Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to
the kernel. This will trigger a NULL pointer access in gfn_to_rmap()
when userspace next tries to call KVM_RUN on the affected VCPU and kvm
attempts to activate the new non-existent page table root.

This happens since kvm only validates that cr3 points to a valid guest
physical memory page when code *inside* the guest sets cr3. However, kvm
currently trusts the userspace caller (e.g. QEMU) on the host machine to
always supply a valid page table root, rather than properly validating
it along with the rest of the reloaded guest state."

http://sourceforge.net/tracker/?func=detail&atid=893831&aid=2687641&group_id=180599

Check for a valid cr3 address in kvm_arch_vcpu_ioctl_set_sregs, triple
fault in case of failure.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoparisc: isa-eeprom - Fix loff_t usage
Michael Buesch [Mon, 20 Jul 2009 22:58:44 +0000 (22:58 +0000)]
parisc: isa-eeprom - Fix loff_t usage

commit 6b4dbcd86a9d464057fcc7abe4d0574093071fcc upstream.

loff_t is a signed type. If userspace passes a negative ppos, the "count"
range check is weakened. "count"s bigger than HPEE_MAX_LENGTH will pass the check.
Also, if ppos is negative, the readb(eisa_eeprom_addr + *ppos) will poke in random
memory.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agotc: Fix unitialized kernel memory leak
Eric Dumazet [Wed, 2 Sep 2009 02:40:09 +0000 (02:40 +0000)]
tc: Fix unitialized kernel memory leak

commit 16ebb5e0b36ceadc8186f71d68b0c4fa4b6e781b upstream.

Three bytes of uninitialized kernel memory are currently leaked to user

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agodrm/r128: Add test for initialisation to all ioctls that require it
Ben Hutchings [Sun, 23 Aug 2009 15:59:04 +0000 (16:59 +0100)]
drm/r128: Add test for initialisation to all ioctls that require it

commit 7dc482dfeeeefcfd000d4271c4626937406756d7 upstream.

Almost all r128's private ioctls require that the CCE state has
already been initialised.  However, most do not test that this has
been done, and will proceed to dereference a null pointer.  This may
result in a security vulnerability, since some ioctls are
unprivileged.

This adds a macro for the common initialisation test and changes all
ioctl implementations that require prior initialisation to use that
macro.

Also, r128_do_init_cce() does not test that the CCE state has not
been initialised already.  Repeated initialisation may lead to a crash
or resource leak.  This adds that test.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoKVM: VMX: Check cpl before emulating debug register access
Avi Kivity [Tue, 1 Sep 2009 09:03:25 +0000 (12:03 +0300)]
KVM: VMX: Check cpl before emulating debug register access

commit 0a79b009525b160081d75cef5dbf45817956acf2 upstream.

Debug registers may only be accessed from cpl 0.  Unfortunately, vmx will
code to emulate the instruction even though it was issued from guest
userspace, possibly leading to an unexpected trap later.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoext4: Avoid null pointer dereference when decoding EROFS w/o a journal
Theodore Ts'o [Tue, 28 Jul 2009 03:09:47 +0000 (23:09 -0400)]
ext4: Avoid null pointer dereference when decoding EROFS w/o a journal

commit 78f1ddbb498283c2445c11b0dfa666424c301803 upstream.

We need to check to make sure a journal is present before checking the
journal flags in ext4_decode_error().

Signed-off-by: Eric Sesterhenn <eric.sesterhenn@lsexperts.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoKVM: x86 emulator: limit instructions to 15 bytes
Avi Kivity [Tue, 24 Nov 2009 11:20:15 +0000 (13:20 +0200)]
KVM: x86 emulator: limit instructions to 15 bytes

commit eb3c79e64a70fb8f7473e30fa07e89c1ecc2c9bb upstream

[ <cebbert@redhat.com>: backport to 2.6.27 ]

While we are never normally passed an instruction that exceeds 15 bytes,
smp games can cause us to attempt to interpret one, which will cause
large latencies in non-preempt hosts.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: EHCI: fix counting of transaction error retries
Alan Stern [Fri, 31 Jul 2009 14:41:40 +0000 (10:41 -0400)]
USB: EHCI: fix counting of transaction error retries

commit ef4638f955f2c4a667c8af20769d03f5ed3781ca upstream.

This patch (as1274) simplifies the counting of transaction-error
retries.  Now we will count up from 0 to QH_XACTERR_MAX instead of
down from QH_XACTERR_MAX to 0.

The patch also fixes a small bug: qh->xacterr was not getting
initialized for interrupt endpoints.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Matthijs Kooijman <matthijs@stdin.nl>
Cc: Reinoud Koornstra <koornstra@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: usbfs: properly clean up the as structure on error paths
Linus Torvalds [Tue, 16 Feb 2010 20:35:07 +0000 (12:35 -0800)]
USB: usbfs: properly clean up the as structure on error paths

commit ddeee0b2eec2a51b0712b04de4b39e7bec892a53 upstream.

I notice that the processcompl_compat() function seems to be leaking the
'struct async *as' in the error paths.

I think that the calling convention is fundamentally buggered. The
caller is the one that did the "reap_as()" to get the as thing, the
caller should be the one to free it too.

Freeing it in the caller also means that it very clearly always gets
freed, and avoids the need for any "free in the error case too".

From: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Marcus Meissner <meissner@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
14 years agoUSB: usbfs: only copy the actual data received
Greg KH [Mon, 15 Feb 2010 17:37:46 +0000 (09:37 -0800)]
USB: usbfs: only copy the actual data received

commit d4a4683ca054ed9917dfc9e3ff0f7ecf74ad90d6 upstream.

We need to only copy the data received by the device to userspace, not
the whole kernel buffer, which can contain "stale" data.

Thanks to Marcus Meissner for pointing this out and testing the fix.

Reported-by: Marcus Meissner <meissner@suse.de>
Tested-by: Marcus Meissner <meissner@suse.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>