]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years ago[ARM] Orion: make window setup a little more safe
Lennert Buytenhek [Sat, 10 May 2008 21:20:50 +0000 (23:20 +0200)]
[ARM] Orion: make window setup a little more safe

Currently, Orion window setup uses hardcoded window indexes for each
of the boot/cs0/cs1/cs2/PCIe WA windows.  The static window allocation
used can clash if board support code will ever attempt to configure
both a dev2 and a PCIe WA window, as both of those use CPU mbus window
#7 at present.

This patch keeps track of the last used window, and opens subsequently
requested windows sequentially, starting from 4.  (Windows 0-3 are used
as MEM/IO windows for the PCI/PCIe buses.)

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Orion: fix various whitespace and coding style issues
Lennert Buytenhek [Sat, 10 May 2008 14:30:01 +0000 (16:30 +0200)]
[ARM] Orion: fix various whitespace and coding style issues

More cosmetic cleanup:
- Replace 8-space indents by proper tab indents.
- In structure initialisers, use a trailing comma for every member.
- Collapse "},\n{" in structure initialiers to "}, {".

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Acked-by: Russell King <linux@arm.linux.org.uk>
17 years ago[ARM] cache align memset and memzero
Nicolas Pitre [Sat, 12 Apr 2008 01:04:28 +0000 (21:04 -0400)]
[ARM] cache align memset and memzero

This is a natural extension following the previous patch.
Non Feroceon based targets are unchanged.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] cache align destination pointer when copying memory for some processors
Nicolas Pitre [Mon, 31 Mar 2008 16:38:31 +0000 (12:38 -0400)]
[ARM] cache align destination pointer when copying memory for some processors

The implementation for memory copy functions on ARM had a (disabled)
provision for aligning the source pointer before loading registers with
data.  Turns out that aligning the _destination_ pointer is much more
useful, as the read side is already sufficiently helped with the use of
preload.

So this changes the definition of the CALGN() macro to target the
destination pointer instead, and turns it on for Feroceon processors
where the gain is very noticeable.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] fix cache alignment code in memset.S
Nicolas Pitre [Wed, 11 Jun 2008 16:40:13 +0000 (12:40 -0400)]
[ARM] fix cache alignment code in memset.S

This code is currently disabled, which explains why no one was affected.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] latencytop support
Nicolas Pitre [Thu, 24 Apr 2008 05:31:46 +0000 (01:31 -0400)]
[ARM] latencytop support

Available for !SMP only at the moment.

From Russell:

|Basically, if a thread is running on a CPU, thread_saved_fp() is invalid.
|So, the question is: what guarantees do we have here that 'tsk' is not
|running on another CPU?

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Tested-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years ago[ARM] Orion: update defconfig to 2.6.26-rc4
Nicolas Pitre [Mon, 5 May 2008 19:21:28 +0000 (15:21 -0400)]
[ARM] Orion: update defconfig to 2.6.26-rc4

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
17 years agoFix performance regression on lmbench select benchmark
Linus Torvalds [Sun, 22 Jun 2008 19:23:15 +0000 (12:23 -0700)]
Fix performance regression on lmbench select benchmark

Christian Borntraeger reported that reinstating cond_resched() with
CONFIG_PREEMPT caused a performance regression on lmbench:

For example select file 500:
23 microseconds
32 microseconds

and that's really because we totally unnecessarily do the cond_resched()
in the innermost loop of select(), which is just silly.

This moves it out from the innermost loop (which only ever loops ove the
bits in a single "unsigned long" anyway), which makes the performance
regression go away.

Reported-and-tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[ARM] Export dma_sync_sg_for_device()
Russell King [Sun, 22 Jun 2008 14:41:30 +0000 (15:41 +0100)]
[ARM] Export dma_sync_sg_for_device()

Noticed by Martin Michlmayr, this missing export prevents IEEE1394
from building with:

