[IPV6]: Don't select a tentative address as a source address.
A tentative address is not considered "assigned to an interface"
in the traditional sense (RFC2462 Section 4).
Don't try to select such an address for the source address.
[IPV6]: Defer IPv6 device initialization until the link becomes ready.
NETDEV_UP might be sent even if the link attached to the interface was
not ready. DAD does not make sense in such case, so we won't do so.
After interface
When a spinlock debugging check hits, we print the CPU number as an
informational thing - but there is no guarantee that preemption is off
at that point - hence we should use raw_smp_processor_id(). Otherwise
DEBUG_PREEMPT will print a warning.
With this fix the warning goes away and only the spinlock-debugging info
is printed.
[PATCH] nfsd: check for read-only exports before setting acls
We must check for MAY_SATTR before setting acls, which includes checking
for read-only exports: the lower-level setxattr operation that
eventually sets the acl cannot check export-level restrictions.
Bug reported by Martin Walter <mawa@uni-freiburg.de>.
Jason Wessel [Tue, 20 Dec 2005 14:21:24 +0000 (15:21 +0100)]
[PATCH] kernel/params.c: fix sysfs access with CONFIG_MODULES=n
All the work was done to setup the file and maintain the file handles but
the access functions were zeroed out due to the #ifdef. Removing the
#ifdef allows full access to all the parameters when CONFIG_MODULES=n.
akpm: put it back again, but use CONFIG_SYSFS instead.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Tue, 20 Dec 2005 13:45:19 +0000 (14:45 +0100)]
[PATCH] Fix swiotlb pci_map_sg error handling
The overflow checking condition in lib/swiotlb.c was wrong.
It would first run a NULL pointer through virt_to_phys before
testing it. Since pci_map_sg overflow is not that uncommon
and causes data corruption (including broken file systems) when not
properly detected I think it's better to fix it in 2.6.15.
Whenever ywrap scrolling is selected together with 180 degree screen
rotation, 2.6.15-rc6 and earlier versions are broken. fb_pan_display()
expects non-negative yoffsets, but ud_update_start() calls it with
yoffsets down to -(yres - font height). This patch transforms yoffset
to the correct range 0 ... vyres-1.
Some obviously unneeded parentheses are removed, too.
Verified with cyblafb, should be applied before 2.6.15-final because it
does fix the framebuffer rotation code introduced early in the 2.6.15
release cycle.
[PATCH] intelfb: Fix oops when changing video mode
Reported by: janis huang (Bugzilla Bug 5747)
Fix on oops in intelfb. Not sure what's happening, looks like
dinfo->name pointer is invalidated after initialization. Remove
intelfb_get_fix, it's not needed and move the majority of the code to
the initialization routine.
The g5 thermal control for liquid cooled machines has a small bug, when
the temperatures gets too high, it boosts all fans to the max, but
incorrectly sets the liquids pump to the min instead of the max speed,
thus causing the overtemp condition not to clear and the machine to shut
down after a while. This fixes it to set the pumps to max speed instead.
This problem might explain some of the reports of random shutdowns that
some g5 users have been reporting in the past.
Many thanks to Marcus Rothe for spending a lot of time trying various
patches & sending log logs before I found out that typo. Note that
overtemp handling is still not perfect and the machine might still
shutdown, that patch should reduce if not eliminate such occcurences in
"normal" conditions with high load. I'll implement a better handling
with proper slowing down of the CPUs later.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paul Mackerras [Tue, 20 Dec 2005 04:38:47 +0000 (15:38 +1100)]
powerpc: correct register usage in 64-bit syscall exit path
Since we don't restore the volatile registers in the syscall exit
path, we need to make sure we don't leak any potentially interesting
values from the kernel to userspace. This was already the case for
all except r11. This makes it use r11 for an MSR value, so r11 will
have an (uninteresting) MSR value in it on return to userspace.
Michael Chan [Tue, 20 Dec 2005 00:27:04 +0000 (16:27 -0800)]
[TG3]: Add tw32_wait_f() for some sensitive registers
The tw32_f() function (register write with immediate read flush) can
hang when used on some registers to switch clock frequencies and
power. A new tw32_wait_f() is added for such registers with the
delay before the read and after the read.
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Tue, 20 Dec 2005 00:26:02 +0000 (16:26 -0800)]
[TG3]: Fix peer device handling
Locate the pdev_peer for dual port 5714 NIC devices in addition to
5704 devices. The name is also changed to tg3_find_peer() from
tg3_find_5704_peer(). It is also necessary to call netdev_priv() to
get to the peer's private tg3 structure.
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Neil Horman [Mon, 19 Dec 2005 22:24:40 +0000 (14:24 -0800)]
[SCTP]: Fix sctp to not return erroneous POLLOUT events.
Make sctp_writeable() use sk_wmem_alloc rather than sk_wmem_queued to
determine the sndbuf space available. It also removes all the modifications
to sk_wmem_queued as it is not currently used in SCTP.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 19 Dec 2005 22:23:23 +0000 (14:23 -0800)]
[IPSEC]: Perform SA switchover immediately.
When we insert a new xfrm_state which potentially
subsumes an existing one, make sure all cached
bundles are flushed so that the new SA is used
immediately.
Signed-off-by: David S. Miller <davem@davemloft.net>
Nicolas Pitre [Mon, 19 Dec 2005 22:20:51 +0000 (22:20 +0000)]
[ARM] 3210/1: add missing memory barrier helper for NPTL support
Patch from Nicolas Pitre
Strictly speaking, the NPTL kernel helpers are required for pre ARMv6
only. They are available on ARMv6+ as well for obvious compatibility
reasons. However there are cases where extra memory barriers are needed
when using an SMP ARMv6 machine but not on pre-ARMv6.
This patch adds a memory barrier kernel helper that glibc can use as
needed for pre-ARMv6 binaries to be forward compatible with an SMP
kernel on ARMv6, as well as the necessary dmb instructions to the
cmpxchg helper.
Signed-off-by: Nicolas Pitre <nico@cam.org> Acked-by: Daniel Jacobowitz <dan@codesourcery.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
The route expiration time is stored in rt6i_expires in jiffies.
The argument of rt6_route_add() for adding a route is not the
expiration time in jiffies nor in clock_t, but the lifetime
(or time left before expiration) in clock_t.
Because of the confusion, we sometimes saw several strange errors
(FAILs) in TAHI IPv6 Ready Logo Phase-2 Self Test.
The symptoms were analyzed by Mitsuru Chinen <CHINEN@jp.ibm.com>.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Bart De Schuymer [Mon, 19 Dec 2005 22:00:08 +0000 (14:00 -0800)]
[BRIDGE-NF]: Fix bridge-nf ipv6 length check
A typo caused some bridged IPv6 packets to get dropped randomly,
as reported by Sebastien Chaumontet. The patch below fixes this
(using skb->nh.raw instead of raw) and also makes the jumbo packet
length checking up-to-date with the code in
net/ipv6/exthdrs.c::ipv6_hop_jumbo.
Signed-off-by: Bart De Schuymer <bdschuym@pandora.be> Signed-off-by: David S. Miller <davem@davemloft.net>
Kristian Slavov [Mon, 19 Dec 2005 21:54:44 +0000 (13:54 -0800)]
[RTNETLINK]: Fix RTNLGRP definitions in rtnetlink.h
I reported a problem and gave hints to the solution, but nobody seemed
to react. So I prepared a patch against 2.6.14.4.
Tested on 2.6.14.4 with "ip monitor addr" and with the program
attached, while adding and removing IPv6 address. Both programs didn't
receive any messages. Tested 2.6.14.4 + this patch, and both programs
received add and remove messages.
Signed-off-by: Kristian Slavov <kristian.slavov@nomadiclab.com> Acked-by: Jamal Hadi salim <hadi@cyberus.ca> ACKed-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
[PATCH] V4L/DVB (3180): Fix tuner 100 definition for hauppauge eeprom
- Tuner 100 is the TUNER_PHILIPS_FMD1216ME_MK3, not TUNER_ABSENT. This
was causing the tuner module to be skipped, and rendered boards with this
value in the eeprom (like the HVR1100) unable to tune
Jean Delvare [Sat, 17 Dec 2005 22:20:55 +0000 (23:20 +0100)]
[PATCH] radeon drm: fix compilation breakage with gcc 2.95.3
Fix a typo which breaks radeon drm compilation with gcc 2.95.3.
The offending line was added back in 2.6.11-rc3, but was harmless
back then. A recent addition nearby changed it into a compilation
breaker: commit 281ab031a8c9e5b593142eb4ec59a87faae8676a.
The doubled semi-colon ends up being an empty instruction, and the
variable declaration thus ends up being in the middle of "code".
Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Mark M. Hoffman <mhoffman@lightlink.com> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Jeff Dike [Sun, 18 Dec 2005 16:50:39 +0000 (17:50 +0100)]
[PATCH] uml skas0: stop gcc's insanity
With Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
UML skas0 stub has been miscompiling for many people (incidentally not
the authors), depending on the used GCC versions.
I think (and testing on some GCC versions shows) this patch avoids the
fundamental issue which is behind this, namely gcc using the stack when
we have just replaced it, behind gcc's back. The remapping and storage
of the return value is hidden in a blob of asm, hopefully giving gcc no
room for creativity.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
So you may have seen the miniconfig stuff wander by, which means that my
build script exits if there's a .config error, and we have this:
fs/Kconfig:1749:warning: 'select' used by config symbol 'CIFS_UPCALL'
refer to undefined symbol 'CONNECTOR'
This makes it shut up.
Signed-off-by: Rob Landley <rob@landley.net>
[ Verified it makes sense. ] Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Rob Landley [Sun, 18 Dec 2005 16:50:35 +0000 (17:50 +0100)]
[PATCH] uml: fix dynamic linking on some 64-bit distros
With Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
The current UML build assumes that on x86-64 systems, /lib is a symlink
to /lib64, but in some distributions (like PLD and CentOS) they are
separate directories, so the 64 bit library loader isn't found. This
patch inserts /lib64 at the start of the rpath on x86-64 UML builds.
Signed-off-by: Rob Landley <rob@landley.net> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Salyzyn, Mark [Sun, 18 Dec 2005 03:26:30 +0000 (19:26 -0800)]
[PATCH] dpt_i2o fix for deadlock condition
Miquel van Smoorenburg <miquels@cistron.nl> forwarded me this fix to
resolve a deadlock condition that occurs due to the API change in
2.6.13+ kernels dropping the host locking when entering the error
handling. They all end up calling adpt_i2o_post_wait(), which if you
call it unlocked, might return with host_lock locked anyway and that
causes a deadlock.
Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ben Collins [Sun, 18 Dec 2005 02:39:23 +0000 (18:39 -0800)]
[PATCH] i2o: Do not disable pci device when it's in use
When dpt_i2o is loaded first, i2o being loaded would cause it to call
pci_device_disable, thus breaking dpt_i2o's use of the device. Based on
similar usage of pci_disable_device in other drivers.
Signed-off-by: Ben Collins <bcollins@ubuntu.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Russell King [Sat, 17 Dec 2005 15:25:42 +0000 (15:25 +0000)]
[ARM] Fix sys_sendto and sys_recvfrom 6-arg syscalls
Rather than providing more wrappers for 6-arg syscalls, arrange for
them to be supported as standard. This just means that we always
store the 6th argument on the stack, rather than in the wrappers.
This means we eliminate the wrappers for:
* sys_futex
* sys_arm_fadvise64_64
* sys_mbind
* sys_ipc
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Al Viro [Fri, 16 Dec 2005 22:35:23 +0000 (22:35 +0000)]
[PATCH] ppc: ppc4xx_dma DMA_MODE_{READ,WRITE} fix
DMA_MODE_{READ,WRITE} are declared in asm-powerpc/dma.h and their
declarations there match the definitions. Old declarations in
ppc4xx_dma.h are not right anymore (wrong type, to start with).
Killed them, added include of asm/dma.h where needed.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen [Fri, 16 Dec 2005 19:08:55 +0000 (11:08 -0800)]
[PATCH] PCI: Fix dumb bug in mmconfig fix
Use correct address when referencing mmconfig aperture while checking
for broken MCFG. This was a typo when porting the code from 64bit to
32bit. It caused oopses at boot on some ThinkPads.
sparc64, i386 and x86_64 have support for a special data section dedicated
to rarely updated data that is frequently read. The section was created to
avoid false sharing of those rarely read data with frequently written kernel
data.
This patch creates such a data section for ia64 and will group rarely written
data into this section.
Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Jack Steiner [Thu, 15 Dec 2005 18:41:22 +0000 (12:41 -0600)]
[IA64-SGI] Missed TLB flush
I see why the problem exists only on SN. SN uses a different hardware
mechanism to purge TLB entries across nodes.
It looks like there is a bug in the SN TLB flushing code. During context switch,
kernel threads inherit the mm of the task that was previously running on the
cpu. This confuses the code in sn2_global_tlb_purge().
The result is a missed TLB purge for the task that owns the "borrowed" mm.
(I hit the problem running heavy stress where kswapd was purging code pages of
a user task that woke kswapd. The user task took a SIGILL fault trying to
execute code in the page that had been ripped out from underneath it).
Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Linus Torvalds [Fri, 16 Dec 2005 18:21:23 +0000 (10:21 -0800)]
Make sure we copy pages inserted with "vm_insert_page()" on fork
The logic that decides that a fork() might be able to avoid copying a VM
area when it can be re-created by page faults didn't know about the new
vm_insert_page() case.
Also make some things a bit more anal wrt VM_PFNMAP.
John Hawkes [Fri, 16 Dec 2005 18:00:24 +0000 (10:00 -0800)]
[IA64] disable preemption in udelay()
The udelay() inline for ia64 uses the ITC. If CONFIG_PREEMPT is enabled
and the platform has unsynchronized ITCs and the calling task migrates
to another CPU while doing the udelay loop, then the effective delay may
be too short or very, very long.
This patch disables preemption around 100 usec chunks of the overall
desired udelay time. This minimizes preemption-holdoffs.
udelay() is now too big to be inline, move it out of line and export it.
Signed-off-by: John Hawkes <hawkes@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
This finally fixes the radeon memory mapping bug that was incorrectly
fixed by the previous patch. This time, we use the actual vram size as
the size to calculate how far to move the AGP aperture from the
framebuffer in card's memory space.
If there are still issues with this patch, they are due to bugs in the X
driver that I'm working on fixing too.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Mark M. Hoffman <mhoffman@lightlink.com> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Sergei Shtylylov [Thu, 15 Dec 2005 20:34:30 +0000 (12:34 -0800)]
[PATCH] Au1550 AC'97 OSS driver spinlock fixes
We have found some issues with Au1550 AC'97 OSS driver in 2.6
(sound/oss/au1550_ac97.c), though it also should concern 2.4 driver
(drivers/sound/au1550_psc.c).
start_dac() grabs a spinlock already held by its caller, au1550_write().
This doesn't show up with the standard UP spinlock impelmentation but when
the different one (mutex based) is in use, a lockup happens.
And the interrupt handlers also didn't grab the spinlock -- that's OK in
the usual kernel but not when the IRQ handlers are threaded. So, they're
grabbing the spinlock now (as every correct interrupt handler should do).
Signed-off-by: Konstantin Baidarov <kbaidarov@ru.mvista.com> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Paolo Galtieri [Thu, 15 Dec 2005 20:34:28 +0000 (12:34 -0800)]
[PATCH] IPMI oops fix
While doing some testing I discovered that if the BIOS on a board does not
properly setup the DMI information it leads to a panic in the IPMI code.
The panic is due to dereferencing a pointer which is not initialized. The
pointer is initialized in port_setup() and/or mem_setup() and used in
init_one_smi() and cleanup_one_si(), however if either port_setup() or
mem_setup() return ENODEV the pointer does not get initialized.
Signed-off-by: Paolo Galtieri <pgaltieri@mvista.com> Acked-by: Corey Minyard <cminyard@mvista.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>