]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
17 years ago[PATCH] bcm43xx: fix watchdog timeouts.
Michael Buesch [Fri, 27 Oct 2006 16:16:39 +0000 (11:16 -0500)]
[PATCH] bcm43xx: fix watchdog timeouts.

This fixes a netdev watchdog timeout problem.
The problem is caused by a needed netif_tx_disable
in the hardware calibration code and can be shown by the
following timegraph.

|---5secs - ~10 jiffies time---|---|OOPS
^                              ^
last real TX                   periodic work stops netif

At OOPS, the following happens:
The watchdog timer triggers, because the timeout of 5secs
is over. The watchdog first checks for stopped TX.
_Usually_ TX is only stopped from the TX handler to indicate
a full TX queue. But this is different. We need to stop TX here,
regardless of the TX queue state. So the watchdog recognizes
the stopped device and assumes it is stopped due to full
TX queues (Which is a _wrong_ assumption in this case). It then
tests how far the last TX has been in the past. If it's more than
5secs (which is the case for low or no traffic), it will fire
a TX timeout.

Acked-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] SPARC64: Fix memory corruption in pci_4u_free_consistent().
David Miller [Thu, 26 Oct 2006 06:51:07 +0000 (23:51 -0700)]
[PATCH] SPARC64: Fix memory corruption in pci_4u_free_consistent().

The second argument to free_npages() was being incorrectly
calculated, which would thus access far past the end of the
arena->map[] bitmap.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] SPARC64: Fix central/FHC bus handling on Ex000 systems.
David Miller [Thu, 26 Oct 2006 06:50:12 +0000 (23:50 -0700)]
[PATCH] SPARC64: Fix central/FHC bus handling on Ex000 systems.

1) probe_other_fhcs() wants to see only non-central FHC
   busses, so skip FHCs that don't sit off the root

2) Like SBUS, FHC can lack the appropriate address and
   size cell count properties, so add an of_busses[]
   entry and handlers for that.

3) Central FHC irq translator probing was buggy.  We
   were trying to use dp->child in irq_trans_init but
   that linkage is not setup at this point.

   So instead, pass in the parent of "dp" and look for
   the child "fhc" with parent "central".

Thanks to the tireless assistence of Ben Collins in tracking
down these problems and testing out these fixes.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] JFS: pageno needs to be long
Dave Kleikamp [Mon, 23 Oct 2006 17:00:13 +0000 (17:00 +0000)]
[PATCH] JFS: pageno needs to be long

JFS: pageno needs to be long

diRead and diWrite are representing the page number as an unsigned int.
This causes file system corruption on volumes larger than 16TB.

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] Bluetooth: Check if DLC is still attached to the TTY
Marcel Holtmann [Mon, 16 Oct 2006 15:59:28 +0000 (15:59 +0000)]
[PATCH] Bluetooth: Check if DLC is still attached to the TTY

[Bluetooth] Check if DLC is still attached to the TTY

If the DLC device is no longer attached to the TTY device, then it
makes no sense to go through with changing the termios settings.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] SERIAL: Fix oops when removing suspended serial port
Russell King [Tue, 17 Oct 2006 11:26:34 +0000 (13:26 +0200)]
[PATCH] SERIAL: Fix oops when removing suspended serial port

[SERIAL] Fix oops when removing suspended serial port

A serial card might have been removed when the system is resumed.
This results in a suspended port being shut down, which results in
the ports shutdown method being called twice in a row.  This causes
BUGs.  Avoid this by tracking the suspended state separately from
the initialised state.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: maximilian attems <maks@sternwelten.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] SERIAL: Fix resume handling bug
Russell King [Tue, 17 Oct 2006 11:19:40 +0000 (13:19 +0200)]
[PATCH] SERIAL: Fix resume handling bug

Unfortunately, pcmcia_dev_present() returns false when a device is
suspended, so checking this on resume does not work too well.  Omit
this test.

the backported patch below is already in fedora tree. -maks

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: maximilian attems <maks@sternwelten.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] Fix uninitialised spinlock in via-pmu-backlight code.
David Woodhouse [Fri, 29 Sep 2006 17:01:11 +0000 (17:01 +0000)]
[PATCH] Fix uninitialised spinlock in via-pmu-backlight code.

The uninitialised pmu_backlight_lock causes the current Fedora test kernel
(which has spinlock debugging enabled) to panic on suspend.

This is suboptimal, so I fixed it.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Michael Hanselmann <linux-kernel@hansmi.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] SCSI: DAC960: PCI id table fixup
Brian King [Sun, 24 Sep 2006 03:59:49 +0000 (03:59 +0000)]
[PATCH] SCSI: DAC960: PCI id table fixup

[SCSI] DAC960: PCI id table fixup

The PCI ID table in the DAC960 driver conflicts with some devices
that use the ipr driver. All ipr adapters that use this chip
have an IBM subvendor ID and all DAC960 adapters that use this
chip have a Mylex subvendor id.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] uml: fix processor selection to exclude unsupported processors and features
Paolo 'Blaisorblade' Giarrusso [Sun, 15 Oct 2006 19:43:29 +0000 (21:43 +0200)]
[PATCH] uml: fix processor selection to exclude unsupported processors and features

Makes UML compile on any possible processor choice. The two problems were:

*) x86 code, when 386 is selected, checks at runtime boot_cpuflags, which we do
   not have.
*) 3Dnow support for memcpy() et al. does not compile currently and fixing this
   is not trivial, so simply disable it; with this change, if one selects MK7
   UML compiles (while it did not).
Merged upstream.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] sky2: GMAC pause frame
Stephen Hemminger [Mon, 16 Oct 2006 21:10:16 +0000 (14:10 -0700)]
[PATCH] sky2: GMAC pause frame

This reverts earlier change that attempted to fix flow control.
Device needs to discard pause frames, otherwise it passes pause frames up
the stack.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] sky2: accept multicast pause frames
Stephen Hemminger [Mon, 16 Oct 2006 21:08:56 +0000 (14:08 -0700)]
[PATCH] sky2: accept multicast pause frames

When using flow control, the PHY needs to accept multicast pause frames.
Without this fix, these frames were getting discarded by the PHY before
doing any flow control.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] ALSA: Repair snd-usb-usx2y for usb 2.6.18
Karsten Wiese [Mon, 16 Oct 2006 12:46:53 +0000 (14:46 +0200)]
[PATCH] ALSA: Repair snd-usb-usx2y for usb 2.6.18

ALSA: Repair snd-usb-usx2y for usb 2.6.18

urb->start_frame rolls over beyond MAX_INT now.
This is for stable kernel and stable alsa.

From: Karsten Wiese <annabellesgarden@yahoo.de>
Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] ALSA: Fix bug in snd-usb-usx2y's usX2Y_pcms_lock_check()
Karsten Wiese [Mon, 16 Oct 2006 12:45:14 +0000 (14:45 +0200)]
[PATCH] ALSA: Fix bug in snd-usb-usx2y's usX2Y_pcms_lock_check()

Fix bug in snd-usb-usx2y's usX2Y_pcms_lock_check()

substream can be NULL......
in mainline, bug was introduced by:
2006-06-22  [ALSA] Add O_APPEND flag support to PCM