ERROR: "dma_sync_sg_for_device" [drivers/ieee1394/ieee1394.ko] undefined!

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoMerge branch 'omap-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind...
Russell King [Sun, 22 Jun 2008 14:03:20 +0000 (15:03 +0100)]
Merge branch 'omap-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6

17 years ago[ARM] 5109/1: Mark rtc sa1100 driver as wakeup source before registering it
Uli Luckas [Wed, 18 Jun 2008 08:54:03 +0000 (09:54 +0100)]
[ARM] 5109/1: Mark rtc sa1100 driver as wakeup source before registering it

Mark rtc sa1100 driver as wakeup source before registering it.
rtc_device_register evaluates device_can_wakeup(rtc->dev.parent) and
supresses the creation of /sys/class/rtc/rtcX/wakealarm if
device_can_wakeup is not (yet) true.

Signed-off-by: Uli Luckas <u.luckas@road.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 5116/1: pxafb: cleanup and fix order of failure handling
Jaya Kumar [Sun, 22 Jun 2008 03:27:26 +0000 (04:27 +0100)]
[ARM] 5116/1: pxafb: cleanup and fix order of failure handling

This issue was found by Krzysztof Helt and Eric Miao.

pxafb had issues in the order with which it cleaned up if errors occurred
during a probe. This patch reorders the failure handling sequence and also
frees the cmap and clk.

Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 5115/1: pxafb: fix ifdef for command line option handling
Jaya Kumar [Sun, 22 Jun 2008 03:27:25 +0000 (04:27 +0100)]
[ARM] 5115/1: pxafb: fix ifdef for command line option handling

This bug was found and fixed by Lothar Wassmann.

Previously, the use of ifndef CONFIG_MODULES made it such that pxafb command
line option parsing was dependent on whether the kernel was built with module
support. The ifndef should be MODULE so that parsing is dependent only on
whether the driver is built-in or not.

Signed-off-by: Jaya Kumar <jayakumar.lkml@gmail.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years agoSlab: Fix memory leak in fallback_alloc()
Christoph Lameter [Sat, 21 Jun 2008 23:46:35 +0000 (16:46 -0700)]
Slab: Fix memory leak in fallback_alloc()

The zonelist patches caused the loop that checks for available
objects in permitted zones to not terminate immediately. One object
per zone per allocation may be allocated and then abandoned.

Break the loop when we have successfully allocated one object.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Linus Torvalds [Sat, 21 Jun 2008 23:43:56 +0000 (16:43 -0700)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  Ext4: Fix online resize block group descriptor corruption

17 years ago[WATCHDOG 57/57] wdt501/pci: Clean up, coding style and switch to unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:10:02 +0000 (14:10 +0100)]
[WATCHDOG 57/57] wdt501/pci: Clean up, coding style and switch to unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 56/57] wdt977: clean up, coding style and switch to unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:09:57 +0000 (14:09 +0100)]
[WATCHDOG 56/57] wdt977: clean up, coding style and switch to unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 55/57] wdt285: switch to unlocked_ioctl and tidy up oddments of coding...
Alan Cox [Mon, 19 May 2008 13:09:51 +0000 (14:09 +0100)]
[WATCHDOG 55/57] wdt285: switch to unlocked_ioctl and tidy up oddments of coding style

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 54/57] wdrtas: clean up, coding style, switch to unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:09:45 +0000 (14:09 +0100)]
[WATCHDOG 54/57] wdrtas: clean up, coding style, switch to unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 53/57] wafer5823wdt: Clean up, coding style, switch to unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:09:40 +0000 (14:09 +0100)]
[WATCHDOG 53/57] wafer5823wdt: Clean up, coding style, switch to unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 52/57] w83977f_wdt: clean up, coding style and switch to unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:09:34 +0000 (14:09 +0100)]
[WATCHDOG 52/57] w83977f_wdt: clean up, coding style and switch to unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 51/57] w83877f_wdt: clean up code, coding style, switch to unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:09:29 +0000 (14:09 +0100)]
[WATCHDOG 51/57] w83877f_wdt: clean up code, coding style, switch to unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 50/57] w83697hf_wdt: cleanup, coding style and switch to unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:09:23 +0000 (14:09 +0100)]
[WATCHDOG 50/57] w83697hf_wdt: cleanup, coding style and switch to unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years agoMerge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6
Linus Torvalds [Sat, 21 Jun 2008 19:31:02 +0000 (12:31 -0700)]
Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6

