kernel/kernel-generic.git
18 years ago[PATCH] fs/locks.c: Fix lease_init
Trond Myklebust [Mon, 8 May 2006 03:02:42 +0000 (23:02 -0400)]
[PATCH] fs/locks.c: Fix lease_init

It is insane to be giving lease_init() the task of freeing the lock it is
supposed to initialise, given that the lock is not guaranteed to be
allocated on the stack. This causes lockups in fcntl_setlease().
Problem diagnosed by Daniel Hokka Zakrisson <daniel@hozac.com>

Also fix a slab leak in __setlease() due to an uninitialised return value.
Problem diagnosed by Björn Steinbrink.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Tested-by: Daniel Hokka Zakrisson <daniel@hozac.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Mon, 8 May 2006 00:32:57 +0000 (17:32 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 3507/1: Replace map_desc.physical with map_desc.pfn: aaed2000
  [ARM] 3506/1: aaec2000: debug-macro.S needs hardware.h
  [ARM] 3505/1: aaec2000: entry-macro.S needs asm/arch/irqs.h
  [ARM] 3504/1: Fix clcd includes for aaec2000
  [ARM] 3503/1: Fix map_desc structure for aaec2000
  [ARM] 3501/1: i.MX: fix lowlevel debug macros
  [ARM] rtc-sa1100: fix compiler warnings and error cleanup
  [ARM] Allow SA1100 RTC alarm to be configured for wakeup

18 years ago[ARM] 3507/1: Replace map_desc.physical with map_desc.pfn: aaed2000
Bellido Nicolas [Sun, 7 May 2006 21:49:24 +0000 (22:49 +0100)]
[ARM] 3507/1: Replace map_desc.physical with map_desc.pfn: aaed2000

Patch from Bellido Nicolas

aaed2000 map_desc.pfn conversion

Signed-off-by: Nicolas Bellido <ml@acolin.be>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3506/1: aaec2000: debug-macro.S needs hardware.h
Bellido Nicolas [Sun, 7 May 2006 21:49:23 +0000 (22:49 +0100)]
[ARM] 3506/1: aaec2000: debug-macro.S needs hardware.h

Patch from Bellido Nicolas

Include hardware.h in debug-macro.S, otherwise io_p2v is undefined.

Signed-off-by: Nicolas Bellido <ml@acolin.be>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3505/1: aaec2000: entry-macro.S needs asm/arch/irqs.h
Bellido Nicolas [Sun, 7 May 2006 21:49:22 +0000 (22:49 +0100)]
[ARM] 3505/1: aaec2000: entry-macro.S needs asm/arch/irqs.h

Patch from Bellido Nicolas

Since git commit 2b78838842346da390e8547cd37035184376d506, entry-macro.S needs to include asm/arch/irqs.h

Signed-off-by: Nicolas Bellido <ml@acolin.be>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3504/1: Fix clcd includes for aaec2000
Bellido Nicolas [Sun, 7 May 2006 21:49:21 +0000 (22:49 +0100)]
[ARM] 3504/1: Fix clcd includes for aaec2000

Patch from Bellido Nicolas

Since this patch:
 [ARM] 3366/1: Allow the 16bpp mode configuration in the CLCD control register

linux/amba/bus.h needs to be included before linux/amba/clcd.h

Signed-off-by: Nicolas Bellido <ml@acolin.be>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3503/1: Fix map_desc structure for aaec2000
Bellido Nicolas [Sun, 7 May 2006 21:49:21 +0000 (22:49 +0100)]
[ARM] 3503/1: Fix map_desc structure for aaec2000

Patch from Bellido Nicolas

Patch:
 [ARM] 2982/1: Replace map_desc.physical with map_desc.pfn: aaec2000
incorrectly expanded the struct map_desc for aaec2000.

Signed-off-by: Nicolas Bellido <ml@acolin.be>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3501/1: i.MX: fix lowlevel debug macros
Sascha Hauer [Sun, 7 May 2006 17:56:27 +0000 (18:56 +0100)]
[ARM] 3501/1: i.MX: fix lowlevel debug macros

Patch from Sascha Hauer

This patch fixes the addruart macro to work with both mmu enabled and
disabled.

Signed-off-by: Sascha Hauer <s.hauer@pengutonix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years agoFix ptrace_attach()/ptrace_traceme()/de_thread() race
Linus Torvalds [Sun, 7 May 2006 17:49:33 +0000 (10:49 -0700)]
Fix ptrace_attach()/ptrace_traceme()/de_thread() race

This holds the task lock (and, for ptrace_attach, the tasklist_lock)
over the actual attach event, which closes a race between attacking to a
thread that is either doing a PTRACE_TRACEME or getting de-threaded.

Thanks to Oleg Nesterov for reminding me about this, and Chris Wright
for noticing a lost return value in my first version.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[ARM] rtc-sa1100: fix compiler warnings and error cleanup
Russell King [Sat, 6 May 2006 10:29:21 +0000 (11:29 +0100)]
[ARM] rtc-sa1100: fix compiler warnings and error cleanup

Fix:
drivers/rtc/rtc-sa1100.c: In function `sa1100_rtc_proc':
drivers/rtc/rtc-sa1100.c:298: warning: unsigned int format, long unsigned int arg (arg 3)

and arrange for sa1100_rtc_open() to pass the devid to free_irq()
rather than NULL.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] Allow SA1100 RTC alarm to be configured for wakeup
Russell King [Sat, 6 May 2006 10:26:30 +0000 (11:26 +0100)]
[ARM] Allow SA1100 RTC alarm to be configured for wakeup

The SA1100 RTC alarm can be configured to wake up the CPU
from sleep mode, and the RTC driver has been using the
API to configure this mode.  Unfortunately, the code was
which sets the required bit in the hardware was missing.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[TCP]: Fix snd_cwnd adjustments in tcp_highspeed.c
John Heffner [Sat, 6 May 2006 00:41:44 +0000 (17:41 -0700)]
[TCP]: Fix snd_cwnd adjustments in tcp_highspeed.c

Xiaoliang (David) Wei wrote:
> Hi gurus,
>
>    I am reading the code of tcp_highspeed.c in the kernel and have a
> question on the hstcp_cong_avoid function, specifically the following
> AI part (line 136~143 in net/ipv4/tcp_highspeed.c ):
>
>                /* Do additive increase */
>                if (tp->snd_cwnd < tp->snd_cwnd_clamp) {
>                        tp->snd_cwnd_cnt += ca->ai;
>                        if (tp->snd_cwnd_cnt >= tp->snd_cwnd) {
>                                tp->snd_cwnd++;
>                                tp->snd_cwnd_cnt -= tp->snd_cwnd;
>                        }
>                }
>
>    In this part, when (tp->snd_cwnd_cnt == tp->snd_cwnd),
> snd_cwnd_cnt will be -1... snd_cwnd_cnt is defined as u16, will this
> small chance of getting -1 becomes a problem?
> Shall we change it by reversing the order of the cwnd++ and cwnd_cnt -=
> cwnd?

Absolutely correct.  Thanks.

Signed-off-by: John Heffner <jheffner@psc.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETROM/ROSE]: Kill module init version kernel log messages.
Ralf Baechle [Sat, 6 May 2006 00:19:26 +0000 (17:19 -0700)]
[NETROM/ROSE]: Kill module init version kernel log messages.

There are out of date and don't tell the user anything useful.
The similar messages which IPV4 and the core networking used
to output were killed a long time ago.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[DCCP]: Fix sock_orphan dead lock
Herbert Xu [Sat, 6 May 2006 00:09:13 +0000 (17:09 -0700)]
[DCCP]: Fix sock_orphan dead lock

Calling sock_orphan inside bh_lock_sock in dccp_close can lead to dead
locks.  For example, the inet_diag code holds sk_callback_lock without
disabling BH.  If an inbound packet arrives during that admittedly tiny
window, it will cause a dead lock on bh_lock_sock.  Another possible
path would be through sock_wfree if the network device driver frees the
tx skb in process context with BH enabled.

We can fix this by moving sock_orphan out of bh_lock_sock.

The tricky bit is to work out when we need to destroy the socket
ourselves and when it has already been destroyed by someone else.

By moving sock_orphan before the release_sock we can solve this
problem.  This is because as long as we own the socket lock its
state cannot change.

So we simply record the socket state before the release_sock
and then check the state again after we regain the socket lock.
If the socket state has transitioned to DCCP_CLOSED in the time being,
we know that the socket has been destroyed.  Otherwise the socket is
still ours to keep.

This problem was discoverd by Ingo Molnar using his lock validator.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[BRIDGE]: keep track of received multicast packets
Stephen Hemminger [Sat, 6 May 2006 00:07:13 +0000 (17:07 -0700)]
[BRIDGE]: keep track of received multicast packets

It makes sense to add this simple statistic to keep track of received
multicast packets.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SCTP]: Fix state table entries for chunks received in CLOSED state.
Sridhar Samudrala [Sat, 6 May 2006 00:05:23 +0000 (17:05 -0700)]
[SCTP]: Fix state table entries for chunks received in CLOSED state.

Discard an unexpected chunk in CLOSED state rather can calling BUG().

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SCTP]: Fix panic's when receiving fragmented SCTP control chunks.
Sridhar Samudrala [Sat, 6 May 2006 00:04:43 +0000 (17:04 -0700)]
[SCTP]: Fix panic's when receiving fragmented SCTP control chunks.

Use pskb_pull() to handle incoming COOKIE_ECHO and HEARTBEAT chunks that
are received as skb's with fragment list.

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SCTP]: Prevent possible infinite recursion with multiple bundled DATA.
Vladislav Yasevich [Sat, 6 May 2006 00:03:49 +0000 (17:03 -0700)]
[SCTP]: Prevent possible infinite recursion with multiple bundled DATA.

There is a rare situation that causes lksctp to go into infinite recursion
and crash the system.  The trigger is a packet that contains at least the
first two DATA fragments of a message bundled together. The recursion is
triggered when the user data buffer is smaller that the full data message.
The problem is that we clone the skb for every fragment in the message.
When reassembling the full message, we try to link skbs from the "first
fragment" clone using the frag_list. However, since the frag_list is shared
between two clones in this rare situation, we end up setting the frag_list
pointer of the second fragment to point to itself.  This causes
sctp_skb_pull() to potentially recurse indefinitely.

Proposed solution is to make a copy of the skb when attempting to link
things using frag_list.

Signed-off-by: Vladislav Yasevich <vladsilav.yasevich@hp.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SCTP]: Allow spillover of receive buffer to avoid deadlock.
Neil Horman [Sat, 6 May 2006 00:02:09 +0000 (17:02 -0700)]
[SCTP]: Allow spillover of receive buffer to avoid deadlock.

This patch fixes a deadlock situation in the receive path by allowing
temporary spillover of the receive buffer.

- If the chunk we receive has a tsn that immediately follows the ctsn,
  accept it even if we run out of receive buffer space and renege data with
  higher TSNs.
- Once we accept one chunk in a packet, accept all the remaining chunks
  even if we run out of receive buffer space.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Mark Butler <butlerm@middle.net>
Acked-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-mmc
Linus Torvalds [Fri, 5 May 2006 21:53:48 +0000 (14:53 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-mmc

* master.kernel.org:/home/rmk/linux-2.6-mmc:
  [BLOCK] Fix oops on removal of SD/MMC card

18 years ago[ARM] 3495/1: EABI: undefine removed syscalls, but...
Nicolas Pitre [Fri, 5 May 2006 21:35:05 +0000 (22:35 +0100)]
[ARM] 3495/1: EABI: undefine removed syscalls, but...

Patch from Nicolas Pitre

... but only for user space.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3500/1: fix PXA27x DMA allocation priority
Nicolas Pitre [Fri, 5 May 2006 21:32:24 +0000 (22:32 +0100)]
[ARM] 3500/1: fix PXA27x DMA allocation priority

Patch from Nicolas Pitre

Intel PXA27x developers manual section 5.4.1.1 lists a priority
distribution for the DMA channels differently than what the code
currently assumes.  This patch fixes that.

Noticed by Simon Vogl <vogl@soft.uni-linz.ac.at>

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3499/1: Fix VFP FPSCR corruption for double exception case
George G. Davis [Fri, 5 May 2006 21:32:23 +0000 (22:32 +0100)]
[ARM] 3499/1: Fix VFP FPSCR corruption for double exception case

Patch from George G. Davis

The ARM VFP FPSCR register is corrupted when a condition flags modifying
VFP instruction is followed by a non-condition flags modifying VFP
instruction and both instructions raise exceptions.  The fix is to
read the current FPSCR in between emulation of these two instructions
and use the current FPSCR value when handling the second exception.

Signed-off-by: George G. Davis <gdavis@mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[BLOCK] Fix oops on removal of SD/MMC card
Russell King [Fri, 5 May 2006 16:57:52 +0000 (17:57 +0100)]
[BLOCK] Fix oops on removal of SD/MMC card

The block layer keeps a reference (driverfs_dev) to the struct
device associated with the block device, and uses it internally
for generating uevents in block_uevent.

Block device uevents include umounting the partition, which can
occur after the backing device has been removed.

Unfortunately, this reference is not counted.  This means that
if the struct device is removed from the device tree, the block
layers reference will become stale.

Guard against this by holding a reference to the struct device
in add_disk(), and only drop the reference when we're releasing
the gendisk kobject - in other words when we can be sure that no
further uevents will be generated for this block device.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Jens Axboe <axboe@suse.de>
18 years ago[ARM] 3496/1: more constants for asm-offsets.h
Uwe Zeisberger [Fri, 5 May 2006 14:11:14 +0000 (15:11 +0100)]
[ARM] 3496/1: more constants for asm-offsets.h

Patch from Uwe Zeisberger

added the following constants:
- MACHINFO_TYPE
- MACHINFO_NAME
- MACHINFO_PHYSIO
- MACHINFO_PGOFFIO
- PROCINFO_INITFUNC
- PROCINFO_MMUFLAGS

and removed their definition from head.S and head-nommu.S

Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3494/1: asm-arm/bug.h needs linux/stddef.h
Nicolas Pitre [Fri, 5 May 2006 14:11:14 +0000 (15:11 +0100)]
[ARM] 3494/1: asm-arm/bug.h needs linux/stddef.h

Patch from Nicolas Pitre

... for the definition of NULL.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Thu, 4 May 2006 22:09:52 +0000 (15:09 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [PATCH] powerpc: Use the ibm,pa-features property if available
  powerpc: Fix incorrect might_sleep in __get_user/__put_user on kernel addresses
  [PATCH] ppc32 CPM_UART: fixes and improvements
  [PATCH] ppc32 CPM_UART: Fixed break send on SCC
  [PATCH] powerpc/kprobes: fix singlestep out-of-line
  [PATCH] powerpc/pseries: avoid crash in PCI code if mem system not up

18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Thu, 4 May 2006 21:52:43 +0000 (14:52 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 3490/1: i.MX: move uart resources to board files
  [ARM] 3488/1: make icedcc_putc do the right thing
  [ARM] 3487/1: IXP4xx: Support non-PCI systems
  [ARM] 3486/1: Mark memory as clobbered by the ARM _syscallX() macros

18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-mmc
Linus Torvalds [Thu, 4 May 2006 21:52:27 +0000 (14:52 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-mmc

* master.kernel.org:/home/rmk/linux-2.6-mmc:
  [MMC] Move set_ios debugging into mmc.c
  [MMC] Correct mmc_request_done comments
  [MMC] PXA: reduce the number of lines PXAMCI debug uses
  [MMC] PXA and i.MX: don't avoid sending stop command on error
  [MMC] extend data timeout for writes
  [ARM] 3485/1: i.MX: MX1 SD/MMC fix of unintentional double start possibility

18 years agoMerge branch 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block
Linus Torvalds [Thu, 4 May 2006 17:25:40 +0000 (13:25 -0400)]
Merge branch 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block

* 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block:
  [PATCH] compat_sys_vmsplice: one-off in UIO_MAXIOV check
  [PATCH] splice: redo page lookup if add_to_page_cache() returns -EEXIST
  [PATCH] splice: rename remaining info variables to pipe
  [PATCH] splice: LRU fixups
  [PATCH] splice: fix unlocking of page on error ->prepare_write()

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 4 May 2006 17:25:19 +0000 (13:25 -0400)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [DECNET]: Fix level1 router hello
  [TCP]: Fix sock_orphan dead lock
  [ROSE]: Eleminate HZ from ROSE kernel interfaces
  [NETROM]: Eleminate HZ from NET/ROM kernel interfaces
  [AX.25]: Eleminate HZ from AX.25 kernel interfaces
  [ROSE]: Fix routing table locking in rose_remove_neigh.
  [AX.25]: Move AX.25 symbol exports
  [HAMRADIO]: Remove remaining SET_MODULE_OWNER calls from hamradio drivers.
  [AX25, ROSE]: Remove useless SET_MODULE_OWNER calls.
  [AX.25]: Spelling fix
  [ROSE]: Remove useless prototype for rose_remove_neigh().
  [NETFILTER]: x_tables: don't use __copy_{from,to}_user on unchecked memory in compat layer
  [NETFILTER]: H.323 helper: Change author's email address
  [NETFILTER]: NAT: silence unused variable warnings with CONFIG_XFRM=n
  [NETFILTER]: H.323 helper: fix use of uninitialized data
  [NETFILTER]: H.323 helper: fix endless loop caused by invalid TPKT len

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Thu, 4 May 2006 17:25:05 +0000 (13:25 -0400)]
Merge /pub/scm/linux/kernel/git/davem/sparc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC]: Hook up vmsplice into syscall tables.

18 years agoCREDITS file update (Tristan Greaves)
Linus Torvalds [Thu, 4 May 2006 17:23:40 +0000 (13:23 -0400)]
CREDITS file update (Tristan Greaves)

By request from Tristan.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[MMC] Move set_ios debugging into mmc.c
Russell King [Thu, 4 May 2006 17:22:51 +0000 (18:22 +0100)]
[MMC] Move set_ios debugging into mmc.c

Rather than having every driver duplicate the set_ios debugging,
provide a single version in mmc.c which can be expanded as we
add additional functionality.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3490/1: i.MX: move uart resources to board files
Sascha Hauer [Thu, 4 May 2006 13:07:42 +0000 (14:07 +0100)]
[ARM] 3490/1: i.MX: move uart resources to board files

Patch from Sascha Hauer

This patch moves the i.MX uart resources and the gpio pin setup to the
board files. This allows the boards to decide how many internal uarts
are connected to the outside world and whether they use rts/cts or
not.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[MMC] Correct mmc_request_done comments
Russell King [Thu, 4 May 2006 12:51:45 +0000 (13:51 +0100)]
[MMC] Correct mmc_request_done comments

mmc_request_done should be called at the end of handling a request, not
between the data and initial command parts of the request.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[PATCH] compat_sys_vmsplice: one-off in UIO_MAXIOV check
Jens Axboe [Thu, 4 May 2006 07:13:49 +0000 (09:13 +0200)]
[PATCH] compat_sys_vmsplice: one-off in UIO_MAXIOV check

nr_segs may not be > UIO_MAXIOV, however it may be equal to. This makes
the behaviour identical to the real sys_vmsplice(). The other foov
syscalls also agree that this is the way to go.

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years ago[DECNET]: Fix level1 router hello
Patrick Caulfield [Thu, 4 May 2006 06:36:23 +0000 (23:36 -0700)]
[DECNET]: Fix level1 router hello

This patch fixes hello messages sent when a node is a level 1
router. Slightly contrary to the spec (maybe) VMS ignores hello
messages that do not name level2 routers that it also knows about.

So, here we simply name all the routers that the node knows about
rather just other level1 routers.  (I hope the patch is clearer than
the description. sorry).

Signed-off-by: Patrick Caulfield <patrick@tykepenguin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TCP]: Fix sock_orphan dead lock
Herbert Xu [Thu, 4 May 2006 06:31:35 +0000 (23:31 -0700)]
[TCP]: Fix sock_orphan dead lock

Calling sock_orphan inside bh_lock_sock in tcp_close can lead to dead
locks.  For example, the inet_diag code holds sk_callback_lock without
disabling BH.  If an inbound packet arrives during that admittedly tiny
window, it will cause a dead lock on bh_lock_sock.  Another possible
path would be through sock_wfree if the network device driver frees the
tx skb in process context with BH enabled.

We can fix this by moving sock_orphan out of bh_lock_sock.

The tricky bit is to work out when we need to destroy the socket
ourselves and when it has already been destroyed by someone else.

By moving sock_orphan before the release_sock we can solve this
problem.  This is because as long as we own the socket lock its
state cannot change.

So we simply record the socket state before the release_sock
and then check the state again after we regain the socket lock.
If the socket state has transitioned to TCP_CLOSE in the time being,
we know that the socket has been destroyed.  Otherwise the socket is
still ours to keep.

Note that I've also moved the increment on the orphan count forward.
This may look like a problem as we're increasing it even if the socket
is just about to be destroyed where it'll be decreased again.  However,
this simply enlarges a window that already exists.  This also changes
the orphan count test by one.

Considering what the orphan count is meant to do this is no big deal.

This problem was discoverd by Ingo Molnar using his lock validator.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[ROSE]: Eleminate HZ from ROSE kernel interfaces
Ralf Baechle [Thu, 4 May 2006 06:28:20 +0000 (23:28 -0700)]
[ROSE]: Eleminate HZ from ROSE kernel interfaces

Convert all ROSE sysctl time values from jiffies to ms as units.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETROM]: Eleminate HZ from NET/ROM kernel interfaces
Ralf Baechle [Thu, 4 May 2006 06:27:47 +0000 (23:27 -0700)]
[NETROM]: Eleminate HZ from NET/ROM kernel interfaces

Convert all NET/ROM sysctl time values from jiffies to ms as units.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[AX.25]: Eleminate HZ from AX.25 kernel interfaces
Ralf Baechle [Thu, 4 May 2006 06:27:16 +0000 (23:27 -0700)]
[AX.25]: Eleminate HZ from AX.25 kernel interfaces

Convert all AX.25 sysctl time values from jiffies to ms as units.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[ROSE]: Fix routing table locking in rose_remove_neigh.
Ralf Baechle [Thu, 4 May 2006 06:26:20 +0000 (23:26 -0700)]
[ROSE]: Fix routing table locking in rose_remove_neigh.

The locking rule for rose_remove_neigh() are that the caller needs to
hold rose_neigh_list_lock, so we better don't take it yet again in
rose_neigh_list_lock.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[AX.25]: Move AX.25 symbol exports
Ralf Baechle [Thu, 4 May 2006 06:25:17 +0000 (23:25 -0700)]
[AX.25]: Move AX.25 symbol exports

Move AX.25 symbol exports to next to their definitions where they're
supposed to be these days.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[HAMRADIO]: Remove remaining SET_MODULE_OWNER calls from hamradio drivers.
Ralf Baechle DL5RB [Thu, 4 May 2006 06:24:35 +0000 (23:24 -0700)]
[HAMRADIO]: Remove remaining SET_MODULE_OWNER calls from hamradio drivers.

Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[AX25, ROSE]: Remove useless SET_MODULE_OWNER calls.
Ralf Baechle [Thu, 4 May 2006 06:23:48 +0000 (23:23 -0700)]
[AX25, ROSE]: Remove useless SET_MODULE_OWNER calls.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[AX.25]: Spelling fix
Ralf Baechle [Thu, 4 May 2006 06:22:36 +0000 (23:22 -0700)]
[AX.25]: Spelling fix

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[ROSE]: Remove useless prototype for rose_remove_neigh().
Ralf Baechle [Thu, 4 May 2006 06:22:01 +0000 (23:22 -0700)]
[ROSE]: Remove useless prototype for rose_remove_neigh().

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: x_tables: don't use __copy_{from,to}_user on unchecked memory in compat...
Patrick McHardy [Thu, 4 May 2006 06:20:27 +0000 (23:20 -0700)]
[NETFILTER]: x_tables: don't use __copy_{from,to}_user on unchecked memory in compat layer

Noticed by Linus Torvalds <torvalds@osdl.org>

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: H.323 helper: Change author's email address
Jing Min Zhao [Thu, 4 May 2006 06:19:59 +0000 (23:19 -0700)]
[NETFILTER]: H.323 helper: Change author's email address

Signed-off-by: Jing Min Zhao <zhaojingmin@users.sourceforge.net>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: NAT: silence unused variable warnings with CONFIG_XFRM=n
Patrick McHardy [Thu, 4 May 2006 06:19:26 +0000 (23:19 -0700)]
[NETFILTER]: NAT: silence unused variable warnings with CONFIG_XFRM=n

net/ipv4/netfilter/ip_nat_standalone.c: In function 'ip_nat_out':
net/ipv4/netfilter/ip_nat_standalone.c:223: warning: unused variable 'ctinfo'
net/ipv4/netfilter/ip_nat_standalone.c:222: warning: unused variable 'ct'

Surprisingly no complaints so far ..

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: H.323 helper: fix use of uninitialized data
Patrick McHardy [Thu, 4 May 2006 06:17:11 +0000 (23:17 -0700)]
[NETFILTER]: H.323 helper: fix use of uninitialized data

When a Choice element contains an unsupported choice no error is returned
and parsing continues normally, but the choice value is not set and
contains data from the last parsed message. This may in turn lead to
parsing of more stale data and following crashes.

Fixes a crash triggered by testcase 0003243 from the PROTOS c07-h2250v4
testsuite following random other testcases:

CPU:    0
EIP:    0060:[<c01a9554>]    Not tainted VLI
EFLAGS: 00210646   (2.6.17-rc2 #3)
EIP is at memmove+0x19/0x22
eax: d7be0307   ebx: d7be0307   ecx: e841fcf9   edx: d7be0307
esi: bfffffff   edi: bfffffff   ebp: da5eb980   esp: c0347e2c
ds: 007b   es: 007b   ss: 0068
Process events/0 (pid: 4, threadinfo=c0347000 task=dff86a90)
Stack: <0>00000006 c0347ea6 d7be0301 e09a6b2c 00000006 da5eb980 d7be003e d7be0052
       c0347f6c e09a6d9c 00000006 c0347ea6 00000006 00000000 d7b9a548 00000000
       c0347f6c d7b9a548 00000004 e0a1a119 0000028f 00000006 c0347ea6 00000006
Call Trace:
 [<e09a6b2c>] mangle_contents+0x40/0xd8 [ip_nat]
 [<e09a6d9c>] ip_nat_mangle_tcp_packet+0xa1/0x191 [ip_nat]
 [<e0a1a119>] set_addr+0x60/0x14d [ip_nat_h323]
 [<e0ab6e66>] q931_help+0x2da/0x71a [ip_conntrack_h323]
 [<e0ab6e98>] q931_help+0x30c/0x71a [ip_conntrack_h323]
 [<e09af242>] ip_conntrack_help+0x22/0x2f [ip_conntrack]
 [<c022934a>] nf_iterate+0x2e/0x5f
 [<c025d357>] xfrm4_output_finish+0x0/0x39f
 [<c02294ce>] nf_hook_slow+0x42/0xb0
 [<c025d357>] xfrm4_output_finish+0x0/0x39f
 [<c025d732>] xfrm4_output+0x3c/0x4e
 [<c025d357>] xfrm4_output_finish+0x0/0x39f
 [<c0230370>] ip_forward+0x1c2/0x1fa
 [<c022f417>] ip_rcv+0x388/0x3b5
 [<c02188f9>] netif_receive_skb+0x2bc/0x2ec
 [<c0218994>] process_backlog+0x6b/0xd0
 [<c021675a>] net_rx_action+0x4b/0xb7
 [<c0115606>] __do_softirq+0x35/0x7d
 [<c0104294>] do_softirq+0x38/0x3f

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: H.323 helper: fix endless loop caused by invalid TPKT len
Patrick McHardy [Thu, 4 May 2006 06:16:29 +0000 (23:16 -0700)]
[NETFILTER]: H.323 helper: fix endless loop caused by invalid TPKT len

When the TPKT len included in the packet is below the lowest valid value
of 4 an underflow occurs which results in an endless loop.

Found by testcase 0000058 from the PROTOS c07-h2250v4 testsuite.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PATCH] splice: redo page lookup if add_to_page_cache() returns -EEXIST
Jens Axboe [Wed, 3 May 2006 08:58:22 +0000 (10:58 +0200)]
[PATCH] splice: redo page lookup if add_to_page_cache() returns -EEXIST

This can happen quite easily, if several processes are trying to splice
the same file at the same time. It's not a failure, it just means someone
raced with us in allocating this file page. So just dump the allocated
page and relookup the original.

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years ago[PATCH] splice: rename remaining info variables to pipe
Jens Axboe [Wed, 3 May 2006 08:41:33 +0000 (10:41 +0200)]
[PATCH] splice: rename remaining info variables to pipe

Same thing was done in fs/pipe.c and most of fs/splice.c, but we had
a few missing still.

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years ago[PATCH] splice: LRU fixups
Jens Axboe [Wed, 3 May 2006 08:35:26 +0000 (10:35 +0200)]
[PATCH] splice: LRU fixups

Nick says that the current construct isn't safe. This goes back to the
original, but sets PIPE_BUF_FLAG_LRU on user pages as well as they all
seem to be on the LRU in the first place.

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years ago[PATCH] splice: fix unlocking of page on error ->prepare_write()
Jens Axboe [Wed, 3 May 2006 08:35:10 +0000 (10:35 +0200)]
[PATCH] splice: fix unlocking of page on error ->prepare_write()

Looking at generic_file_buffered_write(), we need to unlock_page() if
prepare write fails and it isn't due to racing with truncate().

Also trim the size if ->prepare_write() fails, if we have to.

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years ago[PATCH] ext3: multile block allocate little endian fixes
Mingming Cao [Thu, 4 May 2006 02:55:12 +0000 (19:55 -0700)]
[PATCH] ext3: multile block allocate little endian fixes

Some places in ext3 multiple block allocation code (in 2.6.17-rc3) don't
handle the little endian well.  This was resulting in *wrong* block numbers
being assigned to in-memory block variables and then stored on disk
eventually.  The following patch has been verified to fix an ext3
filesystem failure when run ltp test on a 64 bit machine.

Signed-off-by; Mingming Cao <cmm@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Altix: correct ioc4 port order
Brent Casavant [Thu, 4 May 2006 02:55:10 +0000 (19:55 -0700)]
[PATCH] Altix: correct ioc4 port order

Currently loading the ioc3 as a module will cause the ports to be numbered
in reverse order.  This mod maintains the proper order of cards for port
numbering.

Signed-off-by: Brent Casavant <bcasavan@sgi.com>
Cc: Pat Gefre <pfg@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] EDAC Coexistence with BIOS
mark gross [Thu, 4 May 2006 02:55:07 +0000 (19:55 -0700)]
[PATCH] EDAC Coexistence with BIOS

Address the issue of EDAC/BIOS coexistence for the e752x chip-sets.

We have found a problem where the BIOS will start the system with the error
registers (dev0:fun1) hidden and assuming it has exclusive access to them.
The edac driver violates this assumption.

The workaround this patch offers is to honor the hidden-ness as an
indication that it is not safe to use those registers.

Signed-off-by: Mark Gross <mark.gross@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: change timer initialization
Jeff Dike [Thu, 4 May 2006 02:55:03 +0000 (19:55 -0700)]
[PATCH] uml: change timer initialization

inet_init, which schedules, is called before the UML timer_init, which sets
up the timer.  The result is the interval timers being manipulated before
the appropriate signal handlers are established, causing unhandled timers.

This is fixed by making timer_init be called earlier.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Remove wrong cpu_has_apic checks that came from mismerging
Andi Kleen [Thu, 4 May 2006 02:54:57 +0000 (19:54 -0700)]
[PATCH] Remove wrong cpu_has_apic checks that came from mismerging

We only need to check cpu_has_apic in the IO-APIC/L-APIC parsing, not for
all of ACPI.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[SPARC]: Hook up vmsplice into syscall tables.
David S. Miller [Wed, 3 May 2006 20:55:46 +0000 (13:55 -0700)]
[SPARC]: Hook up vmsplice into syscall tables.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PATCH] selinux: Clear selinux_enabled flag upon runtime disable.
Stephen Smalley [Wed, 3 May 2006 14:52:36 +0000 (10:52 -0400)]
[PATCH] selinux: Clear selinux_enabled flag upon runtime disable.

Clear selinux_enabled flag upon runtime disable of SELinux by userspace,
and make sure it is defined even if selinux= boot parameter support is
not enabled in configuration.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: James Morris <jmorris@namei.org>
Tested-by: Jon Smirl <jonsmirl@gmail.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] powerpc: Use the ibm,pa-features property if available
Paul Mackerras [Wed, 3 May 2006 13:04:37 +0000 (23:04 +1000)]
[PATCH] powerpc: Use the ibm,pa-features property if available

Forthcoming IBM machines will have a "ibm,pa-features" property on CPU
nodes, that contains bits indicating which optional architecture
features are implemented by the CPU.  This adds code to use the
property, if present, to update our CPU feature bitmaps.  Note that
this means we can both set and clear feature bits based on what
the firmware tells us.

This is based on a patch by Will Schmidt <willschm@us.ibm.com>.

Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years agopowerpc: Fix incorrect might_sleep in __get_user/__put_user on kernel addresses
Paul Mackerras [Wed, 3 May 2006 13:02:04 +0000 (23:02 +1000)]
powerpc: Fix incorrect might_sleep in __get_user/__put_user on kernel addresses

We have a case where __get_user and __put_user can validly be used
on kernel addresses in interrupt context - namely, the alignment
exception handler, as our get/put_unaligned just do a single access
and rely on the alignment exception handler to fix things up in the
rare cases where the cpu can't handle it in hardware.  Thus we can
get alignment exceptions in the network stack at interrupt level.
The alignment exception handler does a __get_user to read the
instruction and blows up in might_sleep().

Since a __get_user on a kernel address won't actually ever sleep,
this makes the might_sleep conditional on the address being less
than PAGE_OFFSET.

Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] ppc32 CPM_UART: fixes and improvements
Vitaly Bordug [Sat, 29 Apr 2006 19:06:00 +0000 (23:06 +0400)]
[PATCH] ppc32 CPM_UART: fixes and improvements

A number of small issues are fixed, and added the header file, missed from the
original series. With this, driver should be pretty stable as tested among
both platform-device-driven and "old way" boards. Also added missing GPL
statement , and updated year field on existing ones to reflect
code update.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] ppc32 CPM_UART: Fixed break send on SCC
Vitaly Bordug [Sat, 29 Apr 2006 18:32:44 +0000 (22:32 +0400)]
[PATCH] ppc32 CPM_UART: Fixed break send on SCC

SCC uart sends a break sequence each time it is stopped with the
CPM_CR_STOP_TX command. That means that each time an application closes the
serial device, a break is transmitted. To fix this, graceful tx stop is
issued for SCC.

Signed-off-by: David Jander <david.jander@protonic.nl>
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc/kprobes: fix singlestep out-of-line
Ananth N Mavinakayanahalli [Fri, 28 Apr 2006 12:08:42 +0000 (17:38 +0530)]
[PATCH] powerpc/kprobes: fix singlestep out-of-line

We currently single-step inline if the instruction on which a kprobe is
inserted is a trap variant.

- variants (such as tdnei, used by BUG()) typically evaluate a condition
  and cause a trap only if the condition is satisfied.
- kprobes uses the unconditional "trap" (0x7fe00008) and single-stepping
  again on this instruction, resulting in another trap without
  evaluating the condition is obviously incorrect.

Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[PATCH] powerpc/pseries: avoid crash in PCI code if mem system not up
Linas Vepstas [Thu, 27 Apr 2006 09:31:20 +0000 (02:31 -0700)]
[PATCH] powerpc/pseries: avoid crash in PCI code if mem system not up

The powerpc code is currently performing PCI setup before memory
initialization.  PCI setup touches PCI config space registers.  If the PCI
card is bad, this will evoke an error, which currrently can't be handled,
as the PCI error recovery code expects kmalloc() to be functional.  This
patch will cause the system to punt instead of crashing with

cpu 0x0: Vector: 300 (Data Access) at [c0000000004434d0]
    pc: c0000000000c06b4: .kmem_cache_alloc+0x8c/0xf4
    lr: c00000000004ad6c: .eeh_send_failure_event+0x48/0xfc

This patch will also print name of the offending pci device.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 years ago[NETFILTER] SCTP conntrack: fix infinite loop
Patrick McHardy [Tue, 2 May 2006 21:23:07 +0000 (23:23 +0200)]
[NETFILTER] SCTP conntrack: fix infinite loop

fix infinite loop in the SCTP-netfilter code: check SCTP chunk size to
guarantee progress of for_each_sctp_chunk(). (all other uses of
for_each_sctp_chunk() are preceded by do_basic_checks(), so this fix
should be complete.)

Based on patch from Ingo Molnar <mingo@elte.hu>

CVE-2006-1527

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[ARM] 3488/1: make icedcc_putc do the right thing
Uwe Zeisberger [Tue, 2 May 2006 19:40:56 +0000 (20:40 +0100)]
[ARM] 3488/1: make icedcc_putc do the right thing

Patch from Uwe Zeisberger

 a) use coprocessor 14
 b) make reading the dcc status volatile

Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years agoforcedeth: fix multi irq issues
Ayaz Abdulla [Tue, 2 May 2006 19:26:06 +0000 (15:26 -0400)]
forcedeth: fix multi irq issues

This patch fixes the issues with multiple irqs.

I am resending based on feedback. I decoupled the dma mask for
consistent memory and fixed leak with multiple irq in error path.

Thanks to Manfred for catching the spin lock problem.

Signed-Off-By: Ayaz Abdulla <aabdulla@nvidia.com>
18 years ago[PATCH] via-rhine: zero pad short packets on Rhine I ethernet cards
Craig Brind [Thu, 27 Apr 2006 09:30:46 +0000 (02:30 -0700)]
[PATCH] via-rhine: zero pad short packets on Rhine I ethernet cards

Fixes Rhine I cards disclosing fragments of previously transmitted frames
in new transmissions.

Before transmission, any socket buffer (skb) shorter than the ethernet
minimum length of 60 bytes was zero-padded.  On Rhine I cards the data can
later be copied into an aligned transmission buffer without copying this
padding.  This resulted in the transmission of the frame with the extra
bytes beyond the provided content leaking the previous contents of this
buffer on to the network.

Now zero-padding is repeated in the local aligned buffer if one is used.

Following a suggestion from the via-rhine maintainer, no attempt is made
here to avoid the duplicated effort of padding the skb if it is known that
an aligned buffer will definitely be used.  This is to make the change
"obviously correct" and allow it to be applied to a stable kernel if
necessary.  There is no change to the flow of control and the changes are
only to the Rhine I code path.

The patch has run on an in-service Rhine-I host without incident.  Frames
shorter than 60 bytes are now correctly zero-padded when captured on a
separate host.  I see no unusual stats reported by ifconfig, and no unusual
log messages.

Signed-off-by: Craig Brind <craigbrind@gmail.com>
Signed-off-by: Roger Luethi <rl@hellgate.ch>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
18 years ago[PATCH] mv643xx_eth: provide sysfs class device symlink
Olaf Hering [Fri, 28 Apr 2006 01:23:49 +0000 (18:23 -0700)]
[PATCH] mv643xx_eth: provide sysfs class device symlink

On Sat, Mar 11, Olaf Hering wrote:
> Why is the /sys/class/net/eth0/device symlink not created for the
> mv643xx_eth driver? Does this work for other platform device drivers?
> Seems to work for the ps2 keyboard at least.

The SET_NETDEV_DEV has to be done before a call to register_netdev.  With
the new patch below, the device symlink for the platform device was
created.  Unfortunately, after the 4 ls commands, the network connection
died.  No idea if the box crashed or if something else broke, lost remote
access.

Provide sysfs 'device' in /class/net/ethN Also, set module owner field,
like pcnet32 driver does.

Signed-off-by: Olaf Hering <olh@suse.de>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
18 years ago[MMC] PXA: reduce the number of lines PXAMCI debug uses
Russell King [Tue, 2 May 2006 19:18:53 +0000 (20:18 +0100)]
[MMC] PXA: reduce the number of lines PXAMCI debug uses

There's no reason for the PXAMCI debug code to print so many lines - it
causes the kernel buffer to overflow when trying to debug this driver.
Remove some debug messages which are duplicated by core code, and
combine other messages, resulting in fewer characters written to the
kernel log.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[MMC] PXA and i.MX: don't avoid sending stop command on error
Russell King [Tue, 2 May 2006 19:02:39 +0000 (20:02 +0100)]
[MMC] PXA and i.MX: don't avoid sending stop command on error

Always send a stop command at the end of a data transfer.  If we avoid
sending the stop command, some cards remain in data transfer mode, and
refuse to accept further read/write commands.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[MMC] extend data timeout for writes
Russell King [Tue, 2 May 2006 16:24:59 +0000 (17:24 +0100)]
[MMC] extend data timeout for writes

The CSD contains a "read2write factor" which determines the multiplier to
be applied to the read timeout to obtain the write timeout.  We were
ignoring this parameter, resulting in the possibility for writes being
timed out too early.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[PATCH] vmsplice: restrict stealing a little more
Jens Axboe [Tue, 2 May 2006 13:29:57 +0000 (15:29 +0200)]
[PATCH] vmsplice: restrict stealing a little more

Apply the same rules as the anon pipe pages, only allow stealing
if no one else is using the page.

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years ago[PATCH] splice: fix page LRU accounting
Jens Axboe [Tue, 2 May 2006 13:03:27 +0000 (15:03 +0200)]
[PATCH] splice: fix page LRU accounting

Currently we rely on the PIPE_BUF_FLAG_LRU flag being set correctly
to know whether we need to fiddle with page LRU state after stealing it,
however for some origins we just don't know if the page is on the LRU
list or not.

So remove PIPE_BUF_FLAG_LRU and do this check/add manually in pipe_to_file()
instead.

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years ago[PATCH] vmsplice: fix badly placed end paranthesis
Jens Axboe [Tue, 2 May 2006 10:57:18 +0000 (12:57 +0200)]
[PATCH] vmsplice: fix badly placed end paranthesis

We need to use the minium of {len, PAGE_SIZE-off}, not {len, PAGE_SIZE}-off.
The latter doesn't make any sense, and could cause us to attempt negative
length transfers...

Signed-off-by: Jens Axboe <axboe@suse.de>
18 years agoMerge branch 'audit.b10' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit...
Linus Torvalds [Tue, 2 May 2006 04:43:05 +0000 (21:43 -0700)]
Merge branch 'audit.b10' of git://git./linux/kernel/git/viro/audit-current

* 'audit.b10' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current:
  [PATCH] Audit Filter Performance
  [PATCH] Rework of IPC auditing
  [PATCH] More user space subject labels
  [PATCH] Reworked patch for labels on user space messages
  [PATCH] change lspp ipc auditing
  [PATCH] audit inode patch
  [PATCH] support for context based audit filtering, part 2
  [PATCH] support for context based audit filtering
  [PATCH] no need to wank with task_lock() and pinning task down in audit_syscall_exit()
  [PATCH] drop task argument of audit_syscall_{entry,exit}
  [PATCH] drop gfp_mask in audit_log_exit()
  [PATCH] move call of audit_free() into do_exit()
  [PATCH] sockaddr patch
  [PATCH] deal with deadlocks in audit_free()

18 years ago[NETFILTER] x_tables: fix compat related crash on non-x86
Patrick McHardy [Tue, 2 May 2006 03:12:22 +0000 (05:12 +0200)]
[NETFILTER] x_tables: fix compat related crash on non-x86

When iptables userspace adds an ipt_standard_target, it calculates the size
of the entire entry as:

sizeof(struct ipt_entry) + XT_ALIGN(sizeof(struct ipt_standard_target))

ipt_standard_target looks like this:

  struct xt_standard_target
  {
        struct xt_entry_target target;
        int verdict;
  };

xt_entry_target contains a pointer, so when compiled for 64 bit the
structure gets an extra 4 byte of padding at the end. On 32 bit
architectures where iptables aligns to 8 byte it will also have 4
byte padding at the end because it is only 36 bytes large.

The compat_ipt_standard_fn in the kernel adjusts the offsets by

  sizeof(struct ipt_standard_target) - sizeof(struct compat_ipt_standard_target),

which will always result in 4, even if the structure from userspace
was already padded to a multiple of 8. On x86 this works out by
accident because userspace only aligns to 4, on all other
architectures this is broken and causes incorrect adjustments to
the size and following offsets.

Thanks to Linus for lots of debugging help and testing.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge branch 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block
Linus Torvalds [Tue, 2 May 2006 01:33:40 +0000 (18:33 -0700)]
Merge branch 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block

* 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block:
  [PATCH] vmsplice: allow user to pass in gift pages
  [PATCH] pipe: enable atomic copying of pipe data to/from user space
  [PATCH] splice: call handle_ra_miss() on failure to lookup page
  [PATCH] Add ->splice_read/splice_write to def_blk_fops
  [PATCH] pipe: introduce ->pin() buffer operation
  [PATCH] splice: fix bugs in pipe_to_file()
  [PATCH] splice: fix bugs with stealing regular pipe pages

18 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Tue, 2 May 2006 01:26:31 +0000 (18:26 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/ipath: tidy up white space in a few files
  IB/ipath: fix label name in interrupt handler
  IB/ipath: improve sparse annotation
  IB/ipath: simplify IB timer usage
  IB/ipath: simplify RC send posting
  IB/ipath: prevent hardware from being accessed during reset
  IB/ipath: fix verbs registration
  IB/ipath: change handling of PIO buffers
  IB/ipath: iterate over correct number of ports during reset
  IB/ipath: set up 32-bit DMA mask if 64-bit setup fails
  IB/ipath: fix race with exposing reset file
  IB/mthca: Fix offset in query_gid method

18 years ago[PATCH] timer TSC check suspend notifier change
Shaohua Li [Mon, 1 May 2006 19:16:19 +0000 (12:16 -0700)]
[PATCH] timer TSC check suspend notifier change

At suspend time, the TSC CPUFREQ_SUSPENDCHANGE notifier change might
wrongly enable interrupt.  cpufreq driver suspend/resume is in interrupt
disabled environment.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] x86_64: make PC Speaker driver work
Mikael Pettersson [Mon, 1 May 2006 19:16:18 +0000 (12:16 -0700)]
[PATCH] x86_64: make PC Speaker driver work

The PC Speaker driver's ->probe() routine doesn't even get called in the
64-bit kernels.  The reason for that is that the arch code apparently has
to explictly add a "pcspkr" platform device in order for the driver core to
call the ->probe() routine.  arch/i386/kernel/setup.c unconditionally adds
a "pcspkr" device, but the x86_64 kernel has no code at all related to the
PC Speaker.

The patch below copies the relevant code from i386 to x86_64, which makes
the PC Speaker work for me on x86_64.

Cc: Dmitry Torokhov <dtor_core@ameritech.net>
Acked-by: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] genrtc: fix read on 64-bit platforms
Atsushi Nemoto [Mon, 1 May 2006 19:16:17 +0000 (12:16 -0700)]
[PATCH] genrtc: fix read on 64-bit platforms

Fix genrtc's read() routine for 64-bit platforms.  Current gen_rtc_read()
stores 64bit integer and returns 8 even if an user tried to read a 32bit
integer.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] RTC: rtc-dev tweak for 64-bit kernel
Atsushi Nemoto [Mon, 1 May 2006 19:16:16 +0000 (12:16 -0700)]
[PATCH] RTC: rtc-dev tweak for 64-bit kernel

Make rtc-dev work well on 64-bit platforms with 32-bit userland.  On those
platforms, users might try to read 32-bit integer value.  This patch make
rtc-dev's read() work well for both "int" and "long" size.  This tweak is came
from genrtc driver.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] s390: bug in setup_rt_frame
Heiko Carstens [Mon, 1 May 2006 19:16:15 +0000 (12:16 -0700)]
[PATCH] s390: bug in setup_rt_frame

Consider return value of __put_user() when setting up a signal frame
instead of ignoring it.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] s390: fix ipd handling
Heiko Carstens [Mon, 1 May 2006 19:16:14 +0000 (12:16 -0700)]
[PATCH] s390: fix ipd handling

As pointed out by Paulo Marques <pmarques@grupopie.com> MAX_IPD_TIME is by
a factor of ten too small.  Since this means that we allow ten times more
IPDs in the intended time frame this could result in a cpu check stop of a
physical cpu.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] powerpc: cell: Add numa id to struct spu
Jeremy Kerr [Mon, 1 May 2006 19:16:13 +0000 (12:16 -0700)]
[PATCH] powerpc: cell: Add numa id to struct spu

Add an nid member to the spu structure, and store the numa id of the spu there
on creation.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] powerpc: Allow devices to register with numa topology
Jeremy Kerr [Mon, 1 May 2006 19:16:12 +0000 (12:16 -0700)]
[PATCH] powerpc: Allow devices to register with numa topology

Change of_node_to_nid() to traverse the device tree, looking for a numa id.
Cell uses this to assign ids to SPUs, which are children of the CPU node.
Existing users of of_node_to_nid() are altered to use of_node_to_nid_single(),
which doesn't do the traversal.

Export an attach_sysdev_to_node() function, allowing system devices (eg.
SPUs) to link themselves into the numa topology in sysfs.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] spufs: fix for CONFIG_NUMA
Joel H Schopp [Mon, 1 May 2006 19:16:11 +0000 (12:16 -0700)]
[PATCH] spufs: fix for CONFIG_NUMA

Based on an older patch from  Mike Kravetz <kravetz@us.ibm.com>

We need to have a mem_map for high addresses in order to make fops->no_page
work on spufs mem and register files.  So far, we have used the
memory_present() function during early bootup, but that did not work when
CONFIG_NUMA was enabled.

We now use the __add_pages() function to add the mem_map when loading the
spufs module, which is a lot nicer.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sparsemem interaction with memory add bug fixes
Mike Kravetz [Mon, 1 May 2006 19:16:09 +0000 (12:16 -0700)]
[PATCH] sparsemem interaction with memory add bug fixes

This patch fixes two bugs with the way sparsemem interacts with memory add.
They are:

- memory leak if memmap for section already exists

- calling alloc_bootmem_node() after boot

These bugs were discovered and a first cut at the fixes were provided by
Arnd Bergmann <arnd@arndb.de> and Joel Schopp <jschopp@us.ibm.com>.

Signed-off-by: Mike Kravetz <kravetz@us.ibm.com>
Signed-off-by: Joel Schopp <jschopp@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Altix: correct ioc3 port order
Pat Gefre [Mon, 1 May 2006 19:16:08 +0000 (12:16 -0700)]
[PATCH] Altix: correct ioc3 port order

Currently loading the ioc3 as a module will cause the ports to be numbered
in reverse order.  This mod maintains the proper order of cards for port
numbering.

Signed-off-by: Patrick Gefre <pfg@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] page migration: Fix fallback behavior for dirty pages
Christoph Lameter [Mon, 1 May 2006 19:16:08 +0000 (12:16 -0700)]
[PATCH] page migration: Fix fallback behavior for dirty pages

Currently we check PageDirty() in order to make the decision to swap out
the page.  However, the dirty information may be only be contained in the
ptes pointing to the page.  We need to first unmap the ptes before checking
for PageDirty().  If unmap is successful then the page count of the page
will also be decreased so that pageout() works properly.

This is a fix necessary for 2.6.17.  Without this fix we may migrate dirty
pages for filesystems without migration functions.  Filesystems may keep
pointers to dirty pages.  Migration of dirty pages can result in the
filesystem keeping pointers to freed pages.

Unmapping is currently not be separated out from removing all the
references to a page and moving the mapping.  Therefore try_to_unmap will
be called again in migrate_page() if the writeout is successful.  However,
it wont do anything since the ptes are already removed.

The coming updates to the page migration code will restructure the code
so that this is no longer necessary.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: uml-makefile-nicer uses SYMLINK incorrectly
Jeff Dike [Mon, 1 May 2006 19:16:06 +0000 (12:16 -0700)]
[PATCH] uml: uml-makefile-nicer uses SYMLINK incorrectly

Blaisorblade's uml-makefile-nicer makes a V=0 build say SYMLINK where
what's happening is really a LINK.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Acked-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: export symbols added by GCC hardened
Paolo 'Blaisorblade' Giarrusso [Mon, 1 May 2006 19:16:06 +0000 (12:16 -0700)]
[PATCH] uml: export symbols added by GCC hardened

GCC hardened introduces additional symbol refererences (for the canary and
friends), also in modules - add weak export_symbols for them.  We already
tested that the weak declaration creates no problem on both GCC's providing
the function definition and on GCC's which don't provide it.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: cleanup unprofile expression and build infrastructure
Paolo 'Blaisorblade' Giarrusso [Mon, 1 May 2006 19:16:05 +0000 (12:16 -0700)]
[PATCH] uml: cleanup unprofile expression and build infrastructure

*) Rather than duplicate in various buggy ways the application of
   CFLAGS_NO_HARDENING and UNPROFILE (which apply to the same files),
   centralize it in Makefile.rules.  UNPROFILE_OBJS mustn't be listed in
   USER_OBJS but are compiled as such.

I've also verified that unprofile didn't work in the current form, because we
set _c_flags directly (using CFLAGS and not USER_CFLAGS, which is wrong),
which is normally used by c_flags, but we also override c_flags for all
USER_OBJS, and there we don't call unprofile.

Instead it only worked for unmap.o, the only one which wasn't a USER_OBJ.

We need to set c_flags (which is not a public Kbuild API) to clear a lot of
compilation flags like -nostdinc which Kbuild forces on everything.

*) Rather than $(CFLAGS_$(notdir $@)), which expands to CFLAGS_anObj.s when
   building "anObj.s", use $(CFLAGS_$(*F).o) which always accesses
   CFLAGS_anObj.o, like done by Kbuild.

*) Make c_flags apply to all targets having the same basename, rather than
   listing .s, .i, .lst and .o, with the use (which I tested) of

$(USER_OBJS:.o=.%): c_flags = ...

and of

 -      $(obj)/unmap.c: _c_flags = ...
 +      $(obj)/unmap.%: _c_flags = ...

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>