From: Karsten Wiese <annabellesgarden@yahoo.de>
Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] ALSA: Dereference after free in snd_hwdep_release()
Florin Malita [Mon, 16 Oct 2006 12:43:43 +0000 (14:43 +0200)]
[PATCH] ALSA: Dereference after free in snd_hwdep_release()

snd_card_file_remove() may free hw->card so we can't dereference
hw->card->module after that.

Coverity ID 1420.

This bug actually causes an Oops at usb-disconnection, especially
with CONFIG_PREEMPT.

From: Florin Malita <fmalita@gmail.com>
Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] sound/pci/au88x0/au88x0.c: ioremap balanced with iounmap
Amol Lad [Mon, 16 Oct 2006 12:39:03 +0000 (14:39 +0200)]
[PATCH] sound/pci/au88x0/au88x0.c: ioremap balanced with iounmap

From: Amol Lad <amol@verismonetworks.com>
Signed-off-by: Amol Lad <amol@verismonetworks.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] ALSA: powermac - Fix Oops when conflicting with aoa driver
Takashi Iwai [Mon, 16 Oct 2006 12:37:31 +0000 (14:37 +0200)]
[PATCH] ALSA: powermac - Fix Oops when conflicting with aoa driver

Fixed Oops when conflictin with aoa driver due to lack of
i2c initialization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] ALSA: emu10k1: Fix outl() in snd_emu10k1_resume_regs()
Arnaud Patard [Mon, 16 Oct 2006 12:35:57 +0000 (14:35 +0200)]
[PATCH] ALSA: emu10k1: Fix outl() in snd_emu10k1_resume_regs()

The emu10k1 driver saves the A_IOCFG and HCFG register on suspend and restores
it on resumes. Unfortunately, this doesn't work as the arguments to outl() are
reversed.

From: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] sky2: turn off PHY IRQ on shutdown
Stephen Hemminger [Thu, 12 Oct 2006 22:32:42 +0000 (15:32 -0700)]
[PATCH] sky2: turn off PHY IRQ on shutdown

When PHY is turned off on shutdown, it can causes the IRQ to get stuck on.
Make sure and disable the IRQ first, and if IRQ occurs when device
is not running, don't access PHY because that can hang.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] sky2: pause parameter adjustment
Stephen Hemminger [Thu, 12 Oct 2006 22:34:24 +0000 (15:34 -0700)]
[PATCH] sky2: pause parameter adjustment

The lower pause threshold set by the driver is too large and causes FIFO overruns.
Especially on laptops running at slower clock rates.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] sky2: MSI test race and message
Stephen Hemminger [Thu, 12 Oct 2006 22:38:11 +0000 (15:38 -0700)]
[PATCH] sky2: MSI test race and message

Make sure and do PCI reads after writes in the MSI test setup code.

Some motherboards don't implement MSI correctly. The driver handles this
but the warning is too verbose and overly cautious.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] mm: fix a race condition under SMC + COW
Suresh Siddha [Thu, 12 Oct 2006 16:14:05 +0000 (09:14 -0700)]
[PATCH] mm: fix a race condition under SMC + COW

Failing context is a multi threaded process context and the failing
sequence is as follows.

One thread T0 doing self modifying code on page X on processor P0 and
another thread T1 doing COW (breaking the COW setup as part of just
happened fork() in another thread T2) on the same page X on processor P1.
T0 doing SMC can endup modifying the new page Y (allocated by the T1 doing
COW on P1) but because of different I/D TLB's, P0 ITLB will not see the new
mapping till the flush TLB IPI from P1 is received.  During this interval,
if T0 executes the code created by SMC it can result in an app error (as
ITLB still points to old page X and endup executing the content in page X
rather than using the content in page Y).

Fix this issue by first clearing the PTE and flushing it, before updating
it with new entry.

Hugh sayeth:

  I was a bit sceptical, in the habit of thinking that Self Modifying Code
  must look such issues itself: but I guess there's nothing it can do to avoid
  this one.

  Fair enough, what you're changing it to is pretty much what powerpc and
  s390 were already doing, and is a more robust way of proceeding, consistent
  with how ptes are set everywhere else.

  The ptep_clear_flush is a bit heavy-handed (it's anxious to return the pte
  that was atomically cleared), but we'd have to wander through lots of arches
  to get the right minimal behaviour.  It'd also be nice to eliminate
  ptep_establish completely, now only used to define other macros/inlines: it
  always seemed obfuscation to me, what you've got there now is clearer.
  Let's put those cleanups on a TODO list.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Acked-by: "David S. Miller" <davem@davemloft.net>
Acked-by: Hugh Dickins <hugh@veritas.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] __div64_32 for 31 bit.
Martin Schwidefsky [Thu, 12 Oct 2006 12:41:07 +0000 (14:41 +0200)]
[PATCH] __div64_32 for 31 bit.

The clocksource infrastructure introduced with commit
ad596171ed635c51a9eef829187af100cbf8dcf7 broke 31 bit s390.
The reason is that the do_div() primitive for 31 bit always
had a restriction: it could only divide an unsigned 64 bit
integer by an unsigned 31 bit integer. The clocksource code
now uses do_div() with a base value that has the most
significant bit set. The result is that clock->cycle_interval
has a funny value which causes the linux time to jump around
like mad.
The solution is "obvious": implement a proper __div64_32
function for 31 bit s390.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] splice: fix pipe_to_file() ->prepare_write() error path
Jens Axboe [Thu, 12 Oct 2006 05:59:47 +0000 (07:59 +0200)]
[PATCH] splice: fix pipe_to_file() ->prepare_write() error path

Don't jump to the unlock+release path, we already did that.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years ago[PATCH] Fix sfuzz hanging on 2.6.18
Patrick McHardy [Thu, 12 Oct 2006 08:49:38 +0000 (01:49 -0700)]
[PATCH] Fix sfuzz hanging on 2.6.18

Dave Jones wrote:
> sfuzz         D 724EF62A  2828 28717  28691                     (NOTLB)
>        cd69fe98 00000082 0000012d 724ef62a 0001971a 00000010 00000007 df6d22b0
>        dfd81080 725bbc5e 0001971a 000cc634 00000001 df6d23bc c140e260 00000202
>        de1d5ba0 cd69fea0 de1d5ba0 00000000 00000000 de1d5b60 de1d5b8c de1d5ba0
> Call Trace:
>  [<c05b1708>] lock_sock+0x75/0xa6
>  [<e0b0b604>] dn_getname+0x18/0x5f [decnet]
>  [<c05b083b>] sys_getsockname+0x5c/0xb0
>  [<c05b0b46>] sys_socketcall+0xef/0x261
>  [<c0403f97>] syscall_call+0x7/0xb
> DWARF2 unwinder stuck at syscall_call+0x7/0xb
>
> I wonder if the plethora of lockdep related changes inadvertantly broke something?

Looks like unbalanced locking.

Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
17 years agoLinux 2.6.18.1 v2.6.18.1
Greg Kroah-Hartman [Sat, 14 Oct 2006 03:34:03 +0000 (20:34 -0700)]
Linux 2.6.18.1