* 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6:
  hwmon: (lm75) sensor reading bugfix
  hwmon: (abituguru3) update driver detection
  hwmon: (w83791d) new maintainer
  hwmon: (abituguru3) Identify Abit AW8D board as such
  hwmon: Update the sysfs interface documentation
  hwmon: (adt7473) Initialize max_duty_at_overheat before use
  hwmon: (lm85) Fix function RANGE_TO_REG()

17 years agoAdd return value to reserve_bootmem_node()
Bernhard Walle [Sat, 21 Jun 2008 17:01:02 +0000 (19:01 +0200)]
Add return value to reserve_bootmem_node()

This patch changes the function reserve_bootmem_node() from void to int,
returning -ENOMEM if the allocation fails.

This fixes a build problem on x86 with CONFIG_KEXEC=y and
CONFIG_NEED_MULTIPLE_NODES=y

Signed-off-by: Bernhard Walle <bwalle@suse.de>
Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[WATCHDOG 49/57] w83627hf: coding style, clean up and switch to unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:09:18 +0000 (14:09 +0100)]
[WATCHDOG 49/57] w83627hf: coding style, clean up and switch to unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 48/57] txx9: Fix locking, switch to unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:09:12 +0000 (14:09 +0100)]
[WATCHDOG 48/57] txx9: Fix locking, switch to unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sat, 21 Jun 2008 15:44:08 +0000 (08:44 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  netns: Don't receive new packets in a dead network namespace.
  sctp: Make sure N * sizeof(union sctp_addr) does not overflow.
  pppoe: warning fix
  ipv6: Drop packets for loopback address from outside of the box.
  ipv6: Remove options header when setsockopt's optlen is 0
  mac80211: detect driver tx bugs

17 years ago[WATCHDOG 47/57] softdog: clean up, coding style and switch to unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:09:06 +0000 (14:09 +0100)]
[WATCHDOG 47/57] softdog: clean up, coding style and switch to unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 46/57] smsc37b787_wdt: coding style, switch to unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:09:00 +0000 (14:09 +0100)]
[WATCHDOG 46/57] smsc37b787_wdt: coding style, switch to unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 45/57] shwdt: coding style, cleanup, switch to unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:08:55 +0000 (14:08 +0100)]
[WATCHDOG 45/57] shwdt: coding style, cleanup, switch to unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 44/57] scx200_wdt: clean up and switch to unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:08:49 +0000 (14:08 +0100)]
[WATCHDOG 44/57] scx200_wdt: clean up and switch to unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 43/57] sc520_wdt: Clean up and switch to unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:08:44 +0000 (14:08 +0100)]
[WATCHDOG 43/57] sc520_wdt: Clean up and switch to unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 42/57] sc1200_wdt: clean up, fix locking and use unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:08:38 +0000 (14:08 +0100)]
[WATCHDOG 42/57] sc1200_wdt: clean up, fix locking and use unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 41/57] sb_wdog: Clean up and switch to unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:08:33 +0000 (14:08 +0100)]
[WATCHDOG 41/57] sb_wdog: Clean up and switch to unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 40/57] sbc_epx_c3_wdt: switch to unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:08:27 +0000 (14:08 +0100)]
[WATCHDOG 40/57] sbc_epx_c3_wdt: switch to unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 39/57] sbc8360: clean up
Alan Cox [Mon, 19 May 2008 13:08:22 +0000 (14:08 +0100)]
[WATCHDOG 39/57] sbc8360: clean up

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 38/57] stg7240_wdt: unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:08:16 +0000 (14:08 +0100)]
[WATCHDOG 38/57] stg7240_wdt: unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 37/57] sbc60xxwdt: clean up and switch to unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:08:11 +0000 (14:08 +0100)]
[WATCHDOG 37/57] sbc60xxwdt: clean up and switch to unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 36/57] sa1100_wdt: Switch to unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:08:05 +0000 (14:08 +0100)]
[WATCHDOG 36/57] sa1100_wdt: Switch to unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 35/57] s3c2410: watchdog cleanup and switch to unlocked_ioctl
Alan Cox [Mon, 19 May 2008 13:08:00 +0000 (14:08 +0100)]
[WATCHDOG 35/57] s3c2410: watchdog cleanup and switch to unlocked_ioctl

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 34/57] rm9k_wdt: clean up
Alan Cox [Mon, 19 May 2008 13:07:54 +0000 (14:07 +0100)]
[WATCHDOG 34/57] rm9k_wdt: clean up

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years ago[WATCHDOG 33/57] pnx4008_wdt: unlocked_ioctl setup
Alan Cox [Mon, 19 May 2008 13:07:48 +0000 (14:07 +0100)]
[WATCHDOG 33/57] pnx4008_wdt: unlocked_ioctl setup

