Arun Sharma [Thu, 13 Nov 2003 05:29:19 +0000 (21:29 -0800)]
[PATCH] ia64: invoke schedule_tail unconditionally on ia32 emulation
The #ifdef CONFIG_SMP around the call to schedule_tail was removed a
long time ago for native ia64, but ia32 emulation continues to have a
#ifdef. We saw a bunch of weird behavior with respect to getpid() on
multithreaded programs (they behave ok on SMP, but break on UP).
Linus Torvalds [Tue, 11 Nov 2003 23:53:58 +0000 (15:53 -0800)]
Re-instate the ALI northbridge checks in ALI IDE driver
This leaves just the minimal oops protection in place, and
maintains the logic that "if we have a non-ALI northbridge,
we shouldn't touch any of the GPIOs because we don't know
what they might be connected to".
NTFS: Minor bug fix in attribute list attribute handling that fixes the
I/O errors on "ls" of certain fragmented files found by at least two
people running Windows XP.
David S. Miller [Tue, 11 Nov 2003 17:34:37 +0000 (09:34 -0800)]
[IPV6]: Fix packet quoting in icmpv6_send().
- Mucking with the original skb pointers with push/pull around
the packet quoting was wrong, muching with these pointers could
cause problems with others using the SKB.
It was also buggy, it only handled the case where skb->nh.raw was
ahead of or equal to skb->data
- The fix is to record skb->nh.raw - skb->data and use this as
a base offset in calls to skb_copy_and_csum_bits(). This is
what the pre-IPSEC code did.
This fixes IPV6 oopses and packet corruption on 64-bit platforms
when sending UDP port unreachable ICMP messages.
Reported and analyzed by Jan Oravec (jan.oravec@6com.sk)
David Mosberger [Tue, 11 Nov 2003 15:14:26 +0000 (07:14 -0800)]
ia64: From Linus: Always disable system call restart when invoking a
signal handler. Otherwise, a restarted system call that gets
interrupted before the restart has taken effect by _another_
signal will potentially restart the wrong system call.
Linus Torvalds [Tue, 11 Nov 2003 13:18:50 +0000 (05:18 -0800)]
Always disable system call restart when invoking a signal handler.
Otherwise, a restarted system call that gets interrupted before
the restart has taken effect by _another_ signal will potentially
restart the wrong system call.
George Anzinger [Tue, 11 Nov 2003 06:59:12 +0000 (22:59 -0800)]
[PATCH] Fix clock_nanosleep() signal restart issues
The problem with clock_nanosleep() restarting was that the address of
the users return timespec was being saved at the wrong place. In needs
to be saved in the sys call interface code rather than the
do_clock_nanosleep(). My original tests were a bit weak as they only
did one signal rather than two or more which were required to break it.
The attached patch fixes the problem.
I also added a few comments about how restart works, and added my name
to the MAINTAINERS list.
Linus Torvalds [Tue, 11 Nov 2003 02:52:30 +0000 (18:52 -0800)]
Avoid racy optimization in signal sending.
The bug is probably impossible to trigger on x86, due to its
fairly strong coherency model (the SMP-safe bitops end up being
memory barriers etc), but other architectures - notably ppc64 -
can apparently trigger a race whereby the signal sender doesn't
wake up the target because it doesn't notice that it has gone to
sleep.
The optimization also optimizes only what appears to be the
uncommon case, where the signal happens for an already-running
process.
Since 2.6.x by default does not remap the disk partitions any more, it
would be a good idea to warn when we see EZD or DM signatures. That
informs the user to fix his setup (or pass in "hdx=remap" on the kernel
command line).
Andrew Morton [Sun, 9 Nov 2003 23:18:43 +0000 (15:18 -0800)]
[PATCH] compile fix for voyager with gcc-3.3
From: James Bottomley <James.Bottomley@SteelEye.com>
The cpu_callout_map differs from the prototype in asm-i386/smp.h by a
volatile. gcc-3.3 now treats this as an error, so voyager support will
only compile with older gcc's. The fix is to remove the spurious volatile.
Andrew Morton [Sun, 9 Nov 2003 23:18:35 +0000 (15:18 -0800)]
[PATCH] JBD: fix assertion failure
This fixes a JBD assertion failure (goes BUG) in __journal_remove_journal_head().
When the journal had aborted due to earlier internal consistency errors (or
I/O errors) it is possible that we free journal_heads which still have
attached copyout buffers. So just free them up.
Andrew Morton [Sun, 9 Nov 2003 23:18:26 +0000 (15:18 -0800)]
[PATCH] Fix RAID1 recovery
From: Mike Tran <mhtran@us.ibm.com>
This fixes the RAID1 recovery problems; it seems to be a simple thinko:
sync_request_write() is passing "ok=0" into md_done_sync(). Clearly, `ok'
should be true here.
Andrew Morton [Sun, 9 Nov 2003 23:18:01 +0000 (15:18 -0800)]
[PATCH] ext2 block allocation race fix
If this CPU decides that an ext2 block group has a free block it will then go
in and try to acquire it. No locks are held, so another CPU can come in and
steal the last block.
In this case we will bogusly report a corrupted filessytem.
Fix it by just restarting the scan - this will choose a different blockgroup
or will generate -ENOSPC.
Andrew Morton [Sun, 9 Nov 2003 23:17:43 +0000 (15:17 -0800)]
[PATCH] AS: handle non-block requests
From: Nick Piggin <piggin@cyberone.com.au>
as_completed_request() can be called for requests which were not generated by
the generic block layer. Handle these, to avoid a subsequent WARN_ON (at
least).
Also kill a separate WARN_ON which is bogusly triggering.
Paul Mackerras [Sun, 9 Nov 2003 12:03:30 +0000 (04:03 -0800)]
[PATCH] PPC32: Fix alignment problem with __ex_table and __bug_table.
The __start___ex_table and __start___bug_table symbols could end up
pointing a few bytes before the actual __ex_table and __bug_table
sections, if the preceding section had an odd length. This led to
oopses in some situations. Patch from Sam Ravnborg.
Russell King [Sun, 9 Nov 2003 23:03:30 +0000 (23:03 +0000)]
[ARM] Fix ARM signal handling.
If we are unable to deliver a signal to the process (eg, due to stack
pointer corruption) block the signal so other fatal signals can kill
off the process.
Andi Kleen [Sun, 9 Nov 2003 01:51:23 +0000 (17:51 -0800)]
[PATCH] Work around K8 errata on x86-64
K8 has an erratum (#100) that essentially causes some compat mode processes
to fault occassionally. The issue can be worked around in the OS. It only
applies to x86-64, in 32bit it is fine.
This adds a check to the page fault handler that checks for addresses >4GB
from compat mode. If they happen just return; the CPU will reexecute
the instruction and the condition that caused the problem is gone.
More details in Opteron/Athlon64 specification update on the AMD website.
Also I removed a left over debugging printk in the prefetch handling code.
Vojtech Pavlik [Sun, 9 Nov 2003 01:25:23 +0000 (17:25 -0800)]
[PATCH] input: Always reset PS/2 mouse resolution and update speed to
default values after probing
This sets the mouse to 100 samples/second, 200 dpi, 1:1 mapping, which
is a standard setting, as close to 2.4 XFree86 behavior as possible, and
a good performance setting, too.
It also in the case of 'psmouse_noext' doesn't probe and set anything
all, though it still issues the RESET command. This is as safe as one
can get.
The only real problem remaining is that the report rate and resolution
cannot be set from XFree86 config and only is available as a
kernel/module parameter. The fix is, howewer not 2.6.0 material.
Krishna Kumar [Sat, 8 Nov 2003 14:33:05 +0000 (06:33 -0800)]
[IPV6]: Fix hangs during interface down caused by ipv6_del_addr().
While using PRIVACY extensions, I sometimes get a hang when I remove the
interface. But I can reproduce this every time using the test script at
the end of the mail (hang depends on the order of address deletion).
The bug is in ipv6_del_addr() where if a temp address is being deleted, it
does an __in6_ifa_put() of the main address from which it was derived
(basically the autoconf prefix address). So if the main address was
deleted first, it's ifp ref count would be 1 and it would 'wait' to be
freed till it's temp address was freed first. When the temp address is
deleted, the __put() routine drops the main address's ifp ref count to 0,
but not free it. unregister_netdevice() hangs giving message that ref
count is 1. Fix tested overnight.
Also, the code at the top of the routine is unnecessary, the same is being
done when the address is found a little later in that routine.
Ingo Molnar [Sat, 8 Nov 2003 08:06:19 +0000 (00:06 -0800)]
[PATCH] SMP signal latency fix
The code that sends a signal needs to "kick" the target process if it
runs on another CPU and wasn't woken up by the signal to let it know
that it has a new event.
Otherwise it might take a long time until the target actually notices
and acts on the signal.
Ralf Bächle [Sat, 8 Nov 2003 07:24:10 +0000 (02:24 -0500)]
[netdrvr pcnet32] add missing pci_dma_sync_single
a patch for the pcnet32.c driver which adds a missing call to
pci_dma_sync_single. If a received packet is smaller than rx_copybreak
the pcnet driver will recycle the receive buffer which requires calling
pci_dma_sync_single. Patch is against 2.6 but I it's also needed in 2.4.
Without that call the processor might still have old stale data in
the data cache when the processor accesses the recycled buffer.
Andi Kleen [Sat, 8 Nov 2003 05:59:23 +0000 (21:59 -0800)]
[PATCH] Fix TSS limit on x86-64
The limit of the TSS segment was incorrectly set to a too big value
on x86-64. This lead to the CPU reading random memory behind the main
TSS when iopl was >0, but there was no ioperm bitmap set. This caused
random failures in port accesses in this state.
[PATCH] fix reference count bug with class devices
When a kobject is associated with a kset, the kset MUST be set before
the kobject is initialized (by either a call to kobject_register() or
kobject_init()). This patch fixes the class code which improperly set
the kset after the kobject was initialized, which would cause improper
reference counts on the kset.
Thanks to Mike Anderson for locating the source of this bug.
The new gcc optimizes the first store away because it doesn't know
that ip_fast_csum reads its input memory. This leads to occassionally
packets with wrong IP header checksum getting sent; this happens especially
with NFS. Fixing it in the constraints would have been ugly and probably
not future proof, so this patch just adds a memory clobber to ip_fast_csum.
For some reason the issue only hits in 2.6, we haven't seen it in 2.4.
Problem occurs on both i386 and x86-64.
David Brownell [Fri, 7 Nov 2003 02:19:35 +0000 (18:19 -0800)]
[PATCH] USB: usb ignores 64bit dma
The dma hooks whereby EHCI can pass 64bit DMA support
up the driver stack (to avoid buffer copies) turn out
to broken on most architectures(*). This patch just
disables them all, since it looks like those mechanisms
won't get fixed before 2.6.0-final. For now it'd only
matter on a few big Intel boxes anyway.
Please merge.
- Dave
(*) On x86, mips, and arm dma_supported() doesn't
even compare with the device's mask. On several
other architectures (reported on ppc, alpha,
and sparc64), asking that question for non-PCI
devices will just BUG() -- even though all info
needed to answer the question is right at hand.
Matthew Dharm [Fri, 7 Nov 2003 02:07:03 +0000 (18:07 -0800)]
[PATCH] USB: fix a thread-exit problem at module unload
This patch fixes a thread-exit problem when the usb-storage module is
unloaded with a preemptable kernel. Please refer to the comments in the
code for more detail.
Alexander Viro [Fri, 7 Nov 2003 01:53:45 +0000 (17:53 -0800)]
[PATCH] Fix cramfs metadata races
There's a few places that use incorrect exclusion for the cramfs raw
data access buffers. The proper lock is "read_mutex" (and BKL does
nothing).
- fix mount-time read and block number initialization without the mutex
held.
- cramfs_readdir() needs to copy the name and inode information into a
separate buffer since it can't hold the semaphore over the
(potentially blocking) user mode access
- cramfs_lookup() needs to hold the access lock over the whole
function, not just the read itself
- use generic_file_llseek on directories to get i_sem exclusion on
readdir/lseek
Jens Axboe [Thu, 6 Nov 2003 00:23:58 +0000 (16:23 -0800)]
[PATCH] fix segment accounting with bounced pages
There's a problem with bio segment accounting for pages that reside
above the bounce limit of a queue. When submitted, they may be
considered part of another segment. A condition that changes when the
page gets bounced. This can cause us to send bio's that have too many
segments to a driver.
The best fix is to always consider pages above q->bounce_pfn as seperate
segments. That's the conservative approach and the easy fix.
David S. Miller [Wed, 5 Nov 2003 04:52:55 +0000 (20:52 -0800)]
[IRDA]: Fix IRQ save/restore handling in seq file handlers.
IRDA was restoring IRQ flags in a different function from which they
were saved which explodes on certain platforms. It did not need to
use _irq{save,restore}() anyways since the seqfile layer always invokes
these routines from user context with interrupts enabled, so using
plain spin_{lock,unlock}_irq() works just fine.