17 years agoadd utsrelease.h to the dontdiff file
Dave Jones [Wed, 11 Oct 2006 22:19:24 +0000 (18:19 -0400)]
add utsrelease.h to the dontdiff file

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoV4L: copy-paste bug in videodev.c
Sascha Hauer [Fri, 13 Oct 2006 20:23:28 +0000 (13:23 -0700)]
V4L: copy-paste bug in videodev.c

This patch fixes a copy-paste bug in videodev.c where the vidioc_qbuf()
function gets called for the dqbuf ioctl.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoblock layer: elv_iosched_show should get elv_list_lock
Vasily Tarasov [Wed, 11 Oct 2006 11:23:48 +0000 (13:23 +0200)]
block layer: elv_iosched_show should get elv_list_lock

elv_iosched_show function iterates other elv_list,
hence elv_list_lock should be got.

Also the question is: in elv_iosched_show, elv_iosched_store
q->elevator->elevator_type construction is used without locking q->queue_lock.
Is it expected?..

Signed-off-by: Vasily Tarasov <vtaras@openvz.org>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoNETFILTER: NAT: fix NOTRACK checksum handling
Patrick McHardy [Wed, 11 Oct 2006 08:53:26 +0000 (01:53 -0700)]
NETFILTER: NAT: fix NOTRACK checksum handling

The whole idea with the NOTRACK netfilter target is that
you can force the netfilter code to avoid connection
tracking, and all costs assosciated with it, by making
traffic match a NOTRACK rule.

But this is totally broken by the fact that we do a checksum
calculation over the packet before we do the NOTRACK bypass
check, which is very expensive.  People setup NOTRACK rules
explicitly to avoid all of these kinds of costs.

This patch from Patrick, already in Linus's tree, fixes the
bug.

Move the check for ip_conntrack_untracked before the call to
skb_checksum_help to fix NOTRACK excemptions from NAT. Pre-2.6.19
NAT code breaks TSO by invalidating hardware checksums for every
packet, even if explicitly excluded from NAT through NOTRACK.

2.6.19 includes a fix that makes NAT and TSO live in harmony,
but the performance degradation caused by this deserves making
at least the workaround work properly in -stable.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agobcm43xx: fix regressions in 2.6.18
Larry Finger [Tue, 10 Oct 2006 17:18:26 +0000 (12:18 -0500)]
bcm43xx: fix regressions in 2.6.18

The bcm43xx code in 2.6.18 has a serious problems not found in 2.6.17, due to
a change in the locking mechanism introduced to reduce latency. The following patch
fixes the problems in locking, reduces the latency associated with the periodic
work tasklet, and contains code needed for those cards that use 64-bit DMA.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agox86-64: Calgary IOMMU: Fix off by one when calculating register space location
Jon Mason [Tue, 10 Oct 2006 14:04:23 +0000 (09:04 -0500)]
x86-64: Calgary IOMMU: Fix off by one when calculating register space location

This patch has already been submitted for inclusion in the 2.6.19
tree, but not backported to the 2.6.18.  Please pull the bug fix
below into the stable tree for the 2.6.18.1 release.

The purpose of the code being modified is to determine the location
of the calgary chip address space.  This is done by a magical formula
of FE0MB-8MB*OneBasedChassisNumber+1MB*(RioNodeId-ChassisBase) to
find the offset where BIOS puts it.  In this formula,
OneBasedChassisNumber corresponds to the NUMA node, and rionodeid is
always 2 or 3 depending on which chip in the system it is.  The
problem was that we had an off by one error that caused us to account
some busses to the wrong chip and thus give them the wrong address
space.

Fixes RH bugzilla #203971.

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoide-generic: jmicron fix
Alan Cox [Thu, 5 Oct 2006 21:39:26 +0000 (14:39 -0700)]
ide-generic: jmicron fix

Some people find their Jmicron pata port reports its disabled even
though it has devices on it and was boot probed. Fix this

(Candidate for 2.6.18.*, less so for 2.6.19 as we've got a proper
jmicron driver on the merge for that to replace ide-generic support)

From: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoscx200_hrt: fix precedence bug manifesting as 27x clock in 1 MHz mode
Jim Cromie [Wed, 4 Oct 2006 09:15:35 +0000 (02:15 -0700)]
scx200_hrt: fix precedence bug manifesting as 27x clock in 1 MHz mode

Fix paren-placement / precedence bug breaking initialization for 1 MHz
clock mode.

Also fix comment spelling error, and fence-post (off-by-one) error on
symbol used in request_region.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=7242

Thanks alexander.krause@erazor-zone.de, dzpost@dedekind.net, for the
reports and patch test, and phelps@mantara.com for the independent patch
and verification.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Cc: <alexander.krause@erazor-zone.de>
Cc: <dzpost@dedekind.net>
Cc: <phelps@mantara.com>
Acked-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoinvalidate_inode_pages2(): ignore page refcounts
Andrew Morton [Sun, 1 Oct 2006 06:29:29 +0000 (23:29 -0700)]
invalidate_inode_pages2(): ignore page refcounts

The recent fix to invalidate_inode_pages() (git commit 016eb4a) managed to
unfix invalidate_inode_pages2().

The problem is that various bits of code in the kernel can take transient refs
on pages: the page scanner will do this when inspecting a batch of pages, and
the lru_cache_add() batching pagevecs also hold a ref.

Net result is transient failures in invalidate_inode_pages2().  This affects
NFS directory invalidation (observed) and presumably also block-backed
direct-io (not yet reported).

Fix it by reverting invalidate_inode_pages2() back to the old version which
ignores the page refcounts.

We may come up with something more clever later, but for now we need a 2.6.18
fix for NFS.

Cc: Chuck Lever <cel@citi.umich.edu>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agortc driver rtc-pcf8563 century bit inversed
Jean-Baptiste Maneyrol [Sun, 1 Oct 2006 06:28:12 +0000 (23:28 -0700)]
rtc driver rtc-pcf8563 century bit inversed

The century bit PCF8563_MO_C in the month register is misinterpreted.  It
is set to 1 for the 20th century and 0 for 21th, and the driver is
expecting the opposite behavior.

Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agofbdev: correct buffer size limit in fbmem_read_proc()
Geert Uytterhoeven [Tue, 3 Oct 2006 08:15:11 +0000 (01:15 -0700)]
fbdev: correct buffer size limit in fbmem_read_proc()

Address http://bugzilla.kernel.org/show_bug.cgi?id=7189

It should check `clen', not `len'.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: <jurij@wooyd.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agomm: bug in set_page_dirty_buffers
Nick Piggin [Tue, 10 Oct 2006 02:36:54 +0000 (04:36 +0200)]
mm: bug in set_page_dirty_buffers

This was triggered, but not the fault of, the dirty page accounting
patches. Suitable for -stable as well, after it goes upstream.

Unable to handle kernel NULL pointer dereference at virtual address 0000004c
EIP is at _spin_lock+0x12/0x66
Call Trace:
 [<401766e7>] __set_page_dirty_buffers+0x15/0xc0
 [<401401e7>] set_page_dirty+0x2c/0x51
 [<40140db2>] set_page_dirty_balance+0xb/0x3b
 [<40145d29>] __do_fault+0x1d8/0x279
 [<40147059>] __handle_mm_fault+0x125/0x951
 [<401133f1>] do_page_fault+0x440/0x59f
 [<4034d0c1>] error_code+0x39/0x40
 [<08048a33>] 0x8048a33
 =======================

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoTCP: Fix and simplify microsecond rtt sampling
David Miller [Thu, 28 Sep 2006 21:50:30 +0000 (14:50 -0700)]
TCP: Fix and simplify microsecond rtt sampling