Review and switch to unlocked_ioctl

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 years agox86, bitops: make constant-bit set/clear_bit ops faster, gcc workaround
Ingo Molnar [Fri, 20 Jun 2008 19:50:20 +0000 (21:50 +0200)]
x86, bitops: make constant-bit set/clear_bit ops faster, gcc workaround

Jeremy Fitzhardinge reported this compiler bug:

Suggestion from Linus: add "r" to the input constraint of the
set_bit()/clear_bit()'s constant 'nr' branch:

Blows up on "gcc version 3.4.4 20050314 (prerelease) (Debian 3.4.3-13)":

 CC      init/main.o
include2/asm/bitops.h: In function `start_kernel':
include2/asm/bitops.h:59: warning: asm operand 1 probably doesn't match constraints
include2/asm/bitops.h:59: warning: asm operand 1 probably doesn't match constraints
include2/asm/bitops.h:59: warning: asm operand 1 probably doesn't match constraints
include2/asm/bitops.h:59: error: impossible constraint in `asm'
include2/asm/bitops.h:59: error: impossible constraint in `asm'
include2/asm/bitops.h:59: error: impossible constraint in `asm'

Reported-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agonetns: Don't receive new packets in a dead network namespace.
Eric W. Biederman [Sat, 21 Jun 2008 05:16:51 +0000 (22:16 -0700)]
netns: Don't receive new packets in a dead network namespace.

Alexey Dobriyan <adobriyan@gmail.com> writes:
> Subject: ICMP sockets destruction vs ICMP packets oops

