Stephen Warren [Mon, 19 Mar 2012 17:36:00 +0000 (11:36 -0600)]
gpio: tegra: tegra_gpio_config shouldn't be __init
This function is called from non-__init context, just like
tegra_gpio_enable()/disable(). Remove the __init annotation to avoid
section mismatch warnings during compile.
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Sekhar Nori [Sun, 11 Mar 2012 12:46:12 +0000 (18:16 +0530)]
gpio/davinci: fix enabling unbanked GPIO IRQs
Unbanked GPIO IRQ handling code made a copy of just
the irq_chip structure for GPIO IRQ lines which caused
problems after the generic IRQ chip conversion because
there was no valid irq_chip_type structure with the
right "regs" populated. irq_gc_mask_set_bit() was
therefore accessing random addresses.
Fix it by making a copy of irq_chip_type structure
instead. This will ensure sane register offsets.
Cc: <stable@vger.kernel.org> # v3.0.x+
Reported-by: Jon Povey <Jon.Povey@racelogic.co.uk>
Tested-by: Jon Povey <Jon.Povey@racelogic.co.uk>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Sekhar Nori [Sun, 11 Mar 2012 12:46:11 +0000 (18:16 +0530)]
gpio/davinci: fix oops on unbanked gpio irq request
Unbanked GPIO irq setup code was overwriting chip_data leading
to the following oops on request_irq()
Unable to handle kernel paging request at virtual address
febfffff
pgd =
c22dc000
[
febfffff] *pgd=
00000000
Internal error: Oops: 801 [#1] PREEMPT
Modules linked in: mcu(+) edmak irqk cmemk
CPU: 0 Not tainted (3.0.0-rc7+ #93)
PC is at irq_gc_mask_set_bit+0x68/0x7c
LR is at vprintk+0x22c/0x484
pc : [<
c0080c0c>] lr : [<
c00457e0>] psr:
60000093
sp :
c33e3ba0 ip :
c33e3af0 fp :
c33e3bc4
r10:
c04555bc r9 :
c33d4340 r8 :
60000013
r7 :
0000002d r6 :
c04555bc r5 :
fec67010 r4 :
00000000
r3 :
c04734c8 r2 :
fec00000 r1 :
ffffffff r0 :
00000026
Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user
Control:
0005317f Table:
822dc000 DAC:
00000015
Process modprobe (pid: 526, stack limit = 0xc33e2270)
Stack: (0xc33e3ba0 to 0xc33e4000)
3ba0:
00000000 c007d3d4 c33e3bcc c04555bc c04555bc c33d4340 c33e3bdc c33e3bc8
3bc0:
c007f5f8 c0080bb4 00000000 c04555bc c33e3bf4 c33e3be0 c007f654 c007f5c0
3be0:
00000000 c04555bc c33e3c24 c33e3bf8 c007e6e8 c007f618 c01f2284 c0350af8
3c00:
c0405214 bf016c98 00000001 00000000 c33dc008 0000002d c33e3c54 c33e3c28
3c20:
c007e888 c007e408 00000001 c23ef880 c33dc000 00000000 c33dc080 c25caa00
3c40:
c0487498 bf017078 c33e3c94 c33e3c58 bf016b44 c007e7d4 bf017078 c33dc008
3c60:
c25caa08 c33dc008 c33e3c84 bf017484 c25caa00 c25caa00 c01f5f48 c25caa08
3c80:
c0496d60 bf017484 c33e3ca4 c33e3c98 c022a698 bf01692c c33e3cd4 c33e3ca8
3ca0:
c01f5d88 c022a688 00000000 bf017484 c25caa00 c25caa00 c01f5f48 c25caa08
3cc0:
c0496d60 00000000 c33e3cec c33e3cd8 c01f5f8c c01f5d10 00000000 c33e3cf0
3ce0:
c33e3d14 c33e3cf0 c01f5210 c01f5f58 c303cb48 c25ecf94 c25caa00 c25caa00
3d00:
c25caa34 c33e3dd8 c33e3d34 c33e3d18 c01f6044 c01f51b8 c0496d3c c25caa00
3d20:
c044e918 c33e3dd8 c33e3d44 c33e3d38 c01f4ff4 c01f5fcc c33e3d94 c33e3d48
3d40:
c01f3d10 c01f4fd8 00000000 c044e918 00000000 00000000 c01f52c0 c034d570
3d60:
c33e3d84 c33e3d70 c022bf84 c25caa00 00000000 c044e918 c33e3dd8 c25c2e00
3d80:
c0496d60 bf01763c c33e3db4 c33e3d98 c022b1a0 c01f384c c25caa00 c33e3dd8
3da0:
00000000 c33e3dd8 c33e3dd4 c33e3db8 c022b27c c022b0e8 00000000 bf01763c
3dc0:
c0451c80 c33e3dd8 c33e3e34 c33e3dd8 bf016f60 c022b210 5f75636d 746e6f63
3de0:
006c6f72 00000000 00000000 00000000 00000000 00000000 00000000 bf0174bc
3e00:
00000000 00989680 00000000 00000020 c0451c80 c0451c80 bf0174dc c01f5eb0
3e20:
c33f0f00 bf0174dc c33e3e44 c33e3e38 c01f72f4 bf016e2c c33e3e74 c33e3e48
3e40:
c01f5d88 c01f72e4 00000000 c0451c80 c0451cb4 bf0174dc c01f5eb0 c33f0f00
3e60:
c0473100 00000000 c33e3e94 c33e3e78 c01f5f44 c01f5d10 00000000 c33e3e98
3e80:
bf0174dc c01f5eb0 c33e3ebc c33e3e98 c01f5534 c01f5ec0 c303c038 c3061c30
3ea0:
00003cd8 00098258 bf0174dc c0462ac8 c33e3ecc c33e3ec0 c01f5bec c01f54dc
3ec0:
c33e3efc c33e3ed0 c01f4d30 c01f5bdc bf0173a0 c33e2000 00003cd8 00098258
3ee0:
bf0174dc c33e2000 c00301a4 bf019000 c33e3f1c c33e3f00 c01f6588 c01f4c8c
3f00:
00003cd8 00098258 00000000 c33e2000 c33e3f2c c33e3f20 c01f777c c01f6524
3f20:
c33e3f3c c33e3f30 bf019014 c01f7740 c33e3f7c c33e3f40 c002f3ec bf019010
3f40:
00000000 00003cd8 00098258 bf017518 00000000 00003cd8 00098258 bf017518
3f60:
00000000 c00301a4 c33e2000 00000000 c33e3fa4 c33e3f80 c007b934 c002f3c4
3f80:
c00b307c c00b2f48 00003cd8 00000000 00000003 00000080 00000000 c33e3fa8
3fa0:
c0030020 c007b8b8 00003cd8 00000000 00098288 00003cd8 00098258 00098240
3fc0:
00003cd8 00000000 00000003 00000080 00098008 00098028 00098288 00000001
3fe0:
be892998 be892988 00013d7c 40178740 60000010 00098288 09089041 00200845
Backtrace:
[<
c0080ba4>] (irq_gc_mask_set_bit+0x0/0x7c) from [<
c007f5f8>] (irq_enable+0x48/0x58)
r6:
c33d4340 r5:
c04555bc r4:
c04555bc
[<
c007f5b0>] (irq_enable+0x0/0x58) from [<
c007f654>] (irq_startup+0x4c/0x54)
r5:
c04555bc r4:
00000000
[<
c007f608>] (irq_startup+0x0/0x54) from [<
c007e6e8>] (__setup_irq+0x2f0/0x3cc)
r5:
c04555bc r4:
00000000
[<
c007e3f8>] (__setup_irq+0x0/0x3cc) from [<
c007e888>] (request_threaded_irq+0xc4/0x110)
r8:
0000002d r7:
c33dc008 r6:
00000000 r5:
00000001 r4:
bf016c98
[<
c007e7c4>] (request_threaded_irq+0x0/0x110) from [<
bf016b44>] (mcu_spi_probe+0x228/0x37c [mcu])
[<
bf01691c>] (mcu_spi_probe+0x0/0x37c [mcu]) from [<
c022a698>] (spi_drv_probe+0x20/0x24)
[<
c022a678>] (spi_drv_probe+0x0/0x24) from [<
c01f5d88>] (driver_probe_device+0x88/0x1b0)
[<
c01f5d00>] (driver_probe_device+0x0/0x1b0) from [<
c01f5f8c>] (__device_attach+0x44/0x48)
[<
c01f5f48>] (__device_attach+0x0/0x48) from [<
c01f5210>] (bus_for_each_drv+0x68/0x94)
r5:
c33e3cf0 r4:
00000000
[<
c01f51a8>] (bus_for_each_drv+0x0/0x94) from [<
c01f6044>] (device_attach+0x88/0xa0)
r7:
c33e3dd8 r6:
c25caa34 r5:
c25caa00 r4:
c25caa00
[<
c01f5fbc>] (device_attach+0x0/0xa0) from [<
c01f4ff4>] (bus_probe_device+0x2c/0x4c)
r7:
c33e3dd8 r6:
c044e918 r5:
c25caa00 r4:
c0496d3c
[<
c01f4fc8>] (bus_probe_device+0x0/0x4c) from [<
c01f3d10>] (device_add+0x4d4/0x648)
[<
c01f383c>] (device_add+0x0/0x648) from [<
c022b1a0>] (spi_add_device+0xc8/0x128)
[<
c022b0d8>] (spi_add_device+0x0/0x128) from [<
c022b27c>] (spi_new_device+0x7c/0xb4)
r7:
c33e3dd8 r6:
00000000 r5:
c33e3dd8 r4:
c25caa00
[<
c022b200>] (spi_new_device+0x0/0xb4) from [<
bf016f60>] (mcu_probe+0x144/0x224 [mcu])
r7:
c33e3dd8 r6:
c0451c80 r5:
bf01763c r4:
00000000
[<
bf016e1c>] (mcu_probe+0x0/0x224 [mcu]) from [<
c01f72f4>] (platform_drv_probe+0x20/0x24)
[<
c01f72d4>] (platform_drv_probe+0x0/0x24) from [<
c01f5d88>] (driver_probe_device+0x88/0x1b0)
[<
c01f5d00>] (driver_probe_device+0x0/0x1b0) from [<
c01f5f44>] (__driver_attach+0x94/0x98)
[<
c01f5eb0>] (__driver_attach+0x0/0x98) from [<
c01f5534>] (bus_for_each_dev+0x68/0x94)
r7:
c01f5eb0 r6:
bf0174dc r5:
c33e3e98 r4:
00000000
[<
c01f54cc>] (bus_for_each_dev+0x0/0x94) from [<
c01f5bec>] (driver_attach+0x20/0x28)
r7:
c0462ac8 r6:
bf0174dc r5:
00098258 r4:
00003cd8
[<
c01f5bcc>] (driver_attach+0x0/0x28) from [<
c01f4d30>] (bus_add_driver+0xb4/0x258)
[<
c01f4c7c>] (bus_add_driver+0x0/0x258) from [<
c01f6588>] (driver_register+0x74/0x158)
[<
c01f6514>] (driver_register+0x0/0x158) from [<
c01f777c>] (platform_driver_register+0x4c/0x60)
r7:
c33e2000 r6:
00000000 r5:
00098258 r4:
00003cd8
[<
c01f7730>] (platform_driver_register+0x0/0x60) from [<
bf019014>] (mcu_init+0x14/0x20 [mcu])
[<
bf019000>] (mcu_init+0x0/0x20 [mcu]) from [<
c002f3ec>] (do_one_initcall+0x38/0x170)
[<
c002f3b4>] (do_one_initcall+0x0/0x170) from [<
c007b934>] (sys_init_module+0x8c/0x1a4)
[<
c007b8a8>] (sys_init_module+0x0/0x1a4) from [<
c0030020>] (ret_fast_syscall+0x0/0x2c)
r7:
00000080 r6:
00000003 r5:
00000000 r4:
00003cd8
Code:
e1844003 e585400c e596300c e5932064 (
e7814002)
Fix the issue.
Cc: <stable@vger.kernel.org> # v3.0.x+
Reported-by: Jon Povey <Jon.Povey@racelogic.co.uk>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Tony Lindgren [Mon, 5 Mar 2012 23:32:38 +0000 (15:32 -0800)]
gpio/omap: Fix section warning for omap_mpuio_alloc_gc()
Make omap_mpuio_alloc_gc() __devinit as omap_gpio_chip_init()
is __devinit. Otherwise we get:
WARNING: vmlinux.o(.devinit.text+0xa10): Section mismatch in reference
from the function omap_gpio_chip_init() to the function .init.text:omap_mpuio_alloc_gc()
The function __devinit omap_gpio_chip_init() references
a function __init omap_mpuio_alloc_gc().
If omap_mpuio_alloc_gc is only used by omap_gpio_chip_init then
annotate omap_mpuio_alloc_gc with a matching annotation.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Arnd Bergmann [Fri, 2 Mar 2012 22:32:24 +0000 (17:32 -0500)]
ARM: tegra: export tegra_gpio_{en,dis}able
These two functions are used in drivers that can be
modules, so they need to be exported.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alan Ott <alan@signal11.us>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Bhupesh Sharma [Mon, 27 Feb 2012 05:49:43 +0000 (11:19 +0530)]
gpio/gpio-stmpe: Fix the value returned by _get_value routine
The present _get_value routine returns the contents of the GPIO Monitor Pin
Status Register(GPMR) starting from the bit whose value is requested to BIT 0
(irrelevant bits are replace by 0).
For e.g. if we request the value of GPIO 6 in the earlier implementation the
value returned is:
BIT6 followed by 6 0's
whereas it should just return BIT6.
This patch addresses the same.
Signed-off-by: Bhupesh Sharma <bhupesh.sharma@st.com>
Reviewed-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Stephen Warren [Tue, 6 Mar 2012 00:22:14 +0000 (17:22 -0700)]
Documentation/gpio.txt: Explain expected pinctrl interaction
Update gpio.txt based on recent discussions regarding interaction with the
pinctrl subsystem.
Previously, gpio_request() was described as explicitly not performing any
required mux setup operations etc.
Now, gpio_request() is explicitly as explicitly performing any required mux
setup operations where possible. In the case it isn't, platform code is
required to have set up any required muxing or other configuration prior to
gpio_request() being called, in order to maintain the same semantics.
This is achieved by gpiolib drivers calling e.g. pinctrl_request_gpio() in
their .request() operation.
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: linux-doc@vger.kernel.org
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Roland Stigge [Mon, 5 Mar 2012 22:01:11 +0000 (23:01 +0100)]
GPIO: LPC32xx: Add output reading to GPO P3
The chip offers the function to detect the current state of output of the GPO
P3 pins. Useful for reading GPIO output state in Linux' GPIO API, e.g. via
sysfs.
Please note that this only reads back the currently programmed output state,
not the actual electrical level in terms of a GPI function. Finally, GPO3 is
still just an output.
Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Roland Stigge [Mon, 5 Mar 2012 22:01:10 +0000 (23:01 +0100)]
GPIO: LPC32xx: Fix missing bit selection mask
Add missing mask to pin bit selection in gpio-lpc32xx.c
(#define GPIO3_PIN_IN_SEL)
Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Kevin Hilman [Mon, 5 Mar 2012 23:10:04 +0000 (15:10 -0800)]
gpio/omap: fix wakeups on level-triggered GPIOs
While both level- and edge-triggered GPIOs are capable of generating
interrupts, only edge-triggered GPIOs are capable of generating a
module-level wakeup to the PRCM (c.f. 34xx NDA TRM section 25.5.3.2.)
In order to ensure that devices using level-triggered GPIOs as
interrupts can also cause wakeups (e.g. from idle), this patch enables
edge-triggering for wakeup-enabled, level-triggered GPIOs when a GPIO
bank is runtime-suspended (which also happens during idle.)
This fixes a problem found in GPMC-connected network cards with GPIO
interrupts (e.g. smsc911x on Zoom3, Overo, ...) where network booting
with NFSroot was very slow since the GPIO IRQs used by the NIC were
not generating PRCM wakeups, and thus not waking the system from idle.
NOTE: until v3.3, this boot-time problem was somewhat masked because
the UART init prevented WFI during boot until the full serial driver
was available. Preventing WFI allowed regular GPIO interrupts to fire
and this problem was not seen. After the UART runtime PM cleanups, we
no longer avoid WFI during boot, so GPIO IRQs that were not causing
wakeups resulted in very slow IRQ response times.
Tested on platforms using level-triggered GPIOs for network IRQs using
the SMSC911x NIC: 3530/Overo and 3630/Zoom3.
Reported-by: Tony Lindgren <tony@atomide.com>
Tested-by: Tarun Kanti DebBarma <tarun.kanti@ti.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Grant Likely [Mon, 12 Mar 2012 15:41:28 +0000 (09:41 -0600)]
Merge tag 'v3.3-rc7' into gpio/next
Linux 3.3-rc7. Merged into the gpio branch to pick up gpio bugfixes already
in mainline before queueing up move v3.4 patches
Linus Torvalds [Sat, 10 Mar 2012 21:49:52 +0000 (13:49 -0800)]
Linux 3.3-rc7
Al Viro [Thu, 8 Mar 2012 17:51:19 +0000 (17:51 +0000)]
aio: fix the "too late munmap()" race
Current code has put_ioctx() called asynchronously from aio_fput_routine();
that's done *after* we have killed the request that used to pin ioctx,
so there's nothing to stop io_destroy() waiting in wait_for_all_aios()
from progressing. As the result, we can end up with async call of
put_ioctx() being the last one and possibly happening during exit_mmap()
or elf_core_dump(), neither of which expects stray munmap() being done
to them...
We do need to prevent _freeing_ ioctx until aio_fput_routine() is done
with that, but that's all we care about - neither io_destroy() nor
exit_aio() will progress past wait_for_all_aios() until aio_fput_routine()
does really_put_req(), so the ioctx teardown won't be done until then
and we don't care about the contents of ioctx past that point.
Since actual freeing of these suckers is RCU-delayed, we don't need to
bump ioctx refcount when request goes into list for async removal.
All we need is rcu_read_lock held just over the ->ctx_lock-protected
area in aio_fput_routine().
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Acked-by: Benjamin LaHaise <bcrl@kvack.org>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Al Viro [Wed, 7 Mar 2012 05:16:35 +0000 (05:16 +0000)]
aio: fix io_setup/io_destroy race
Have ioctx_alloc() return an extra reference, so that caller would drop it
on success and not bother with re-grabbing it on failure exit. The current
code is obviously broken - io_destroy() from another thread that managed
to guess the address io_setup() would've returned would free ioctx right
under us; gets especially interesting if aio_context_t * we pass to
io_setup() points to PROT_READ mapping, so put_user() fails and we end
up doing io_destroy() on kioctx another thread has just got freed...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Benjamin LaHaise <bcrl@kvack.org>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sat, 10 Mar 2012 02:09:18 +0000 (18:09 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs
Pull btrfs updates from Chris Mason:
"I have two additional and btrfs fixes in my for-linus branch. One is
a casting error that leads to memory corruption on i386 during scrub,
and the other fixes a corner case in the backref walking code (also
triggered by scrub)."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
Btrfs: fix casting error in scrub reada code
btrfs: fix locking issues in find_parent_nodes()
Hugh Dickins [Fri, 9 Mar 2012 21:37:32 +0000 (13:37 -0800)]
memcg: revert fix to mapcount check for this release
Respectfully revert commit
e6ca7b89dc76 "memcg: fix mapcount check
in move charge code for anonymous page" for the 3.3 release, so that
it behaves exactly like releases 2.6.35 through 3.2 in this respect.
Horiguchi-san's commit is correct in itself, 1 makes much more sense
than 2 in that check; but it does not go far enough - swapcount
should be considered too - if we really want such a check at all.
We appear to have reached agreement now, and expect that 3.4 will
remove the mapcount check, but had better not make 3.3 different.
Signed-off-by: Hugh Dickins <hughd@google.com>
Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Thomas Gleixner [Fri, 9 Mar 2012 19:55:10 +0000 (20:55 +0100)]
x86: Derandom delay_tsc for 64 bit
Commit
f0fbf0abc093 ("x86: integrate delay functions") converted
delay_tsc() into a random delay generator for 64 bit. The reason is
that it merged the mostly identical versions of delay_32.c and
delay_64.c. Though the subtle difference of the result was:
static void delay_tsc(unsigned long loops)
{
- unsigned bclock, now;
+ unsigned long bclock, now;
Now the function uses rdtscl() which returns the lower 32bit of the
TSC. On 32bit that's not problematic as unsigned long is 32bit. On 64
bit this fails when the lower 32bit are close to wrap around when
bclock is read, because the following check
if ((now - bclock) >= loops)
break;
evaluated to true on 64bit for e.g. bclock = 0xffffffff and now = 0
because the unsigned long (now - bclock) of these values results in
0xffffffff00000001 which is definitely larger than the loops
value. That explains Tvortkos observation:
"Because I am seeing udelay(500) (_occasionally_) being short, and
that by delaying for some duration between 0us (yep) and 491us."
Make those variables explicitely u32 again, so this works for both 32
and 64 bit.
Reported-by: Tvrtko Ursulin <tvrtko.ursulin@onelan.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org # >= 2.6.27
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Fri, 9 Mar 2012 20:14:23 +0000 (12:14 -0800)]
Merge tag 'sound-fixes' of git://git./linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"Nothing exciting here: just a few regression fixes for HD-audio and
ASoC, also the support of missing 32bit compat ioctl for HDSPM."
* tag 'sound-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hdspm - Provide ioctl_compat
ALSA: hda/realtek - Apply the coef-setup only to ALC269VB
ALSA: hda - add quirk to detect CD input on Gigabyte EP45-DS3
ASoC: neo1973: fix neo1973 wm8753 initialization
David Brown [Fri, 9 Mar 2012 19:39:32 +0000 (11:39 -0800)]
MAINTAINERS: new git entry for arm/mach-msm
The msm git tree moved to
git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm.git
Signed-off-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Fri, 9 Mar 2012 15:27:38 +0000 (07:27 -0800)]
Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming
Pull C6X fix from Mark Salter:
"Fix for C6X KSTK_EIP and KSTK_ESP macros."
* tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming:
C6X: fix KSTK_EIP and KSTK_ESP macros
Linus Torvalds [Fri, 9 Mar 2012 15:26:25 +0000 (07:26 -0800)]
Merge tag 'iommu-fixes-v3.3-rc6' of git://git./linux/kernel/git/joro/iommu
Pull two IOMMU fixes from Joerg Roedel:
"The first is an additional fix for the OMAP initialization order issue
and the second patch fixes a possible section mismatch which can lead
to a kernel crash in the AMD IOMMU driver when suspend/resume is used
and the compiler has not inlined the iommu_set_device_table function."
* tag 'iommu-fixes-v3.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
x86/amd: iommu_set_device_table() must not be __init
ARM: OMAP: fix iommu, not mailbox
Linus Torvalds [Fri, 9 Mar 2012 15:23:17 +0000 (07:23 -0800)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull radeon drm stuff from Dave Airlie:
"Just some radeon fixes, one is for an oops where we run out of ioremap
space on some big hardware systems in 32-bit mode, stuff doesn't work
properly but at least the machine will boot.
One regression fix, and two bugs, one hw, one blit code."
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
drm/radeon/kms: fix hdmi duallink checks
drm/radeon/kms: set SX_MISC in the r6xx blit code (v2)
drm/radeon: deal with errors from framebuffer init path.
drm/radeon: fix a semaphore deadlock on pre cayman asics
Linus Torvalds [Fri, 9 Mar 2012 15:14:44 +0000 (07:14 -0800)]
Merge git://git./linux/kernel/git/davem/net
Pull networking from David Miller:
1) IPV4 routing metrics can become stale when routes are changed by the
administrator, fix from Steffen Klassert.
2) atl1c does "val |= XXX;" where XXX is a bit number not a bit mask,
fix by using set_bit. From Dan Carpenter.
3) Memory accounting bug in carl9170 driver results in wedged TX queue.
Fix from Nicolas Cavallari.
4) iwlwifi accidently uses "sizeof(ptr)" instead of "sizeof(*ptr)", fix
from Johannes Berg.
5) Openvswitch doesn't honor dp_ifindex when doing vport lookups, fix
from Ben Pfaff.
6) ehea conversion to 64-bit stats lost multicast and rx_errors
accounting, fix from Eric Dumazet.
7) Bridge state transition logging in br_stp_disable_port() is busted,
it's emitted at the wrong time and the message is in the wrong tense,
fix from Paulius Zaleckas.
8) mlx4 device erroneously invokes the queue resize firmware operation
twice, fix from Jack Morgenstein.
9) Fix deadlock in usbnet, need to drop lock when invoking usb_unlink_urb()
otherwise we recurse into taking it again. Fix from Sebastian Siewior.
10) hyperv network driver uses the wrong driver name string, fix from
Haiyang Zhang.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
net/hyperv: Use the built-in macro KBUILD_MODNAME for this driver
net/usbnet: avoid recursive locking in usbnet_stop()
route: Remove redirect_genid
inetpeer: Invalidate the inetpeer tree along with the routing cache
mlx4_core: fix bug in modify_cq wrapper for resize flow.
atl1c: set ATL1C_WORK_EVENT_RESET bit correctly
bridge: fix state reporting when port is disabled
bridge: br_log_state() s/entering/entered/
ehea: restore multicast and rx_errors fields
openvswitch: Fix checksum update for actions on UDP packets.
openvswitch: Honor dp_ifindex, when specified, for vport lookup by name.
iwlwifi: fix wowlan suspend
mwifiex: reset encryption mode flag before association
carl9170: fix frame delivery if sta is in powersave mode
carl9170: Fix memory accounting when sta is in power-save mode.
Linus Torvalds [Fri, 9 Mar 2012 01:32:42 +0000 (17:32 -0800)]
Merge tag 'fixes-urgent' of git://git./linux/kernel/git/arm/arm-soc
Pull last minute fixes from Olof Johansson:
"One samsung build fix due to a mis-applied patch, and a small set of
OMAP fixes. This should be the last from arm-soc for 3.3, hopefully."
* tag 'fixes-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
ARM: S3C2440: Fixed build error for s3c244x
ARM: OMAP2+: Fix module build errors with CONFIG_OMAP4_ERRATA_I688
ARM: OMAP: id: Add missing break statement in omap3xxx_check_revision
ARM: OMAP2+: Remove apply_uV constraints for fixed regulator
ARM: OMAP: irqs: Fix NR_IRQS value to handle PRCM interrupts
Linus Torvalds [Fri, 9 Mar 2012 01:25:17 +0000 (17:25 -0800)]
Merge tag 'for-linus' of git://git./linux/kernel/git/broonie/regulator
Pull regulator fix from Mark Brown:
"Another small, clear fix in a specific driver."
* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
regulator: tps65910: Configure correct value for VDDCTRL vout reg
Linus Torvalds [Fri, 9 Mar 2012 01:24:27 +0000 (17:24 -0800)]
Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux-2.6
Pull minor devicetree bug fixes and documentation updates from Grant Likely:
"Fixes up a duplicate #include, adds an empty implementation of
of_find_compatible_node() and make git ignore .dtb files. And fix up
bus name on OF described PHYs. Nothing exciting here."
* tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux-2.6:
doc: dt: Fix broken reference in gpio-leds documentation
of/mdio: fix fixed link bus name
of/fdt.c: asm/setup.h included twice
of: add picochip vendor prefix
dt: add empty of_find_compatible_node function
ARM: devicetree: Add .dtb files to arch/arm/boot/.gitignore
Linus Torvalds [Fri, 9 Mar 2012 01:23:45 +0000 (17:23 -0800)]
Merge tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6
Pull SPI section mismatch bug fix for v3.3-rc3 from Grant Likely:
"Minor fix for pl022_dma_probe() function which was put in the wrong
section."
* tag 'spi-for-linus' of git://git.secretlab.ca/git/linux-2.6:
Fix section mismatch in spi-pl022.c
Linus Torvalds [Fri, 9 Mar 2012 01:22:54 +0000 (17:22 -0800)]
Merge tag 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging
Pull four hwmon patches from Guenter Roeck
* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (jc42) Add support for AT30TS00, TS3000GB2, TSE2002GB2, and MCP9804
hwmon: (zl6100) Maintain delay parameter in driver instance data
hwmon: (pmbus_core) Fix maximum number of POUT alarm attributes
hwmon: (jc42) Add support for ST Microelectronics STTS2002 and STTS3000
Linus Torvalds [Fri, 9 Mar 2012 01:21:51 +0000 (17:21 -0800)]
Merge tag 'dm-3.3-fixes' of git://git./linux/kernel/git/agk/linux-dm
Pull device-mapper fixes for 3.3 from Alasdair Kergon
Eight small device-mapper bug fixes.
* tag 'dm-3.3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm:
dm raid: fix flush support
dm raid: set MD_CHANGE_DEVS when rebuilding
dm thin metadata: decrement counter after removing mapped block
dm thin metadata: unlock superblock in init_pmd error path
dm thin metadata: remove incorrect close_device on creation error paths
dm flakey: fix crash on read when corrupt_bio_byte not set
dm io: fix discard support
dm ioctl: do not leak argv if target message only contains whitespace
Haiyang Zhang [Wed, 7 Mar 2012 10:02:00 +0000 (10:02 +0000)]
net/hyperv: Use the built-in macro KBUILD_MODNAME for this driver
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: Olaf Hering <olaf@aepfle.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Olof Johansson [Thu, 8 Mar 2012 18:56:12 +0000 (10:56 -0800)]
Merge branch 'fixes' of git://git./linux/kernel/git/tmlind/linux-omap into fixes
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: OMAP2+: Fix module build errors with CONFIG_OMAP4_ERRATA_I688
ARM: OMAP: id: Add missing break statement in omap3xxx_check_revision
ARM: OMAP2+: Remove apply_uV constraints for fixed regulator
ARM: OMAP: irqs: Fix NR_IRQS value to handle PRCM interrupts
Kukjin Kim [Thu, 8 Mar 2012 09:48:36 +0000 (01:48 -0800)]
ARM: S3C2440: Fixed build error for s3c244x
Fixed following:
arch/arm/mach-s3c2440/s3c244x.c: In function 's3c244x_restart':
arch/arm/mach-s3c2440/s3c244x.c:209: error: expected declaration or statement at end of input
make[1]: *** [arch/arm/mach-s3c24xx/s3c244x.o] Error 1
make: *** [arch/arm/mach-s3c24xx] Error 2
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Adrian Knoth [Thu, 8 Mar 2012 14:38:04 +0000 (15:38 +0100)]
ALSA: hdspm - Provide ioctl_compat
snd_hdspm uses its own ioctls to acquire config- and status information.
Expose the corresponding ioctl handler via ioctl_compat, so that 32bit
applications can use it on 64bit kernels.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jan Beulich [Thu, 8 Mar 2012 08:58:13 +0000 (08:58 +0000)]
x86/amd: iommu_set_device_table() must not be __init
This function is called from enable_iommus(), which in turn is used
from amd_iommu_resume().
Cc: stable@vger.kernel.org
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Alex Deucher [Thu, 8 Mar 2012 00:05:01 +0000 (19:05 -0500)]
drm/radeon/kms: fix hdmi duallink checks
All pre-SI chips are limited to 165 Mhz for single link.
Code in question will be re-enabled when SI support is added.
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=44755
https://bugzilla.kernel.org/show_bug.cgi?id=42887
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Marek Olšák [Wed, 7 Mar 2012 22:33:00 +0000 (23:33 +0100)]
drm/radeon/kms: set SX_MISC in the r6xx blit code (v2)
Mesa may set it to 1, causing all primitives to be killed.
v2: also update the r7xx code
Signed-off-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Sebastian Siewior [Wed, 7 Mar 2012 10:19:28 +0000 (10:19 +0000)]
net/usbnet: avoid recursive locking in usbnet_stop()
|kernel BUG at kernel/rtmutex.c:724!
|[<
c029599c>] (rt_spin_lock_slowlock+0x108/0x2bc) from [<
c01c2330>] (defer_bh+0x1c/0xb4)
|[<
c01c2330>] (defer_bh+0x1c/0xb4) from [<
c01c3afc>] (rx_complete+0x14c/0x194)
|[<
c01c3afc>] (rx_complete+0x14c/0x194) from [<
c01cac88>] (usb_hcd_giveback_urb+0xa0/0xf0)
|[<
c01cac88>] (usb_hcd_giveback_urb+0xa0/0xf0) from [<
c01e1ff4>] (musb_giveback+0x34/0x40)
|[<
c01e1ff4>] (musb_giveback+0x34/0x40) from [<
c01e2b1c>] (musb_advance_schedule+0xb4/0x1c0)
|[<
c01e2b1c>] (musb_advance_schedule+0xb4/0x1c0) from [<
c01e2ca8>] (musb_cleanup_urb.isra.9+0x80/0x8c)
|[<
c01e2ca8>] (musb_cleanup_urb.isra.9+0x80/0x8c) from [<
c01e2ed0>] (musb_urb_dequeue+0xec/0x108)
|[<
c01e2ed0>] (musb_urb_dequeue+0xec/0x108) from [<
c01cbb90>] (unlink1+0xbc/0xcc)
|[<
c01cbb90>] (unlink1+0xbc/0xcc) from [<
c01cc2ec>] (usb_hcd_unlink_urb+0x54/0xa8)
|[<
c01cc2ec>] (usb_hcd_unlink_urb+0x54/0xa8) from [<
c01c2a84>] (unlink_urbs.isra.17+0x2c/0x58)
|[<
c01c2a84>] (unlink_urbs.isra.17+0x2c/0x58) from [<
c01c2b44>] (usbnet_terminate_urbs+0x94/0x10c)
|[<
c01c2b44>] (usbnet_terminate_urbs+0x94/0x10c) from [<
c01c2d68>] (usbnet_stop+0x100/0x15c)
|[<
c01c2d68>] (usbnet_stop+0x100/0x15c) from [<
c020f718>] (__dev_close_many+0x94/0xc8)
defer_bh() takes the lock which is hold during unlink_urbs(). The safe
walk suggest that the skb will be removed from the list and this is done
by defer_bh() so it seems to be okay to drop the lock here.
Cc: stable@kernel.org
Reported-by: AnÃbal Almeida Pinto <anibal.pinto@efacec.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Steffen Klassert [Tue, 6 Mar 2012 21:21:10 +0000 (21:21 +0000)]
route: Remove redirect_genid
As we invalidate the inetpeer tree along with the routing cache now,
we don't need a genid to reset the redirect handling when the routing
cache is flushed.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Steffen Klassert [Tue, 6 Mar 2012 21:20:26 +0000 (21:20 +0000)]
inetpeer: Invalidate the inetpeer tree along with the routing cache
We initialize the routing metrics with the values cached on the
inetpeer in rt_init_metrics(). So if we have the metrics cached on the
inetpeer, we ignore the user configured fib_metrics.
To fix this issue, we replace the old tree with a fresh initialized
inet_peer_base. The old tree is removed later with a delayed work queue.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jack Morgenstein [Wed, 7 Mar 2012 05:56:35 +0000 (05:56 +0000)]
mlx4_core: fix bug in modify_cq wrapper for resize flow.
The actual FW command is called in procedure "handle_resize".
Code incorrectly invoked the FW command again (in good flow), in
the modify_cq wrapper function.
Fix by skipping second FW invocation unconditionally for resize.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dan Carpenter [Wed, 7 Mar 2012 00:02:04 +0000 (00:02 +0000)]
atl1c: set ATL1C_WORK_EVENT_RESET bit correctly
ATL1C_WORK_EVENT_RESET is zero so the original code here is a nop. The
intent was to set the zero bit.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Paulius Zaleckas [Tue, 6 Mar 2012 22:25:22 +0000 (22:25 +0000)]
bridge: fix state reporting when port is disabled
Now we have:
eth0: link *down*
br0: port 1(eth0) entered *forwarding* state
br_log_state(p) should be called *after* p->state is set
to BR_STATE_DISABLED.
Reported-by: Zilvinas Valinskas <zilvinas@wilibox.com>
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Paulius Zaleckas [Tue, 6 Mar 2012 22:25:14 +0000 (22:25 +0000)]
bridge: br_log_state() s/entering/entered/
When br_log_state() is reporting state it should say "entered"
istead of "entering" since state at this point is already
changed.
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Tue, 6 Mar 2012 19:46:41 +0000 (19:46 +0000)]
ehea: restore multicast and rx_errors fields
Commit
239c562c94d (ehea: Add 64bit statistics) added a regression,
since we no longer report multicast & rx_errors fields, taken from
port->stats structure. These fields are updated in ehea_update_stats()
every second.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Tested-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 8 Mar 2012 06:49:01 +0000 (22:49 -0800)]
Merge branch 'fixes' of git://git./linux/kernel/git/jesse/openvswitch
Jesse Gross [Tue, 6 Mar 2012 23:05:46 +0000 (15:05 -0800)]
openvswitch: Fix checksum update for actions on UDP packets.
When modifying IP addresses or ports on a UDP packet we don't
correctly follow the rules for unchecksummed packets. This meant
that packets without a checksum can be given a incorrect new checksum
and packets with a checksum can become marked as being unchecksummed.
This fixes it to handle those requirements.
Signed-off-by: Jesse Gross <jesse@nicira.com>
David S. Miller [Wed, 7 Mar 2012 20:34:42 +0000 (15:34 -0500)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless
Laxman Dewangan [Wed, 7 Mar 2012 11:09:05 +0000 (16:39 +0530)]
regulator: tps65910: Configure correct value for VDDCTRL vout reg
As per datasheet, the voltage output is defined as
from SEL[6:0] = 3 to 64 (dec)
Vout= (SEL[6:0] × 12.5 mV + 562.5 mV)
The list_voltage returns the vout as
600mV + selector * 12.5mV
and so equivalent VSEL is selector + 3.
Adding 3 on selector when configuring VSEL register for
VDDCTRL output.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jonathan E Brassow [Wed, 7 Mar 2012 19:09:48 +0000 (19:09 +0000)]
dm raid: fix flush support
Fix dm-raid flush support.
Both md and dm have support for flush, but the dm-raid target
forgot to set the flag to indicate that flushes should be
passed on. (Important for data integrity e.g. with writeback cache
enabled.)
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Jonathan E Brassow [Wed, 7 Mar 2012 19:09:47 +0000 (19:09 +0000)]
dm raid: set MD_CHANGE_DEVS when rebuilding
The 'rebuild' parameter is used to rebuild individual devices in an
array (e.g. resynchronize a RAID1 device or recalculate a parity device
in higher RAID). The MD_CHANGE_DEVS flag must be set when this
parameter is given in order to write out the superblocks and make the
change take immediate effect. The code that handles new devices in
super_load already sets MD_CHANGE_DEVS and 'FirstUse'. (The 'FirstUse'
flag was being set as a special case for rebuilds in
super_init_validation.)
Add a condition for rebuilds in super_load to take care of both flags
without the special case in 'super_init_validation'.
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Joe Thornber [Wed, 7 Mar 2012 19:09:44 +0000 (19:09 +0000)]
dm thin metadata: decrement counter after removing mapped block
Correct the number of mapped sectors shown on a thin device's
status line by decrementing td->mapped_blocks in __remove() each time
a block is removed.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Joe Thornber [Wed, 7 Mar 2012 19:09:43 +0000 (19:09 +0000)]
dm thin metadata: unlock superblock in init_pmd error path
If dm_sm_disk_create() fails the superblock must be unlocked.
Signed-off-by: Joe Thornber <ejt@redhat.com>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Mike Snitzer [Wed, 7 Mar 2012 19:09:41 +0000 (19:09 +0000)]
dm thin metadata: remove incorrect close_device on creation error paths
The __open_device() error paths in __create_thin() and __create_snap()
incorrectly call __close_device() even if td was not initialized by
__open_device(). Remove this.
Also document __open_device() return values, remove a redundant
td->changed = 1 in __create_thin(), and insert an additional
safeguard against creating an already-existing device.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Mike Snitzer [Wed, 7 Mar 2012 19:09:39 +0000 (19:09 +0000)]
dm flakey: fix crash on read when corrupt_bio_byte not set
The following BUG is hit on the first read that is submitted to a dm
flakey test device while the device is "down" if the corrupt_bio_byte
feature wasn't requested when the device's table was loaded.
Example DM table that will hit this BUG:
0
2097152 flakey 8:0 2048 0 30
This bug was introduced by commit
a3998799fb4df0b0af8271a7d50c4269032397aa
(dm flakey: add corrupt_bio_byte feature) in v3.1-rc1.
BUG: unable to handle kernel paging request at
ffff8801cfce3fff
IP: [<
ffffffffa008c233>] corrupt_bio_data+0x6e/0xae [dm_flakey]
PGD
1606063 PUD 0
Oops: 0002 [#1] SMP
...
Call Trace:
<IRQ>
[<
ffffffffa008c2b5>] flakey_end_io+0x42/0x48 [dm_flakey]
[<
ffffffffa00dca98>] clone_endio+0x54/0xb6 [dm_mod]
[<
ffffffff81130587>] bio_endio+0x2d/0x2f
[<
ffffffff811c819a>] req_bio_endio+0x96/0x9f
[<
ffffffff811c94b9>] blk_update_request+0x1dc/0x3a9
[<
ffffffff812f5ee2>] ? rcu_read_unlock+0x21/0x23
[<
ffffffff811c96a6>] blk_update_bidi_request+0x20/0x6e
[<
ffffffff811c9713>] blk_end_bidi_request+0x1f/0x5d
[<
ffffffff811c978d>] blk_end_request+0x10/0x12
[<
ffffffff8128f450>] scsi_io_completion+0x1e5/0x4b1
[<
ffffffff812882a9>] scsi_finish_command+0xec/0xf5
[<
ffffffff8128f830>] scsi_softirq_done+0xff/0x108
[<
ffffffff811ce284>] blk_done_softirq+0x84/0x98
[<
ffffffff81048d19>] __do_softirq+0xe3/0x1d5
[<
ffffffff8138f83f>] ? _raw_spin_lock+0x62/0x69
[<
ffffffff810997cf>] ? handle_irq_event+0x4c/0x61
[<
ffffffff8139833c>] call_softirq+0x1c/0x30
[<
ffffffff81003b37>] do_softirq+0x4b/0xa3
[<
ffffffff81048a39>] irq_exit+0x53/0xca
[<
ffffffff81398acd>] do_IRQ+0x9d/0xb4
[<
ffffffff81390333>] common_interrupt+0x73/0x73
...
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org # 3.1+
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Milan Broz [Wed, 7 Mar 2012 19:09:37 +0000 (19:09 +0000)]
dm io: fix discard support
This patch fixes a crash by recognising discards in dm_io.
Currently dm_mirror can send REQ_DISCARD bios if running over a
discard-enabled device and without support in dm_io the system
crashes badly.
BUG: unable to handle kernel paging request at
00800000
IP: __bio_add_page.part.17+0xf5/0x1e0
...
bio_add_page+0x56/0x70
dispatch_io+0x1cf/0x240 [dm_mod]
? km_get_page+0x50/0x50 [dm_mod]
? vm_next_page+0x20/0x20 [dm_mod]
? mirror_flush+0x130/0x130 [dm_mirror]
dm_io+0xdc/0x2b0 [dm_mod]
...
Introduced in 2.6.38-rc1 by commit
5fc2ffeabb9ee0fc0e71ff16b49f34f0ed3d05b4
(dm raid1: support discard).
Signed-off-by: Milan Broz <mbroz@redhat.com>
Cc: stable@kernel.org
Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Jesper Juhl [Wed, 7 Mar 2012 19:09:34 +0000 (19:09 +0000)]
dm ioctl: do not leak argv if target message only contains whitespace
If 'argc' is zero we jump to the 'out:' label, but this leaks the
(unused) memory that 'dm_split_args()' allocated for 'argv' if the
string being split consisted entirely of whitespace. Jump to the
'out_argv:' label instead to free up that memory.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Cc: stable@kernel.org
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Guenter Roeck [Mon, 5 Mar 2012 19:13:52 +0000 (11:13 -0800)]
hwmon: (jc42) Add support for AT30TS00, TS3000GB2, TSE2002GB2, and MCP9804
Also update IDT datasheet locations.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Cc: stable@vger.kernel.org # 3.0+
Acked-by: Jean Delvare <khali@linux-fr.org>
Guenter Roeck [Wed, 7 Mar 2012 11:58:55 +0000 (03:58 -0800)]
hwmon: (zl6100) Maintain delay parameter in driver instance data
A global delay parameter has the side effect of being overwritten with 0 if a
single ZL2004 or ZL6105 is instantiated. If other chips supported by the same
driver are in the system, this will result in access errors for those chips.
To solve the problem, keep a per-instance copy of the delay parameter, and do
not change the original parameter.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Cc: stable@vger.kernel.org # 3.1+
Acked-by: Jean Delvare <khali@linux-fr.org>
Guenter Roeck [Sun, 4 Mar 2012 16:10:57 +0000 (08:10 -0800)]
hwmon: (pmbus_core) Fix maximum number of POUT alarm attributes
There are up to three POUT alarm attributes, not two, since cap_alarm was added.
Reported-by: Michele Petracca <mi.petracca@gmail.com>
Cc: stable@vger.kernel.org # 3.0+ [3.0 will need backport]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Jean Delvare [Mon, 5 Mar 2012 13:32:00 +0000 (08:32 -0500)]
hwmon: (jc42) Add support for ST Microelectronics STTS2002 and STTS3000
These are fully compatible with Jedec JC 42.4 as far as I can see.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: stable@vger.kernel.org # 3.0+
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Linus Torvalds [Wed, 7 Mar 2012 16:33:03 +0000 (08:33 -0800)]
Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm
Pull ARM updates from Russell King.
* 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
ARM: 7358/1: perf: add PMU hotplug notifier
ARM: 7357/1: perf: fix overflow handling for xscale2 PMUs
ARM: 7356/1: perf: check that we have an event in the PMU IRQ handlers
ARM: 7355/1: perf: clear overflow flag when disabling counter on ARMv7 PMU
ARM: 7354/1: perf: limit sample_period to half max_period in non-sampling mode
ARM: ecard: ensure fake vma vm_flags is setup
ARM: 7346/1: errata: fix PL310 erratum #753970 workaround selection
ARM: 7345/1: errata: update workaround for A9 erratum #743622
ARM: 7348/1: arm/spear600: fix one-shot timer
ARM: 7339/1: amba/serial.h: Include types.h for resolving dependency of type bool
Linus Torvalds [Wed, 7 Mar 2012 16:31:31 +0000 (08:31 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input
Pull input updates from Dmitry Torokhov: "Just a few driver fixups,
nothing exciting."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: wacom - fix 3rd-gen Bamboo MT when 4+ fingers are in use
Input: twl4030-vibra - use proper guard for PM methods
Input: evdev - fix variable initialisation
Input: wacom - add missing LEDS_CLASS to Kconfig
Input: ALPS - fix touchpad detection when buttons are pressed
Mark Salter [Wed, 7 Mar 2012 16:19:31 +0000 (11:19 -0500)]
C6X: fix KSTK_EIP and KSTK_ESP macros
There was a latent typo in the C6X KSTK_EIP and KSTK_ESP macros which
caused a problem with a new patch which used them. The broken definitions
were of the form:
#define KSTK_FOO(tsk) (task_pt_regs(task)->foo)
Note the use of task vs tsk. This actually worked before because the
only place in the kernel which used these macros passed in a local
pointer named task.
Signed-off-by: Mark Salter <msalter@redhat.com>
Linus Torvalds [Wed, 7 Mar 2012 16:21:19 +0000 (08:21 -0800)]
Revert "CPU hotplug, cpusets, suspend: Don't touch cpusets during suspend/resume"
This reverts commit
8f2f748b0656257153bcf0941df8d6060acc5ca6.
It causes some odd regression that we have not figured out, and it's too
late in the -rc series to try to figure it out now.
As reported by Konstantin Khlebnikov, it causes consistent hangs on his
laptop (Thinkpad x220: 2x cores + HT). They can be avoided by adding
calls to "rebuild_sched_domains();" in cpuset_cpu_[in]active() for the
CPU_{ONLINE/DOWN_FAILED/DOWN_PREPARE}_FROZEN cases, but it's not at all
clear why, and it makes no sense.
Konstantin's config doesn't even have CONFIG_CPUSETS enabled, just to
make things even more interesting. So it's not the cpusets, it's just
the scheduling domains.
So until this is understood, revert.
Bisected-reported-and-tested-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dave Airlie [Tue, 6 Mar 2012 10:44:40 +0000 (10:44 +0000)]
drm/radeon: deal with errors from framebuffer init path.
We've been getting occasional oops running a 32-bit kernel on a certain
system in our RHEL test hw. It appears that we fail to get sufficent ioremap
space for the framebuffer, and this leads to an oops.
This patch should fix the oops and leave a message in the logs we can
check for.
A future fix would probably to resize the console to a size that we can
ioremap.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Christian König [Wed, 7 Mar 2012 10:28:57 +0000 (11:28 +0100)]
drm/radeon: fix a semaphore deadlock on pre cayman asics
The out of order execution of semaphore commands on
pre cayman asics doesn't work correctly and can
cause deadlocks, so turn it off for now.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Lorenzo Pieralisi [Tue, 6 Mar 2012 16:37:45 +0000 (17:37 +0100)]
ARM: 7358/1: perf: add PMU hotplug notifier
When a CPU is taken out of reset, either cold booted or hotplugged in,
some of its PMU registers can contain UNKNOWN values.
This patch adds a hotplug notifier to ARM core perf code so that upon
CPU restart the PMU unit is reset and becomes ready to use again.
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Will Deacon [Tue, 6 Mar 2012 16:35:55 +0000 (17:35 +0100)]
ARM: 7357/1: perf: fix overflow handling for xscale2 PMUs
xscale2 PMUs indicate overflow not via the PMU control register, but by
a separate overflow FLAG register instead.
This patch fixes the xscale2 PMU code to use this register to detect
to overflow and ensures that we clear any pending overflow when
disabling a counter.
Cc: <stable@vger.kernel.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Will Deacon [Tue, 6 Mar 2012 16:34:50 +0000 (17:34 +0100)]
ARM: 7356/1: perf: check that we have an event in the PMU IRQ handlers
The PMU IRQ handlers in perf assume that if a counter has overflowed
then perf must be responsible. In the paranoid world of crazy hardware,
this could be false, so check that we do have a valid event before
attempting to dereference NULL in the interrupt path.
Cc: <stable@vger.kernel.org>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Will Deacon [Tue, 6 Mar 2012 16:34:22 +0000 (17:34 +0100)]
ARM: 7355/1: perf: clear overflow flag when disabling counter on ARMv7 PMU
When disabling a counter on an ARMv7 PMU, we should also clear the
overflow flag in case an overflow occurred whilst stopping the counter.
This prevents a spurious overflow being picked up later and leading to
either false accounting or a NULL dereference.
Cc: <stable@vger.kernel.org>
Reported-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Will Deacon [Tue, 6 Mar 2012 16:33:17 +0000 (17:33 +0100)]
ARM: 7354/1: perf: limit sample_period to half max_period in non-sampling mode
On ARM, the PMU does not stop counting after an overflow and therefore
IRQ latency affects the new counter value read by the kernel. This is
significant for non-sampling runs where it is possible for the new value
to overtake the previous one, causing the delta to be out by up to
max_period events.
Commit
a737823d ("ARM: 6835/1: perf: ensure overflows aren't missed due
to IRQ latency") attempted to fix this problem by allowing interrupt
handlers to pass an overflow flag to the event update function, causing
the overflow calculation to assume that the counter passed through zero
when going from prev to new. Unfortunately, this doesn't work when
overflow occurs on the perf_task_tick path because we have the flag
cleared and end up computing a large negative delta.
This patch removes the overflow flag from armpmu_event_update and
instead limits the sample_period to half of the max_period for
non-sampling profiling runs.
Cc: <stable@vger.kernel.org>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Jason Gerecke [Tue, 6 Mar 2012 18:19:19 +0000 (10:19 -0800)]
Input: wacom - fix 3rd-gen Bamboo MT when 4+ fingers are in use
The message count field uses three bits of storage, not two.
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Kailang Yang [Wed, 7 Mar 2012 07:25:20 +0000 (08:25 +0100)]
ALSA: hda/realtek - Apply the coef-setup only to ALC269VB
The coef setup in alc269_fill_coef() was designed only for ALC269VB
model, and this has some bad effects for other ALC269 variants, such
as turning off the external mic input. Apply it only to ALC269VB.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Linus Torvalds [Wed, 7 Mar 2012 06:31:08 +0000 (22:31 -0800)]
Merge git://git./linux/kernel/git/davem/net
Pull networking fixes from David Miller:
1) TCP can chop up SACK'd SKBs below below the unacked send sequence and
that breaks lots of stuff. Fix from Neal Cardwell.
2) There is code in ipv6 to properly join and leave the all-routers
multicast code when the forwarding setting is changed, but once
forwarding is turned on, we don't do the join for newly registered
devices. Fix from Li Wei.
3) Netfilter's NAT module autoload in ctnetlink drops a spinlock around
a sleeping call, problem is this code path doesn't actually hold that
lock. Fix from Pablo Neira Ayuso.
4) TG3 uses the wrong interfaces to hook into the new byte queue limit
support. It uses the device level interfaces, which is fine for
single queue devices, but on more recent chips this driver supports
multiqueue so we have to use the multiqueue BQL APIs. Fix from Tom
Herbert.
5) r8169 resume fix from Francois Romieu.
6) Add some cxgb4 device IDs, from Vipul Pandya.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
IPv6: Fix not join all-router mcast group when forwarding set.
caif-hsi: Set default MTU to 4096
cxgb4vf: Add support for Chelsio's T480-CR and T440-LP-CR adapters
cxgb4: Add support for Chelsio's T480-CR and T440-LP-CR adapters
mlx4_core: remove buggy sched_queue masking
netfilter: nf_conntrack: fix early_drop with reliable event delivery
bridge: netfilter: don't call iptables on vlan packets if sysctl is off
netfilter: bridge: fix wrong pointer dereference
netfilter: ctnetlink: remove incorrect spin_[un]lock_bh on NAT module autoload
netfilter: ebtables: fix wrong name length while copying to user-space
r8169: runtime resume before shutdown.
tcp: fix tcp_shift_skb_data() to not shift SACKed data below snd_una
tg3: Fix to use multi queue BQL interfaces
Linus Torvalds [Wed, 7 Mar 2012 02:48:13 +0000 (18:48 -0800)]
x86: fix typo in recent find_vma_prev purge
It turns out that test-compiling this file on x86-64 doesn't really
help, because much of it is x86-32-specific. And so I hadn't noticed
the slightly over-eager removal of the 'r' from 'addr' variable despite
thinking I had tested it.
Signed-off-by: Linus "oopsie" Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 7 Mar 2012 02:23:36 +0000 (18:23 -0800)]
vm: avoid using find_vma_prev() unnecessarily
Several users of "find_vma_prev()" were not in fact interested in the
previous vma if there was no primary vma to be found either. And in
those cases, we're much better off just using the regular "find_vma()",
and then "prev" can be looked up by just checking vma->vm_prev.
The find_vma_prev() semantics are fairly subtle (see Mikulas' recent
commit
83cd904d271b: "mm: fix find_vma_prev"), and the whole "return
prev by reference" means that it generates worse code too.
Thus this "let's avoid using this inconvenient and clearly too subtle
interface when we don't really have to" patch.
Cc: Mikulas Patocka <mpatocka@redhat.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 7 Mar 2012 00:55:50 +0000 (16:55 -0800)]
Merge git://git.samba.org/sfrench/cifs-2.6
Pull CIFS fixes from Steve French
* git://git.samba.org/sfrench/cifs-2.6:
cifs: fix dentry refcount leak when opening a FIFO on lookup
CIFS: Fix mkdir/rmdir bug for the non-POSIX case
Mikulas Patocka [Mon, 5 Mar 2012 00:52:03 +0000 (19:52 -0500)]
mm: fix find_vma_prev
Commit
6bd4837de96e ("mm: simplify find_vma_prev()") broke memory
management on PA-RISC.
After application of the patch, programs that allocate big arrays on the
stack crash with segfault, for example, this will crash if compiled
without optimization:
int main()
{
char array[200000];
array[199999] = 0;
return 0;
}
The reason is that PA-RISC has up-growing stack and the stack is usually
the last memory area. In the above example, a page fault happens above
the stack.
Previously, if we passed too high address to find_vma_prev, it returned
NULL and stored the last VMA in *pprev. After "simplify find_vma_prev"
change, it stores NULL in *pprev. Consequently, the stack area is not
found and it is not expanded, as it used to be before the change.
This patch restores the old behavior and makes it return the last VMA in
*pprev if the requested address is higher than address of any other VMA.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Thomas Gleixner [Tue, 6 Mar 2012 22:18:54 +0000 (23:18 +0100)]
genirq: Clear action->thread_mask if IRQ_ONESHOT is not set
Xommit
ac5637611(genirq: Unmask oneshot irqs when thread was not woken)
fails to unmask when a !IRQ_ONESHOT threaded handler is handled by
handle_level_irq.
This happens because thread_mask is or'ed unconditionally in
irq_wake_thread(), but for !IRQ_ONESHOT interrupts never cleared. So
the check for !desc->thread_active fails and keeps the interrupt
disabled.
Keep the thread_mask zero for !IRQ_ONESHOT interrupts.
Document the thread_mask magic while at it.
Reported-and-tested-by: Sven Joachim <svenjoac@gmx.de>
Reported-and-tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ben Pfaff [Tue, 6 Mar 2012 23:04:04 +0000 (15:04 -0800)]
openvswitch: Honor dp_ifindex, when specified, for vport lookup by name.
When OVS_VPORT_ATTR_NAME is specified and dp_ifindex is nonzero, the
logical behavior would be for the vport name lookup scope to be limited
to the specified datapath, but in fact the dp_ifindex value was ignored.
This commit causes the search scope to be honored.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Li Wei [Mon, 5 Mar 2012 14:45:17 +0000 (14:45 +0000)]
IPv6: Fix not join all-router mcast group when forwarding set.
When forwarding was set and a new net device is register,
we need add this device to the all-router mcast group.
Signed-off-by: Li Wei <lw@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hugh Dickins [Tue, 6 Mar 2012 20:28:52 +0000 (12:28 -0800)]
mmap: EINVAL not ENOMEM when rejecting VM_GROWS
Currently error is -ENOMEM when rejecting VM_GROWSDOWN|VM_GROWSUP
from shared anonymous: hoist the file case's -EINVAL up for both.
Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Sjur Brændeland [Sun, 4 Mar 2012 08:38:58 +0000 (08:38 +0000)]
caif-hsi: Set default MTU to 4096
Default MTU for CAIF HSI was wrongly set to 15 * 4092 bytes.
The patch sets default MTU size to 4096.
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Vipul Pandya [Mon, 5 Mar 2012 22:56:37 +0000 (22:56 +0000)]
cxgb4vf: Add support for Chelsio's T480-CR and T440-LP-CR adapters
This patch adds PCI device ids for Chelsio's T480-CR and T440-LP-CR
adapters.
Signed-off-by: Vipul Pandya <vipul@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Vipul Pandya [Mon, 5 Mar 2012 22:56:36 +0000 (22:56 +0000)]
cxgb4: Add support for Chelsio's T480-CR and T440-LP-CR adapters
This patch adds PCI device ids for Chelsio's T480-CR and T440-LP-CR
adapters.
Signed-off-by: Vipul Pandya <vipul@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yevgeny Petrilin [Tue, 6 Mar 2012 03:05:14 +0000 (03:05 +0000)]
mlx4_core: remove buggy sched_queue masking
Fixes a bug introduced by commit
fe9a2603c, where the priority bits
in the schedule queue field were masked out.
Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pablo Neira Ayuso [Tue, 6 Mar 2012 01:22:55 +0000 (01:22 +0000)]
netfilter: nf_conntrack: fix early_drop with reliable event delivery
If reliable event delivery is enabled and ctnetlink fails to deliver
the destroy event in early_drop, the conntrack subsystem cannot
drop any the candidate flow that was planned to be evicted.
Reported-by: Kerin Millar <kerframil@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Florian Westphal [Tue, 6 Mar 2012 01:22:54 +0000 (01:22 +0000)]
bridge: netfilter: don't call iptables on vlan packets if sysctl is off
When net.bridge.bridge-nf-filter-vlan-tagged is 0 (default), vlan packets
arriving should not be sent to ip(6)tables by bridge netfilter.
However, it turns out that we currently always send VLAN packets to
netfilter, if ..
a), CONFIG_VLAN_8021Q is enabled ; or
b), CONFIG_VLAN_8021Q is not set but rx vlan offload is enabled
on the bridge port.
This is because bridge netfilter treats skb with
skb->protocol == ETH_P_IP{V6} as "non-vlan packet".
With rx vlan offload on or CONFIG_VLAN_8021Q=y, the vlan header has
already been removed here, and we cannot rely on skb->protocol alone.
Fix this by only using skb->protocol if the skb has no vlan tag,
or if a vlan tag is present and filter-vlan-tagged bridge netfilter
sysctl is enabled.
We cannot remove the skb->protocol == htons(ETH_P_8021Q) test
because the vlan tag is still around in the CONFIG_VLAN_8021Q=n &&
"ethtool -K $itf rxvlan off" case.
reproducer:
iptables -t raw -I PREROUTING -i br0
iptables -t raw -I PREROUTING -i br0.1
Then send packets to an ip address configured on br0.1 interface.
Even with net.bridge.bridge-nf-filter-vlan-tagged=0, the 1st rule
will match instead of the 2nd one.
With this patch applied, the 2nd rule will match instead.
In the non-local address case, netfilter won't be consulted after
this patch unless the sysctl is switched on.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pablo Neira Ayuso [Tue, 6 Mar 2012 01:22:53 +0000 (01:22 +0000)]
netfilter: bridge: fix wrong pointer dereference
In
adf7ff8, a invalid dereference was added in ebt_make_names.
CC [M] net/bridge/netfilter/ebtables.o
net/bridge/netfilter/ebtables.c: In function `ebt_make_names':
net/bridge/netfilter/ebtables.c:1371:20: warning: `t' may be used uninitialized in this function [-Wuninitialized]
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pablo Neira Ayuso [Tue, 6 Mar 2012 01:22:51 +0000 (01:22 +0000)]
netfilter: ctnetlink: remove incorrect spin_[un]lock_bh on NAT module autoload
Since
7d367e0, ctnetlink_new_conntrack is called without holding
the nf_conntrack_lock spinlock. Thus, ctnetlink_parse_nat_setup
does not require to release that spinlock anymore in the NAT module
autoload case.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Santosh Nayak [Tue, 6 Mar 2012 01:22:50 +0000 (01:22 +0000)]
netfilter: ebtables: fix wrong name length while copying to user-space
user-space ebtables expects 32 bytes-long names, but xt_match names
use 29 bytes. We have to copy less 29 bytes and then, make sure we
fill the remaining bytes with zeroes.
Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
françois romieu [Tue, 6 Mar 2012 01:14:12 +0000 (01:14 +0000)]
r8169: runtime resume before shutdown.
With runtime PM, if the ethernet cable is disconnected, the device is
transitioned to D3 state to conserve energy. If the system is shutdown
in this state, any register accesses in rtl_shutdown are dropped on
the floor. As the device was programmed by .runtime_suspend() to wake
on link changes, it is thus brought back up as soon as the link recovers.
Resuming every suspended device through the driver core would slow things
down and it is not clear how many devices really need it now.
Original report and D0 transition patch by Sameer Nanda. Patch has been
changed to comply with advices by Rafael J. Wysocki and the PM folks.
Reported-by: Sameer Nanda <snanda@chromium.org>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Hayes Wang <hayeswang@realtek.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Neal Cardwell [Mon, 5 Mar 2012 19:35:04 +0000 (19:35 +0000)]
tcp: fix tcp_shift_skb_data() to not shift SACKed data below snd_una
This commit fixes tcp_shift_skb_data() so that it does not shift
SACKed data below snd_una.
This fixes an issue whose symptoms exactly match reports showing
tp->sacked_out going negative since 3.3.0-rc4 (see "WARNING: at
net/ipv4/tcp_input.c:3418" thread on netdev).
Since 2008 (
832d11c5cd076abc0aa1eaf7be96c81d1a59ce41)
tcp_shift_skb_data() had been shifting SACKed ranges that were below
snd_una. It checked that the *end* of the skb it was about to shift
from was above snd_una, but did not check that the end of the actual
shifted range was above snd_una; this commit adds that check.
Shifting SACKed ranges below snd_una is problematic because for such
ranges tcp_sacktag_one() short-circuits: it does not declare anything
as SACKed and does not increase sacked_out.
Before the fixes in commits
cc9a672ee522d4805495b98680f4a3db5d0a0af9
and
daef52bab1fd26e24e8e9578f8fb33ba1d0cb412, shifting SACKed ranges
below snd_una happened to work because tcp_shifted_skb() was always
(incorrectly) passing in to tcp_sacktag_one() an skb whose end_seq
tcp_shift_skb_data() had already guaranteed was beyond snd_una. Hence
tcp_sacktag_one() never short-circuited and always increased
tp->sacked_out in this case.
After those two fixes, my testing has verified that shifting SACKed
ranges below snd_una could cause tp->sacked_out to go negative with
the following sequence of events:
(1) tcp_shift_skb_data() sees an skb whose end_seq is beyond snd_una,
then shifts a prefix of that skb that is below snd_una
(2) tcp_shifted_skb() increments the packet count of the
already-SACKed prev sk_buff
(3) tcp_sacktag_one() sees the end of the new SACKed range is below
snd_una, so it short-circuits and doesn't increase tp->sacked_out
(5) tcp_clean_rtx_queue() sees the SACKed skb has been ACKed,
decrements tp->sacked_out by this "inflated" pcount that was
missing a matching increase in tp->sacked_out, and hence
tp->sacked_out underflows to a u32 like 0xFFFFFFFF, which casted
to s32 is negative.
(6) this leads to the warnings seen in the recent "WARNING: at
net/ipv4/tcp_input.c:3418" thread on the netdev list; e.g.:
tcp_input.c:3418 WARN_ON((int)tp->sacked_out < 0);
More generally, I think this bug can be tickled in some cases where
two or more ACKs from the receiver are lost and then a DSACK arrives
that is immediately above an existing SACKed skb in the write queue.
This fix changes tcp_shift_skb_data() to abort this sequence at step
(1) in the scenario above by noticing that the bytes are below snd_una
and not shifting them.
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
John W. Linville [Tue, 6 Mar 2012 19:16:48 +0000 (14:16 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless into for-davem
Linus Torvalds [Tue, 6 Mar 2012 17:10:31 +0000 (09:10 -0800)]
Merge tag 'fixes-3.3-rc7' of git://git./linux/kernel/git/arm/arm-soc
Pull arm-soc bug fixes from Arnd Bergmann:
"Here are all the fixes I got after sending the last pull request.
These fix mostly regressions on exynos, at91, pxa and ep93xx.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>"
* tag 'fixes-3.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
ARM: ep93xx: convert vision_ep9307 to MULTI_IRQ_HANDLER
ARM: EXYNOS: fix touchscreen IRQ setup on Universal C210 board
ARM: pxa: fix invalid mfp pin issue
ARM: pxa: remove duplicated registeration on pxa-gpio
ARM: pxa: add dummy clock for pxa25x and pxa27x
ARM: S3C24XX: DMA resume regression fix
ARM: S3C24XX: Fix restart on S3C2442
ARM: SAMSUNG: Fix memory size for hsotg
ARM: at91/dma: DMA controller registering with DT support
ARM: at91/dma: remove platform data from DMA controller
Linus Torvalds [Tue, 6 Mar 2012 16:24:15 +0000 (08:24 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/s390/linux
Pull s390 regression fix from Martin Schwidefsky:
"It is a fix for a regression that has been introduced with git commit
25f269f17316 - "[S390] qdio: EQBS retry after CCQ 96" - and if possible
we would like to have working code for the fcp data router in 3.3."
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
[S390] qdio: fix handler function arguments for zfcp data router
Linus Torvalds [Tue, 6 Mar 2012 16:23:30 +0000 (08:23 -0800)]
Merge tag 'for-linus' of git://git./linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown:
"A simple fix that's obvious from inspection. There's no mainline
users of this driver yet (there's some i.MX platforms which will use
it)."
* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
regulator: Fix mask parameter in da9052_reg_update calls
Jan Beulich [Mon, 5 Mar 2012 16:49:24 +0000 (16:49 +0000)]
vsprintf: make %pV handling compatible with kasprintf()
kasprintf() (and potentially other functions that I didn't run across so
far) want to evaluate argument lists twice. Caring to do so for the
primary list is obviously their job, but they can't reasonably be
expected to check the format string for instances of %pV, which however
need special handling too: On architectures like x86-64 (as opposed to
e.g. ix86), using the same argument list twice doesn't produce the
expected results, as an internally managed cursor gets updated during
the first run.
Fix the problem by always acting on a copy of the original list when
handling %pV.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Hugh Dickins [Tue, 6 Mar 2012 04:52:55 +0000 (20:52 -0800)]
page_cgroup: fix horrid swap accounting regression
Why is memcg's swap accounting so broken? Insane counts, wrong
ownership, unfreeable structures, which later get freed and then
accessed after free.
Turns out to be a tiny a little 3.3-rc1 regression in
9fb4b7cc0724
"page_cgroup: add helper function to get swap_cgroup": the helper
function (actually named lookup_swap_cgroup()) returns an address using
void* arithmetic, but the structure in question is a short.
Signed-off-by: Hugh Dickins <hughd@google.com>
Reviewed-by: Bob Liu <lliubbo@gmail.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Johannes Weiner <jweiner@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Arnd Bergmann [Tue, 6 Mar 2012 16:12:13 +0000 (16:12 +0000)]
Merge branch 'fixes' of git://github.com/hzhuang1/linux into fixes
* 'fixes' of git://github.com/hzhuang1/linux: (3 commits)
ARM: pxa: fix invalid mfp pin issue
ARM: pxa: remove duplicated registeration on pxa-gpio
ARM: pxa: add dummy clock for pxa25x and pxa27x
Includes an update to v3.3-rc6