This changes the microsecond RTT sampling so that samples are taken in
the same way that RTT samples are taken for the RTO calculator: on the
last segment acknowledged, and only when the segment hasn't been
retransmitted.

Signed-off-by: John Heffner <jheffner@psc.edu>
Acked-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoMD: Fix problem where hot-added drives are not resynced.
Neil Brown [Tue, 3 Oct 2006 07:15:00 +0000 (17:15 +1000)]
MD: Fix problem where hot-added drives are not resynced.

If a drive is added with HOT_ADD_DISK rather than ADD_NEW_DISK,
saved_raid_disk isn't initialised properly, and the drive can be
included in the array without a resync.

From: Neil Brown <neilb@suse.de>
Cc: <syrius.ml@no-log.org>
Cc: Richard Bollinger <rabollinger@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoIPV6: Disable SG for GSO unless we have checksum
David Miller [Thu, 28 Sep 2006 02:04:35 +0000 (19:04 -0700)]
IPV6: Disable SG for GSO unless we have checksum

Because the system won't turn off the SG flag for us we
need to do this manually on the IPv6 path.  Otherwise we
will throw IPv6 packets with bad checksums at the hardware.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPKT_SCHED: cls_basic: Use unsigned int when generating handle
David Miller [Wed, 27 Sep 2006 23:25:17 +0000 (16:25 -0700)]
PKT_SCHED: cls_basic: Use unsigned int when generating handle

gcc-4.1 and later take advantage of the fact that in the
C language certain types of overflow/underflow are undefined,
and this is completely legitimate.

Prevents filters from being added if the first generated
handle already exists.

Signed-off-by: Kim Nordlund <kim.nordlund@nokia.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agosata_mv: fix oops
Jeff Garzik [Wed, 27 Sep 2006 07:47:49 +0000 (03:47 -0400)]
sata_mv: fix oops

From: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoSPARC64: Fix sparc64 ramdisk handling
David S. Miller [Wed, 27 Sep 2006 06:15:38 +0000 (23:15 -0700)]
SPARC64: Fix sparc64 ramdisk handling

[SPARC64]: Kill bogus check from bootmem_init().

There is an ancient and totally incorrect sanity check being
done on the ramdisk location.  The check assumes that the
kernel is always loaded to physical address zero, which is
wrong.  It was trying to validate the ramdisk value by saying that
if it fell within the kernel image address range it must be wrong.

Anyways, kill this because it actually creates problems.  The
'ramdisk_image' should always be adjusted down by KERNBASE.
SILO can easily put the ramdisk in a location which causes
this test to trigger, breaking things.

[ Based almost entirely upon a patch from Ben Collins. ]

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoIPV6: bh_lock_sock_nested on tcp_v6_rcv
Fabio Olive Leite [Tue, 26 Sep 2006 05:29:54 +0000 (22:29 -0700)]
IPV6: bh_lock_sock_nested on tcp_v6_rcv

A while ago Ingo patched tcp_v4_rcv on net/ipv4/tcp_ipv4.c to use
bh_lock_sock_nested and silence a lock validator warning. This fixed
it for IPv4, but recently I saw a report of the same warning on IPv6.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoCPUFREQ: Fix some more CPU hotplug locking.
Dave Jones [Sat, 23 Sep 2006 01:00:03 +0000 (01:00 +0000)]
CPUFREQ: Fix some more CPU hotplug locking.

[CPUFREQ] Fix some more CPU hotplug locking.

Lukewarm IQ detected in hotplug locking
BUG: warning at kernel/cpu.c:38/lock_cpu_hotplug()
[<b0134a42>] lock_cpu_hotplug+0x42/0x65
[<b02f8af1>] cpufreq_update_policy+0x25/0xad
[<b0358756>] kprobe_flush_task+0x18/0x40
[<b0355aab>] schedule+0x63f/0x68b
[<b01377c2>] __link_module+0x0/0x1f
[<b0119e7d>] __cond_resched+0x16/0x34
[<b03560bf>] cond_resched+0x26/0x31
[<b0355b0e>] wait_for_completion+0x17/0xb1
[<f965c547>] cpufreq_stat_cpu_callback+0x13/0x20 [cpufreq_stats]
[<f9670074>] cpufreq_stats_init+0x74/0x8b [cpufreq_stats]
[<b0137872>] sys_init_module+0x91/0x174
[<b0102c81>] sysenter_past_esp+0x56/0x79

As there are other places that call cpufreq_update_policy without
the hotplug lock, it seems better to keep the hotplug locking
at the lower level for the time being until this is revamped.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoSPARC64: Fix serious bug in sched_clock() on sparc64
David S. Miller [Sun, 24 Sep 2006 01:26:24 +0000 (18:26 -0700)]
SPARC64: Fix serious bug in sched_clock() on sparc64

Unfortunately, sparc64 doesn't have an easy way to do a "64 X 64 -->
128" bit multiply like PowerPC and IA64 do.  We were doing a
"64 X 64 --> 64" bit multiple which causes overflow very quickly with
a 30-bit quotient shift.

So use a quotientshift count of 10 instead of 30, just like x86 and
ARM do.

This also fixes the wrapping of printk timestamp values every ~17
seconds.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoFix VIDIOC_ENUMSTD bug
Jonathan Corbet [Mon, 25 Sep 2006 23:25:37 +0000 (16:25 -0700)]
Fix VIDIOC_ENUMSTD bug

The v4l2 API documentation for VIDIOC_ENUMSTD says:

To enumerate all standards applications shall begin at index
zero, incrementing by one until the driver returns EINVAL.