> After icmp_sk_exit() nuked ICMP sockets, we get an interrupt.
> icmp_reply() wants ICMP socket.
>
> Steps to reproduce:
>
>  launch shell in new netns
>  move real NIC to netns
>  setup routing
>  ping -i 0
>  exit from shell
>
> BUG: unable to handle kernel NULL pointer dereference at 0000000000000000
> IP: [<ffffffff803fce17>] icmp_sk+0x17/0x30
> PGD 17f3cd067 PUD 17f3ce067 PMD 0
> Oops: 0000 [1] PREEMPT SMP DEBUG_PAGEALLOC
> CPU 0
> Modules linked in: usblp usbcore
> Pid: 0, comm: swapper Not tainted 2.6.26-rc6-netns-ct #4
> RIP: 0010:[<ffffffff803fce17>]  [<ffffffff803fce17>] icmp_sk+0x17/0x30
> RSP: 0018:ffffffff8057fc30  EFLAGS: 00010286
> RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff81017c7db900
> RDX: 0000000000000034 RSI: ffff81017c7db900 RDI: ffff81017dc41800
> RBP: ffffffff8057fc40 R08: 0000000000000001 R09: 000000000000a815
> R10: 0000000000000000 R11: 0000000000000001 R12: ffffffff8057fd28
> R13: ffffffff8057fd00 R14: ffff81017c7db938 R15: ffff81017dc41800
> FS:  0000000000000000(0000) GS:ffffffff80525000(0000) knlGS:0000000000000000
> CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
> CR2: 0000000000000000 CR3: 000000017fcda000 CR4: 00000000000006e0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> Process swapper (pid: 0, threadinfo ffffffff8053a000, task ffffffff804fa4a0)
> Stack:  0000000000000000 ffff81017c7db900 ffffffff8057fcf0 ffffffff803fcfe4
>  ffffffff804faa38 0000000000000246 0000000000005a40 0000000000000246
>  000000000001ffff ffff81017dd68dc0 0000000000005a40 0000000055342436
> Call Trace:
>  <IRQ>  [<ffffffff803fcfe4>] icmp_reply+0x44/0x1e0
>  [<ffffffff803d3a0a>] ? ip_route_input+0x23a/0x1360
>  [<ffffffff803fd645>] icmp_echo+0x65/0x70
>  [<ffffffff803fd300>] icmp_rcv+0x180/0x1b0
>  [<ffffffff803d6d84>] ip_local_deliver+0xf4/0x1f0
>  [<ffffffff803d71bb>] ip_rcv+0x33b/0x650
>  [<ffffffff803bb16a>] netif_receive_skb+0x27a/0x340
>  [<ffffffff803be57d>] process_backlog+0x9d/0x100
>  [<ffffffff803bdd4d>] net_rx_action+0x18d/0x250
>  [<ffffffff80237be5>] __do_softirq+0x75/0x100
>  [<ffffffff8020c97c>] call_softirq+0x1c/0x30
>  [<ffffffff8020f085>] do_softirq+0x65/0xa0
>  [<ffffffff80237af7>] irq_exit+0x97/0xa0
>  [<ffffffff8020f198>] do_IRQ+0xa8/0x130
>  [<ffffffff80212ee0>] ? mwait_idle+0x0/0x60
>  [<ffffffff8020bc46>] ret_from_intr+0x0/0xf
>  <EOI>  [<ffffffff80212f2c>] ? mwait_idle+0x4c/0x60
>  [<ffffffff80212f23>] ? mwait_idle+0x43/0x60
>  [<ffffffff8020a217>] ? cpu_idle+0x57/0xa0
>  [<ffffffff8040f380>] ? rest_init+0x70/0x80
> Code: 10 5b 41 5c 41 5d 41 5e c9 c3 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 e5 53
> 48 83 ec 08 48 8b 9f 78 01 00 00 e8 2b c7 f1 ff 89 c0 <48> 8b 04 c3 48 83 c4 08
> 5b c9 c3 66 66 66 66 66 2e 0f 1f 84 00
> RIP  [<ffffffff803fce17>] icmp_sk+0x17/0x30
>  RSP <ffffffff8057fc30>
> CR2: 0000000000000000
> ---[ end trace ea161157b76b33e8 ]---
> Kernel panic - not syncing: Aiee, killing interrupt handler!

Receiving packets while we are cleaning up a network namespace is a
racy proposition. It is possible when the packet arrives that we have
removed some but not all of the state we need to fully process it.  We
have the choice of either playing wack-a-mole with the cleanup routines
or simply dropping packets when we don't have a network namespace to
handle them.

Since the check looks inexpensive in netif_receive_skb let's just
drop the incoming packets.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosctp: Make sure N * sizeof(union sctp_addr) does not overflow.
David S. Miller [Sat, 21 Jun 2008 05:04:34 +0000 (22:04 -0700)]
sctp: Make sure N * sizeof(union sctp_addr) does not overflow.

As noticed by Gabriel Campana, the kmalloc() length arg
passed in by sctp_getsockopt_local_addrs_old() can overflow
if ->addr_num is large enough.

Therefore, enforce an appropriate limit.

Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agopppoe: warning fix
Stephen Hemminger [Sat, 21 Jun 2008 04:58:02 +0000 (21:58 -0700)]
pppoe: warning fix

Fix warning:
drivers/net/pppoe.c: In function 'pppoe_recvmsg':
drivers/net/pppoe.c:945: warning: comparison of distinct pointer types lacks a cast
because skb->len is unsigned int and total_len is size_t

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Sat, 21 Jun 2008 00:10:04 +0000 (17:10 -0700)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] SN2: security hole in sn2_ptc_proc_write

17 years agoalpha: resurrect Cypress IDE quirk
Ivan Kokshaysky [Fri, 20 Jun 2008 23:28:54 +0000 (03:28 +0400)]
alpha: resurrect Cypress IDE quirk