The actual code, however, tests the index this way:

               if (index<=0 || index >= vfd->tvnormsize) {
                        ret=-EINVAL;

So any application which passes in index=0 gets EINVAL right off the bat
- and, in fact, this is what happens to mplayer.  So I think the
following patch is called for, and maybe even appropriate for a 2.6.18.x
stable release.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoload_module: no BUG if module_subsys uninitialized
Ed Swierk [Mon, 25 Sep 2006 23:25:36 +0000 (16:25 -0700)]
load_module: no BUG if module_subsys uninitialized

Invoking load_module() before param_sysfs_init() is called crashes in
mod_sysfs_setup(), since the kset in module_subsys is not initialized yet.

In my case, net-pf-1 is getting modprobed as a result of hotplug trying to
create a UNIX socket.  Calls to hotplug begin after the topology_init
initcall.

Another patch for the same symptom (module_subsys-initialize-earlier.patch)
moves param_sysfs_init() to the subsys initcalls, but this is still not
early enough in the boot process in some cases.  In particular,
topology_init() causes /sbin/hotplug to run, which requests net-pf-1 (the
UNIX socket protocol) which can be compiled as a module.  Moving
param_sysfs_init() to the postcore initcalls fixes this particular race,
but there might well be other cases where a usermodehelper causes a module
to load earlier still.

The patch makes load_module() return an error rather than crashing the
kernel if invoked before module_subsys is initialized.

Cc: Mark Huang <mlhuang@cs.princeton.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoi386: fix flat mode numa on a real numa system
keith mannthey [Mon, 25 Sep 2006 23:25:35 +0000 (16:25 -0700)]
i386: fix flat mode numa on a real numa system

If there is only 1 node in the system cpus should think they are apart of
some other node.

If cases where a real numa system boots the Flat numa option make sure the
cpus don't claim to be apart on a non-existent node.

Signed-off-by: Keith Mannthey <kmannth@us.ibm.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agocpu to node relationship fixup: map cpu to node
KAMEZAWA Hiroyuki [Mon, 25 Sep 2006 23:25:31 +0000 (16:25 -0700)]
cpu to node relationship fixup: map cpu to node

Assume that a cpu is *physically* offlined at boot time...

Because smpboot.c::smp_boot_cpu_map() canoot find cpu's sapicid,
numa.c::build_cpu_to_node_map() cannot build cpu<->node map for
offlined cpu.

For such cpus, cpu_to_node map should be fixed at cpu-hot-add.
This mapping should be done before cpu onlining.

This patch also handles cpu hotremove case.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agocpu to node relationship fixup: acpi_map_cpu2node
KAMEZAWA Hiroyuki [Mon, 25 Sep 2006 23:25:21 +0000 (16:25 -0700)]
cpu to node relationship fixup: acpi_map_cpu2node

Problem description:

  We have additional_cpus= option for allocating possible_cpus.  But nid
  for possible cpus are not fixed at boot time.  cpus which is offlined at
  boot or cpus which is not on SRAT is not tied to its node.  This will
  cause panic at cpu onlining.

Usually, pxm_to_nid() mapping is fixed at boot time by SRAT.

But, unfortunately, some system (my system!) do not include
full SRAT table for possible cpus.  (Then, I use
additiona_cpus= option.)

For such possible cpus, pxm<->nid should be fixed at
hot-add.  We now have acpi_map_pxm_to_node() which is also
used at boot.  It's suitable here.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agobacklight: fix oops in __mutex_lock_slowpath during head /sys/class/graphics/fb0/*
Michael Hanselmann [Mon, 25 Sep 2006 23:25:07 +0000 (16:25 -0700)]
backlight: fix oops in __mutex_lock_slowpath during head /sys/class/graphics/fb0/*

Seems like not all drivers use the framebuffer_alloc() function and won't
have an initialized mutex.  But those don't have a backlight, anyway.

Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch>
Cc: Olaf Hering <olaf@aepfle.de>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Daniel R Thompson <daniel.thompson@st.com>
Cc: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodo not free non slab allocated per_cpu_pageset
David Rientjes [Mon, 25 Sep 2006 23:24:57 +0000 (16:24 -0700)]
do not free non slab allocated per_cpu_pageset

Stops panic associated with attempting to free a non slab-allocated
per_cpu_pageset.

Signed-off-by: David Rientjes <rientjes@cs.washington.edu>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agortc: lockdep fix/workaround
Peter Zijlstra [Mon, 25 Sep 2006 23:24:23 +0000 (16:24 -0700)]
rtc: lockdep fix/workaround

BUG: warning at kernel/lockdep.c:1816/trace_hardirqs_on() (Not tainted)
 [<c04051ee>] show_trace_log_lvl+0x58/0x171
 [<c0405802>] show_trace+0xd/0x10
 [<c040591b>] dump_stack+0x19/0x1b
 [<c043abee>] trace_hardirqs_on+0xa2/0x11e
 [<c06143c3>] _spin_unlock_irq+0x22/0x26
 [<c0541540>] rtc_get_rtc_time+0x32/0x176
 [<c0419ba4>] hpet_rtc_interrupt+0x92/0x14d
 [<c0450f94>] handle_IRQ_event+0x20/0x4d
 [<c0451055>] __do_IRQ+0x94/0xef
 [<c040678d>] do_IRQ+0x9e/0xbd
 [<c0404a49>] common_interrupt+0x25/0x2c
DWARF2 unwinder stuck at common_interrupt+0x25/0x2c

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoi386 bootioremap / kexec fix
keith mannthey [Mon, 25 Sep 2006 23:24:39 +0000 (16:24 -0700)]
i386 bootioremap / kexec fix

With CONFIG_PHYSICAL_START set to a non default values the i386
boot_ioremap code calculated its pte index wrong and users of boot_ioremap
have their areas incorrectly mapped (for me SRAT table not mapped during
early boot).  This patch removes the addr < BOOT_PTE_PTRS constraint.

Signed-off-by: Keith Mannthey<kmannth@us.ibm.com>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agopowerpc: Fix ohare IDE irq workaround on old powermacs
Benjamin Herrenschmidt [Fri, 22 Sep 2006 02:57:26 +0000 (12:57 +1000)]
powerpc: Fix ohare IDE irq workaround on old powermacs

Looks like a workaround for old bogus OF bitrot... This fixes it and hence fixes
boot on some performa machines.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agosysfs: remove duplicated dput in sysfs_update_file
Hidetoshi Seto [Mon, 25 Sep 2006 23:30:13 +0000 (16:30 -0700)]
sysfs: remove duplicated dput in sysfs_update_file

Following function can drops d_count twice against one reference
by lookup_one_len.

<SOURCE>
/**
 * sysfs_update_file - update the modified timestamp on an object attribute.
 * @kobj: object we're acting for.
 * @attr: attribute descriptor.
 */
int sysfs_update_file(struct kobject * kobj, const struct attribute * attr)
{
        struct dentry * dir = kobj->dentry;
        struct dentry * victim;
        int res = -ENOENT;

        mutex_lock(&dir->d_inode->i_mutex);
        victim = lookup_one_len(attr->name, dir, strlen(attr->name));
        if (!IS_ERR(victim)) {
                /* make sure dentry is really there */
                if (victim->d_inode &&
                    (victim->d_parent->d_inode == dir->d_inode)) {
                        victim->d_inode->i_mtime = CURRENT_TIME;
                        fsnotify_modify(victim);

                        /**
                         * Drop reference from initial sysfs_get_dentry().
                         */
                        dput(victim);
                        res = 0;
                } else
                        d_drop(victim);

                /**
                 * Drop the reference acquired from sysfs_get_dentry() above.
                 */
                dput(victim);
        }
        mutex_unlock(&dir->d_inode->i_mutex);

        return res;
}
</SOURCE>

PCI-hotplug (drivers/pci/hotplug/pci_hotplug_core.c) is only user of
this function. I confirmed that dentry of /sys/bus/pci/slots/XXX/*
have negative d_count value.

This patch removes unnecessary dput().

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agopowerpc: fix building gdb against asm/ptrace.h
Arnd Bergmann [Fri, 22 Sep 2006 07:40:40 +0000 (08:40 +0100)]
powerpc: fix building gdb against asm/ptrace.h

Ulrich Weigand found a bug with the current version of the
asm-powerpc/ptrace.h that prevents building at least the
SPU target version of gdb, since some ptrace opcodes are
not defined.

The problem seems to have originated in the merging of 32 and
64 bit versions of that file, the problem is that some opcodes
are only valid on 64 bit kernels, but are also used by 32 bit
programs, so they can't depends on the __powerpc64__ symbol.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoRemove offsetof() from user-visible <linux/stddef.h>
David Woodhouse [Fri, 22 Sep 2006 07:00:42 +0000 (08:00 +0100)]
Remove offsetof() from user-visible <linux/stddef.h>

It's not used by anything user-visible, and it make g++ unhappy.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoClean up exported headers on CRIS
David Woodhouse [Thu, 21 Sep 2006 08:33:55 +0000 (09:33 +0100)]
Clean up exported headers on CRIS

This fixes most of the issues with exported headers on CRIS, although
we do still need to deal with the asm/arch symlink.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoFix v850 exported headers
David Woodhouse [Thu, 21 Sep 2006 08:05:25 +0000 (09:05 +0100)]
Fix v850 exported headers

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoDon't advertise (or allow) headers_{install,check} where inappropriate.
David Woodhouse [Thu, 21 Sep 2006 08:01:45 +0000 (09:01 +0100)]
Don't advertise (or allow) headers_{install,check} where inappropriate.

For architectures which don't have the include/asm-$(ARCH)/Kbuild file,
like ARM26, UM, etc.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoRemove UML header export
David Woodhouse [Thu, 21 Sep 2006 07:55:28 +0000 (08:55 +0100)]
Remove UML header export

No need for UML to export headers for userspace to build against.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoRemove ARM26 header export.
David Woodhouse [Thu, 21 Sep 2006 07:54:44 +0000 (08:54 +0100)]
Remove ARM26 header export.

We ought to be able to use ARM headers; no need for special ARM26 version.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoFix H8300 exported headers.
David Woodhouse [Thu, 21 Sep 2006 07:51:43 +0000 (08:51 +0100)]
Fix H8300 exported headers.

Just clean up asm/page.h

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoFix m68knommu exported headers
David Woodhouse [Thu, 21 Sep 2006 07:50:36 +0000 (08:50 +0100)]
Fix m68knommu exported headers

Just clean up asm/page.h

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoFix exported headers for SPARC, SPARC64
David Woodhouse [Thu, 21 Sep 2006 07:48:27 +0000 (08:48 +0100)]
Fix exported headers for SPARC, SPARC64

Mostly removing files which have no business being used in userspace.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoFix 'make headers_check' on m32r
David Woodhouse [Sun, 17 Sep 2006 07:39:39 +0000 (08:39 +0100)]
Fix 'make headers_check' on m32r

> asm-m32r/page.h requires asm-generic/memory_model.h, which does not exist
> asm-m32r/ptrace.h requires asm/m32r.h, which does not exist
> asm-m32r/signal.h requires linux/linkage.h, which does not exist
> asm-m32r/unistd.h requires asm/syscall.h, which does not exist
> asm-m32r/user.h requires asm/processor.h, which does not exist

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoFix 'make headers_check' on sh64
Paul Mundt [Tue, 19 Sep 2006 18:27:17 +0000 (03:27 +0900)]
Fix 'make headers_check' on sh64

Cleanup for user headers, as noted:

asm-sh64/page.h requires asm-generic/memory_model.h, which does not exist in exported headers
asm-sh64/shmparam.h requires asm/cache.h, which does not exist in exported headers
asm-sh64/signal.h requires asm/processor.h, which does not exist in exported headers
asm-sh64/user.h requires asm/processor.h, which does not exist in exported headers

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoFix 'make headers_check' on sh
Paul Mundt [Tue, 19 Sep 2006 18:25:34 +0000 (03:25 +0900)]
Fix 'make headers_check' on sh

Cleanup for user headers, as noted:

asm-sh/page.h requires asm-generic/memory_model.h, which does not exist in exported headers
asm-sh/ptrace.h requires asm/ubc.h, which does not exist in exported headers

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoFix ARM 'make headers_check'
David Woodhouse [Thu, 21 Sep 2006 07:34:39 +0000 (08:34 +0100)]
Fix ARM 'make headers_check'

Sanitise the ARM headers exported to userspace.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoOne line per header in Kbuild files to reduce conflicts
David Woodhouse [Tue, 19 Sep 2006 11:43:58 +0000 (12:43 +0100)]
One line per header in Kbuild files to reduce conflicts

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agosky2 network driver device ids
Stephen Hemminger [Sat, 23 Sep 2006 20:56:03 +0000 (13:56 -0700)]
sky2 network driver device ids

This makes the id table match the current netdev upstream tree.

From: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agosky2: tx pause bug fix
Stephen Hemminger [Wed, 20 Sep 2006 17:27:48 +0000 (10:27 -0700)]
sky2: tx pause bug fix

The sky2 driver will hang if transmit flow control is enabled
and it receives a pause frame. The pause frame gets partially
processed by hardware but never makes it through to the correct
logic. This patch made it into 2.6.17 stable, but never got
accepted for 2.6.18, so it will have to go into 2.6.18.1

See also: http://bugzilla.kernel.org/show_bug.cgi?id=6839

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agonetdrvr: lp486e: fix typo
Jeff Garzik [Fri, 22 Sep 2006 22:59:03 +0000 (22:59 +0000)]
netdrvr: lp486e: fix typo

inside #if 0'd code, but it bugged me.

Really, we should probably just delete the driver.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agomv643xx_eth: fix obvious typo, which caused build breakage
Jeff Garzik [Fri, 22 Sep 2006 22:59:03 +0000 (22:59 +0000)]
mv643xx_eth: fix obvious typo, which caused build breakage

The last minute fix submitted by the author fixed a bug, but
broke the driver build.

Noticed by Al Viro, since I can't build on said platform.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agozone_reclaim: dynamic slab reclaim
Christoph Lameter [Mon, 2 Oct 2006 17:45:24 +0000 (10:45 -0700)]
zone_reclaim: dynamic slab reclaim

http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=0ff38490c836dc379ff7ec45b10a15a662f4e5f6

Currently one can enable slab reclaim by setting an explicit option in
/proc/sys/vm/zone_reclaim_mode.  Slab reclaim is then used as a final
option if the freeing of unmapped file backed pages is not enough to free
enough pages to allow a local allocation.

However, that means that the slab can grow excessively and that most memory
of a node may be used by slabs.  We have had a case where a machine with
46GB of memory was using 40-42GB for slab.  Zone reclaim was effective in
dealing with pagecache pages.  However, slab reclaim was only done during
global reclaim (which is a bit rare on NUMA systems).

This patch implements slab reclaim during zone reclaim.  Zone reclaim
occurs if there is a danger of an off node allocation.  At that point we

1. Shrink the per node page cache if the number of pagecache
   pages is more than min_unmapped_ratio percent of pages in a zone.

2. Shrink the slab cache if the number of the nodes reclaimable slab pages
   (patch depends on earlier one that implements that counter)
   are more than min_slab_ratio (a new /proc/sys/vm tunable).

The shrinking of the slab cache is a bit problematic since it is not node
specific.  So we simply calculate what point in the slab we want to reach
(current per node slab use minus the number of pages that neeed to be
allocated) and then repeately run the global reclaim until that is
unsuccessful or we have reached the limit.  I hope we will have zone based
slab reclaim at some point which will make that easier.

The default for the min_slab_ratio is 5%

Also remove the slab option from /proc/sys/vm/zone_reclaim_mode.

[akpm@osdl.org: cleanups]
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoFix longstanding load balancing bug in the scheduler
Christoph Lameter [Tue, 26 Sep 2006 06:30:51 +0000 (23:30 -0700)]
Fix longstanding load balancing bug in the scheduler

The scheduler will stop load balancing if the most busy processor contains
processes pinned via processor affinity.

The scheduler currently only does one search for busiest cpu.  If it cannot
pull any tasks away from the busiest cpu because they were pinned then the
scheduler goes into a corner and sulks leaving the idle processors idle.

F.e.  If you have processor 0 busy running four tasks pinned via taskset,
there are none on processor 1 and one just started two processes on
processor 2 then the scheduler will not move one of the two processes away
from processor 2.

This patch fixes that issue by forcing the scheduler to come out of its
corner and retrying the load balancing by considering other processors for
load balancing.

This patch was originally developed by John Hawkes and discussed at
http://marc.theaimsgroup.com/?l=linux-kernel&m=113901368523205&w=2.

I have removed extraneous material and gone back to equipping struct rq
with the cpu the queue is associated with since this makes the patch much
easier and it is likely that others in the future will have the same
difficulty of figuring out which processor owns which runqueue.

The overhead added through these patches is a single word on the stack if
the kernel is configured to support 32 cpus or less (32 bit).  For 32 bit
environments the maximum number of cpus that can be configued is 255 which
would result in the use of 32 bytes additional on the stack.  On IA64 up to
1k cpus can be configured which will result in the use of 128 additional
bytes on the stack.  The maximum additional cache footprint is one
cacheline.  Typically memory use will be much less than a cacheline and the
additional cpumask will be placed on the stack in a cacheline that already
contains other local variable.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: John Hawkes <hawkes@sgi.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Peter Williams <pwil3058@bigpond.net.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agojbd: fix commit of ordered data buffers
Jan Kara [Mon, 11 Sep 2006 22:13:37 +0000 (15:13 -0700)]
jbd: fix commit of ordered data buffers

Original commit code assumes, that when a buffer on BJ_SyncData list is
locked, it is being written to disk.  But this is not true and hence it can
lead to a potential data loss on crash.  Also the code didn't count with
the fact that journal_dirty_data() can steal buffers from committing
transaction and hence could write buffers that no longer belong to the
committing transaction.  Finally it could possibly happen that we tried
writing out one buffer several times.

The patch below tries to solve these problems by a complete rewrite of the
data commit code.  We go through buffers on t_sync_datalist, lock buffers
needing write out and store them in an array.  Buffers are also immediately
refiled to BJ_Locked list or unfiled (if the write out is completed).  When
the array is full or we have to block on buffer lock, we submit all
accumulated buffers for IO.

[suitable for 2.6.18.x around the 2.6.19-rc2 timeframe]

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoALSA: Fix initiailization of user-space controls
Takashi Iwai [Mon, 25 Sep 2006 09:49:01 +0000 (11:49 +0200)]
ALSA: Fix initiailization of user-space controls

ALSA: Fix initiailization of user-space controls

Fix an assertion when accessing a user-defined control due to lack of
initialization (appears only when CONFIG_SND_DEBUg is enabled).

  ALSA sound/core/control.c:660: BUG? (info->access == 0)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: Allow compile in g_ether, fix typo
Tony Lindgren [Sat, 23 Sep 2006 03:17:48 +0000 (20:17 -0700)]
USB: Allow compile in g_ether, fix typo

Allows compiling g_ether in and fixes a typo with MUSB_HDRC

Signed-off-by: Tony Lindgren <tony@atomide.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoIB/mthca: Fix lid used for sending traps
Jack Morgenstein [Wed, 20 Sep 2006 22:47:16 +0000 (15:47 -0700)]
IB/mthca: Fix lid used for sending traps

The SM LID used to send traps to is incorrectly set to port LID.  This
is a regression from 2.6.17 -- after a PortInfo MAD is received, no
traps are sent to the SM LID.  The traps go to the loopback interface
instead, and are dropped there.  The SM LID should be taken from the
sm_lid of the PortInfo response.

The bug was introduced by commit 12bbb2b7be7f5564952ebe0196623e97464b8ac5:
IB/mthca: Add client reregister event generation

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoS390: user readable uninitialised kernel memory (CVE-2006-5174)
Martin Schwidefsky [Thu, 28 Sep 2006 13:31:52 +0000 (15:31 +0200)]
S390: user readable uninitialised kernel memory (CVE-2006-5174)

[S390] user readable uninitialised kernel memory.

A user space program can read uninitialised kernel memory
by appending to a file from a bad address and then reading
the result back. The cause is the copy_from_user function
that does not clear the remaining bytes of the kernel
buffer after it got a fault on the user space address.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agozd1211rw: ZD1211B ASIC/FWT, not jointly decoder
Daniel Drake [Mon, 9 Oct 2006 15:06:16 +0000 (16:06 +0100)]
zd1211rw: ZD1211B ASIC/FWT, not jointly decoder

The vendor driver chooses this value based on an ifndef ASIC,
and ASIC is never defined.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoV4L: pvrusb2: Limit hor res for 24xxx devices
Mike Isely [Sun, 8 Oct 2006 18:42:17 +0000 (14:42 -0400)]
V4L: pvrusb2: Limit hor res for 24xxx devices

Currently it is not understood how to properly control the horizontal
capture resolution on 24xxx devices.  The pvrusb2 driver is doing
everything it should (pass resolution paramter(s) to cx2341x and
cx25840 modules) but for some reason the result is corrupted video if
any resolution other than 720 is used.  This patch causes the driver
to only permit a horizontal resolution of 720 to be used on 24xxx
devices.  Even if the app requests something else, the driver will
force the resolution back to 720.  This patch still allows full
control of the resolution for 29xxx devices.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoV4L: pvrusb2: Suppress compiler warning
Mike Isely [Sun, 8 Oct 2006 18:42:14 +0000 (14:42 -0400)]
V4L: pvrusb2: Suppress compiler warning

The pvrusb2 driver needs to call video_devdata() in order to correctly
transform a file pointer into a video_device pointer.  Unfortunately
the prototype for this function has been marked V4L1-only and there's
no official substitute that I can find for V4L2.  Adding to the
mystery is that the implementation for this function exists whether or
not V4L1 compatibility has been selected.  The upshot of all this is
that we get a compilation warning here about a missing prototype but
the code links OK.  This fix solves the warning by copying the
prototype into the source file that is using it.  Yes this is a hack,
but it's a safe one for 2.6.18 (any alternative would be much more
intrusive).  A better solution should be forthcoming for the next
kernel.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoV4L: pvrusb2: improve 24XXX config option description
Mike Isely [Sun, 8 Oct 2006 18:42:11 +0000 (14:42 -0400)]
V4L: pvrusb2: improve 24XXX config option description

The CONFIG_VIDEO_PVRUSB2_24XXX is not nearly as "experimental" as the
description suggests.  So refine the description to better match reality.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoV4L: pvrusb2: Solve mutex deadlock
Mike Isely [Sun, 8 Oct 2006 18:42:08 +0000 (14:42 -0400)]
V4L: pvrusb2: Solve mutex deadlock

There is a mutex ordering problem between the pvrusb2 driver and the
v4l core.  Two different pathways take mutexes in opposing orders and
this (under rare circumstances) can cause a deadlock.  The two mutexes
in question are videodev_lock in the v4l core and device_lock inside
the pvrusb2 driver.  The device_lock instance in the driver protects a
private global array of context pointers which had been implemented in
advance of v4l core changes which eliminate the video_set_drvdata()
and video_get_drvdata() functions.

This patch restores the use of video_get_drvdata() and
video_set_drvdata(), eliminating the need for the array and the mutex.
(This is actually a patch to restore the previous implementation.)  We
can do this for 2.6.18 since those functions are in fact still
present.  A better (and larger) solution will be done for later
kernels.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoDVB: cx24123: fix PLL divisor setup
Yeasah Pell [Sun, 8 Oct 2006 18:41:43 +0000 (14:41 -0400)]
DVB: cx24123: fix PLL divisor setup

The cx24109 datasheet says: "NOTE: if A=0, then N=N+1"

The current code is the result of a misinterpretation of the datasheet to
mean exactly the opposite of the requirement -- The actual value of N is 1
greater than the value written when A is 0, so 1 needs to be *subtracted*
from it to compensate.

Signed-off-by: Yeasah Pell <yeasah@schwide.net>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoV4L: Fix msp343xG handling regression
Hans Verkuil [Sun, 8 Oct 2006 18:41:42 +0000 (14:41 -0400)]
V4L: Fix msp343xG handling regression

The msp3430G and msp3435G models cannot do Automatic Standard Detection,
so these should be forced to BTSC. These chips are early production
versions for the msp34xxG series and are quite rare.

The workaround for kernel 2.6.18 is to use 'standard=32' as msp3400 module
option.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUML: Fix UML build failure
Jeff Dike [Thu, 5 Oct 2006 18:27:32 +0000 (20:27 +0200)]
UML: Fix UML build failure

don't know if the following is already queued, it fixes an ARCH=um build
failure, evidence here:
http://marc.theaimsgroup.com/?l=linux-kernel&m=115875912525137&w=2
and following thread.
Cc-ing uml maintainers and I hope I didn't follow too many
Submitting-patches rules...

The patch is taken from:
http://user-mode-linux.sourceforge.net/work/current/2.6/2.6.18/patches/no-syscallx

Since the syscallx macros seem to be under threat, this patch stops
using them, using syscall instead.

Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agouml: use DEFCONFIG_LIST to avoid reading host's config
Paolo 'Blaisorblade' Giarrusso [Thu, 5 Oct 2006 20:01:47 +0000 (22:01 +0200)]
uml: use DEFCONFIG_LIST to avoid reading host's config

This should make sure that, for UML, host's configuration files are not
considered, which avoids various pains to the user. Our dependency are such that
the obtained Kconfig will be valid and will lead to successful compilation -
however they cannot prevent an user from disabling any boot device, and if an
option is not set in the read .config (say /boot/config-XXX), with make
menuconfig ARCH=um, it is not set. This always disables UBD and all console I/O
channels, which leads to non-working UML kernels, so this bothers users -
especially now, since it will happen on almost every machine
(/boot/config-`uname -r` exists almost on every machine). It can be workarounded
with make defconfig ARCH=um, but it is non-obvious and can be avoided, so please
_do_ merge this patch.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agouml: allow using again x86/x86_64 crypto code
Paolo 'Blaisorblade' Giarrusso [Thu, 5 Oct 2006 19:34:28 +0000 (21:34 +0200)]
uml: allow using again x86/x86_64 crypto code

Enable compilation of x86_64 crypto code;, and add the needed constant
to make the code compile again (that macro was added to i386 asm-offsets
between 2.6.17 and 2.6.18, in 6c2bb98bc33ae33c7a33a133a4cd5a06395fece5).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoNET_SCHED: Fix fallout from dev->qdisc RCU change
Patrick McHardy [Tue, 10 Oct 2006 04:16:11 +0000 (21:16 -0700)]
NET_SCHED: Fix fallout from dev->qdisc RCU change

The move of qdisc destruction to a rcu callback broke locking in the
entire qdisc layer by invalidating previously valid assumptions about
the context in which changes to the qdisc tree occur.

The two assumptions were:

- since changes only happen in process context, read_lock doesn't need
  bottem half protection. Now invalid since destruction of inner qdiscs,
  classifiers, actions and estimators happens in the RCU callback unless
  they're manually deleted, resulting in dead-locks when read_lock in
  process context is interrupted by write_lock_bh in bottem half context.

- since changes only happen under the RTNL, no additional locking is
  necessary for data not used during packet processing (f.e. u32_list).
  Again, since destruction now happens in the RCU callback, this assumption
  is not valid anymore, causing races while using this data, which can
  result in corruption or use-after-free.

Instead of "fixing" this by disabling bottem halfs everywhere and adding
new locks/refcounting, this patch makes these assumptions valid again by
moving destruction back to process context. Since only the dev->qdisc
pointer is protected by RCU, but ->enqueue and the qdisc tree are still
protected by dev->qdisc_lock, destruction of the tree can be performed
immediately and only the final free needs to happen in the rcu callback
to make sure dev_queue_xmit doesn't access already freed memory.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoLinux v2.6.18. Arrr! v2.6.18
Linus Torvalds [Wed, 20 Sep 2006 03:42:06 +0000 (20:42 -0700)]
Linux v2.6.18. Arrr!

Ahoy, all land-lubbers, test me out right smartly!

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 20 Sep 2006 03:36:22 +0000 (20:36 -0700)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [IPV4] fib_trie: missing ntohl() when calling fib_semantic_match()
  [NETFILTER]: xt_quota: add missing module aliases
  [ATM]: [he] don't hold the device lock when upcalling

17 years ago[IPV4] fib_trie: missing ntohl() when calling fib_semantic_match()
Al Viro [Tue, 19 Sep 2006 20:42:46 +0000 (13:42 -0700)]
[IPV4] fib_trie: missing ntohl() when calling fib_semantic_match()

fib_trie.c::check_leaf() passes host-endian where fib_semantic_match()
expects (and stores into) net-endian.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[NETFILTER]: xt_quota: add missing module aliases
Patrick McHardy [Tue, 19 Sep 2006 20:00:57 +0000 (13:00 -0700)]
[NETFILTER]: xt_quota: add missing module aliases

Add missing aliases for ipt_quota and ip6t_quota to make autoload
work.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago[ATM]: [he] don't hold the device lock when upcalling
Chas Williams [Tue, 19 Sep 2006 19:59:11 +0000 (12:59 -0700)]
[ATM]: [he] don't hold the device lock when upcalling

This can create a deadlock/lock ordering problem with other layers
that want to use the transmit (or other) path of the card at that
time.

Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: David S. Miller <davem@davemloft.net>