Which was removed in the hope that generic legacy IDE quirk in
drivers/pci/probe.c is sufficient for Cypress IDE.
It isn't, as this controller has non-standard BAR layout:
secondary channel registers are in the BAR0-1 of the second
PCI function - not in the BAR2-3 of the same function, as the
generic quirk routine assumes.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoalpha: fix compile failures with gcc-4.3 (bug #10438)
Ivan Kokshaysky [Fri, 20 Jun 2008 23:28:31 +0000 (03:28 +0400)]
alpha: fix compile failures with gcc-4.3 (bug #10438)

Vast majority of these build failures are gcc-4.3 warnings
about static functions and objects being referenced from
non-static (read: "extern inline") functions, in conjunction
with our -Werror.

We cannot just convert "extern inline" to "static inline",
as people keep suggesting all the time, because "extern inline"
logic is crucial for generic kernel build.
So
- just make sure that all callees of critical "extern inline"
  functions are also "extern inline";
- use "static inline", wherever it's possible.

traps.c: work around gcc-4.3 being too smart about array
bounds-checking.

TODO: add "gnu_inline" attribute to all our "extern inline"
functions to ensure desired behaviour with future compilers.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoalpha: link failure fix
Ivan Kokshaysky [Fri, 20 Jun 2008 23:26:21 +0000 (03:26 +0400)]
alpha: link failure fix

With built-in scsi disk driver, the final link fails with a following
error:
`.exit.text' referenced in section `.rodata' of drivers/built-in.o:
defined in discarded section `.exit.text' of drivers/built-in.o

This happens with -Os (CONFIG_CC_OPTIMIZE_FOR_SIZE=y) with all gcc-4
versions, and also with -O2 and gcc-4.3.

The problem is in sd.c:sd_major() being inlined into __exit function
exit_sd(), and the compiler generating a jump table in .rodata section
for the 'switch' statement in sd_major(). So we have references to
discarded section.

Fixed with a big hammer in the form of -fno-jump-tables.

Note that jump tables vs. discarded sections is a generic problem,
other architectures are just lucky not to suffer from it. But with
a slightly more complex switch/case statement it can be reproduced
on x86 as well. So maybe at some point we should consider
-fno-jump-tables as a generic compile option...

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoalpha: fix module load failures on smp (bug #10926)
Ivan Kokshaysky [Fri, 20 Jun 2008 23:25:39 +0000 (03:25 +0400)]
alpha: fix module load failures on smp (bug #10926)

To calculate addresses of locally defined variables, GCC uses 32-bit
displacement from the GP. Which doesn't work for per cpu variables in
modules, as an offset to the kernel per cpu area is way above 4G.

The workaround is to force allocation of a GOT entry for per cpu variable
using ldq instruction with a 'literal' relocation.
I had to use custom asm/percpu.h, as a required argument magic doesn't
work with asm-generic/percpu.h macros.

Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoLinux 2.6.26-rc7 v2.6.26-rc7
Linus Torvalds [Fri, 20 Jun 2008 23:19:44 +0000 (16:19 -0700)]
Linux 2.6.26-rc7

17 years agomicrocode: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:16 +0000 (19:16 +0200)]
microcode: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agomessage-i2o-i2o_config: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:14 +0000 (19:16 +0200)]
message-i2o-i2o_config: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agomegaraid: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:13 +0000 (19:16 +0200)]
megaraid: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agomedia-radio-miropcm20-rds: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:12 +0000 (19:16 +0200)]
media-radio-miropcm20-rds: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agomacintosh-smu: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:11 +0000 (19:16 +0200)]
macintosh-smu: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agolcd: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:10 +0000 (19:16 +0200)]
lcd: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agojsflash: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:08 +0000 (19:16 +0200)]
jsflash: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agoirnet_ppp: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:06 +0000 (19:16 +0200)]
irnet_ppp: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agoipmi-watchdog: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:04 +0000 (19:16 +0200)]
ipmi-watchdog: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agoip27-rtc: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:03 +0000 (19:16 +0200)]
ip27-rtc: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agoinfiniband-ucma: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:02 +0000 (19:16 +0200)]
infiniband-ucma: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agohw-random: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:16:00 +0000 (19:16 +0200)]
hw-random: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agohpet: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:59 +0000 (19:15 +0200)]
hpet: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agohp_sdc_rtc: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:58 +0000 (19:15 +0200)]
hp_sdc_rtc: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agohdpu_cpustate: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:57 +0000 (19:15 +0200)]
hdpu_cpustate: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agogenrtc: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:55 +0000 (19:15 +0200)]
genrtc: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agoflash: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:54 +0000 (19:15 +0200)]
flash: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agoenvctrl: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:53 +0000 (19:15 +0200)]
envctrl: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agoefirtc: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:52 +0000 (19:15 +0200)]
efirtc: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agods1620: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:50 +0000 (19:15 +0200)]
ds1620: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agods1286: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:49 +0000 (19:15 +0200)]
ds1286: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agodlm-user: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:48 +0000 (19:15 +0200)]
dlm-user: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agodisplay7seg: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:47 +0000 (19:15 +0200)]
display7seg: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agocrypto-zcrypt_api: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:46 +0000 (19:15 +0200)]
crypto-zcrypt_api: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agocrypto-prng: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:45 +0000 (19:15 +0200)]
crypto-prng: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agocpwatchdog: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:43 +0000 (19:15 +0200)]
cpwatchdog: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agobvme6000-rtc: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:42 +0000 (19:15 +0200)]
bvme6000-rtc: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agobriq_panel: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:41 +0000 (19:15 +0200)]
briq_panel: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agobluetooth-vhci: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:40 +0000 (19:15 +0200)]
bluetooth-vhci: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agoblock-dasd_eer: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:38 +0000 (19:15 +0200)]
block-dasd_eer: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agobf561-coreb: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:37 +0000 (19:15 +0200)]
bf561-coreb: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agobasler-excite: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:36 +0000 (19:15 +0200)]
basler-excite: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agoapm_32: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:34 +0000 (19:15 +0200)]
apm_32: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agoapm-emulation: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:33 +0000 (19:15 +0200)]
apm-emulation: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agoans-lcd: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:32 +0000 (19:15 +0200)]
ans-lcd: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agoagp-frontend: BKL pushdown
Arnd Bergmann [Tue, 20 May 2008 17:15:30 +0000 (19:15 +0200)]
agp-frontend: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 years agoReplace BKL with superblock lock in fat/msdos/vfat
Linus Torvalds [Tue, 20 May 2008 02:53:01 +0000 (19:53 -0700)]
Replace BKL with superblock lock in fat/msdos/vfat

This replaces the use of the BKL in the FAT family of filesystems with the
existing superblock lock instead.

The code already appears to do mostly proper locking with its own private
spinlocks (and mutexes), but while the BKL could possibly have been
dropped entirely, converting it to use the superblock lock (which is just
a regular mutex) is the conservative thing to do.

As a per-filesystem mutex, it not only won't have any of the possible
latency issues related to the BKL, but the lock is obviously private to
the particular filesystem instance and will thus not cause problems for
entirely unrelated users like the BKL can.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
17 years agobkl-removal viotape fixup
Stephen Rothwell [Mon, 19 May 2008 06:06:52 +0000 (16:06 +1000)]
bkl-removal viotape fixup

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
17 years agoRemove the lock_kernel() call from chrdev_open()
Jonathan Corbet [Sun, 18 May 2008 21:40:00 +0000 (15:40 -0600)]
Remove the lock_kernel() call from chrdev_open()

All in-kernel char device open() functions now either have their own
lock_kernel() calls or clearly do not need one.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
17 years agoAdd a comment in chrdev_open()
Jonathan Corbet [Sun, 18 May 2008 21:39:11 +0000 (15:39 -0600)]
Add a comment in chrdev_open()

I stared at this code for a while and almost deleted it before
understanding crept into my slow brain.  Hopefully this makes life easier
for the next person to happen on it.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
17 years agoAdd a bunch of cycle_kernel_lock() calls
Jonathan Corbet [Sun, 18 May 2008 21:32:43 +0000 (15:32 -0600)]
Add a bunch of cycle_kernel_lock() calls

All of the open() functions which don't need the BKL on their face may
still depend on its acquisition to serialize opens against driver
initialization.  So make those functions acquire then release the BKL to be
on the safe side.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
17 years agoAdd cycle_kernel_lock()
Jonathan Corbet [Sun, 18 May 2008 20:27:41 +0000 (14:27 -0600)]
Add cycle_kernel_lock()

A number of driver functions are so obviously trivial that they do not need
the big kernel lock - at least not overtly.  It turns out that the
acquisition of the BKL in driver open() functions can perform a sort of
poor-hacker's serialization function, delaying the open operation until the
driver is certain to have completed its initialization.  Add a simple
cycle_kernel_lock() function for these cases to make it clear that there is
no need to *hold* the BKL, just to be sure that we can acquire it.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
17 years agovideodev: BKL pushdown
Jonathan Corbet [Fri, 16 May 2008 20:28:31 +0000 (14:28 -0600)]
videodev: BKL pushdown

Put explicit lock_kernel() calls into videodev_open().  That function
itself seems OK, but one never knows about all the open() functions
provided by underlying video drivers.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
17 years agousbdev: BKL pushdown
Jonathan Corbet [Fri, 16 May 2008 20:25:20 +0000 (14:25 -0600)]
usbdev: BKL pushdown

Add explicit lock_kernel() calls to usbdev_open()

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
17 years agoUSB Monitor: BKL pushdown
Jonathan Corbet [Fri, 16 May 2008 20:23:31 +0000 (14:23 -0600)]
USB Monitor: BKL pushdown

Add explicit lock_kernel() calls to mon_bin_open()

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
17 years agoprinter gadget: BKL pushdown
Jonathan Corbet [Fri, 16 May 2008 20:21:30 +0000 (14:21 -0600)]
printer gadget: BKL pushdown

Add explicit lock_kernel() calls to printer_open()

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
17 years agoadb: BKL pushdown
Jonathan Corbet [Fri, 16 May 2008 20:19:56 +0000 (14:19 -0600)]
adb: BKL pushdown

Put explicit lock_kernel() calls in adb_open().  The fact that
adb_release() already has them suggests this is necessary.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>