]> err.no Git - linux-2.6/log
linux-2.6
16 years ago[IPV6]: Fix the data length of get destination options with short length
Yang Hongyang [Wed, 28 May 2008 08:27:28 +0000 (16:27 +0800)]
[IPV6]: Fix the data length of get destination options with short length

 If get destination options with length which is not enough for that
option,getsockopt() will still return the real length of the option,
which is larger then the buffer space.
 This is because ipv6_getsockopt_sticky() returns the real length of
the option.

This patch fix this problem.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
16 years ago[IPV6]: Fix the return value of get destination options with NULL data pointer
Yang Hongyang [Wed, 28 May 2008 08:23:47 +0000 (16:23 +0800)]
[IPV6]: Fix the return value of get destination options with NULL data pointer

If we pass NULL data buffer to getsockopt(), it will return 0,
and the option length is set to -EFAULT:
    getsockopt(sk, IPPROTO_IPV6, IPV6_DSTOPTS, NULL, &len);

This is because ipv6_getsockopt_sticky() will return -EFAULT or
-EINVAL if some error occur.

This patch fix this problem.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
16 years ago[IPV6] ADDRCONF: Allow longer lifetime on 64bit archs.
YOSHIFUJI Hideaki [Tue, 27 May 2008 08:37:49 +0000 (17:37 +0900)]
[IPV6] ADDRCONF: Allow longer lifetime on 64bit archs.

- Allow longer lifetimes (>= 0x7fffffff/HZ) on 64bit archs
  by using unsigned long.
- Shadow this arithmetic overflow workaround by introducing
  helper functions: addrconf_timeout_fixup() and
  addrconf_finite_timeout().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
16 years ago[IPV4] TUNNEL4: Fix incoming packet length check for inter-protocol tunnel.
YOSHIFUJI Hideaki [Fri, 30 May 2008 02:35:03 +0000 (11:35 +0900)]
[IPV4] TUNNEL4: Fix incoming packet length check for inter-protocol tunnel.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
16 years ago[IPV6] TUNNEL6: Fix incoming packet length check for inter-protocol tunnel.
Colin [Mon, 26 May 2008 16:04:43 +0000 (00:04 +0800)]
[IPV6] TUNNEL6: Fix incoming packet length check for inter-protocol tunnel.

I discover a strange behavior in [ipv4 in ipv6] tunnel. When IPv6 tunnel
payload is less than 40(0x28), packet can be sent to network, received in
physical interface, but not seen in IP tunnel interface. No counter increase
in tunnel interface.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
16 years ago[IPV6] ADDRCONF: Check range of prefix length
Thomas Graf [Wed, 28 May 2008 14:54:22 +0000 (16:54 +0200)]
[IPV6] ADDRCONF: Check range of prefix length

As of now, the prefix length is not vaildated when adding or deleting
addresses. The value is passed directly into the inet6_ifaddr structure
and later passed on to memcmp() as length indicator which relies on
the value never to exceed 128 (bits).

Due to the missing check, the currently code allows for any 8 bit
value to be passed on as prefix length while using the netlink
interface, and any 32 bit value while using the ioctl interface.

[Use unsigned int instead to generate better code - yoshfuji]

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
16 years ago[IPV6] UDP: Possible dst leak in udpv6_sendmsg.
YOSHIFUJI Hideaki [Tue, 3 Jun 2008 16:30:25 +0000 (01:30 +0900)]
[IPV6] UDP: Possible dst leak in udpv6_sendmsg.

ip6_sk_dst_lookup returns held dst entry. It should be released
on all paths beyond this point. Add missed release when up->pending
is set.

Bug report and initial patch by Denis V. Lunev <den@openvz.org>.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Acked-by: Denis V. Lunev <den@openvz.org>
16 years ago[SCTP]: Fix NULL dereference of asoc.
YOSHIFUJI Hideaki [Thu, 29 May 2008 10:55:05 +0000 (19:55 +0900)]
[SCTP]: Fix NULL dereference of asoc.

Commit 7cbca67c073263c179f605bdbbdc565ab29d801d ("[IPV6]: Support
Source Address Selection API (RFC5014)") introduced NULL dereference
of asoc to sctp_v6_get_saddr in net/sctp/ipv6.c.
Pointed out by Johann Felix Soden <johfel@users.sourceforge.net>.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
16 years agoMerge branch 'davem-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
David S. Miller [Wed, 4 Jun 2008 18:50:00 +0000 (11:50 -0700)]
Merge branch 'davem-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

16 years agotcp: Fix inconsistency source (CA_Open only when !tcp_left_out(tp))
Ilpo Järvinen [Wed, 4 Jun 2008 18:34:22 +0000 (11:34 -0700)]
tcp: Fix inconsistency source (CA_Open only when !tcp_left_out(tp))

It is possible that this skip path causes TCP to end up into an
invalid state where ca_state was left to CA_Open while some
segments already came into sacked_out. If next valid ACK doesn't
contain new SACK information TCP fails to enter into
tcp_fastretrans_alert(). Thus at least high_seq is set
incorrectly to a too high seqno because some new data segments
could be sent in between (and also, limited transmit is not
being correctly invoked there). Reordering in both directions
can easily cause this situation to occur.

I guess we would want to use tcp_moderate_cwnd(tp) there as well
as it may be possible to use this to trigger oversized burst to
network by sending an old ACK with huge amount of SACK info, but
I'm a bit unsure about its effects (mainly to FlightSize), so to
be on the safe side I just currently fixed it minimally to keep
TCP's state consistent (obviously, such nasty ACKs have been
possible this far). Though it seems that FlightSize is already
underestimated by some amount, so probably on the long term we
might want to trigger recovery there too, if appropriate, to make
FlightSize calculation to resemble reality at the time when the
losses where discovered (but such change scares me too much now
and requires some more thinking anyway how to do that as it
likely involves some code shuffling).

This bug was found by Brian Vowell while running my TCP debug
patch to find cause of another TCP issue (fackets_out
miscount).

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoFix uart_set_ldisc() function type
Linus Torvalds [Wed, 4 Jun 2008 17:35:03 +0000 (10:35 -0700)]
Fix uart_set_ldisc() function type

Commit 64e9159f5d2c4edf5fa6425031e556f8fddaf7e6 ("serial_core:
uart_set_ldisc infrastructure") introduced the ability for low-level
serial drivers to be informed when the tty ldisc changes.

However, the actual tty-layer function that does this callback for
serial devices was declared with the wrong type, having a spurious and
unused 'ldisc' argument.

This fixed the resulting compiler warning by just removing it.

Acked-by: Blithering Idiot <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agonetfilter: nf_conntrack_ipv6: fix inconsistent lock state in nf_ct_frag6_gather()
Jarek Poplawski [Wed, 4 Jun 2008 16:58:27 +0000 (09:58 -0700)]
netfilter: nf_conntrack_ipv6: fix inconsistent lock state in nf_ct_frag6_gather()

[   63.531438] =================================
[   63.531520] [ INFO: inconsistent lock state ]
[   63.531520] 2.6.26-rc4 #7
[   63.531520] ---------------------------------
[   63.531520] inconsistent {softirq-on-W} -> {in-softirq-W} usage.
[   63.531520] tcpsic6/3864 [HC0[0]:SC1[1]:HE1:SE0] takes:
[   63.531520]  (&q->lock#2){-+..}, at: [<c07175b0>] ipv6_frag_rcv+0xd0/0xbd0
[   63.531520] {softirq-on-W} state was registered at:
[   63.531520]   [<c0143bba>] __lock_acquire+0x3aa/0x1080
[   63.531520]   [<c0144906>] lock_acquire+0x76/0xa0
[   63.531520]   [<c07a8f0b>] _spin_lock+0x2b/0x40
[   63.531520]   [<c0727636>] nf_ct_frag6_gather+0x3f6/0x910
 ...

According to this and another similar lockdep report inet_fragment
locks are taken from nf_ct_frag6_gather() with softirqs enabled, but
these locks are mainly used in softirq context, so disabling BHs is
necessary.

Reported-and-tested-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetfilter: xt_connlimit: fix accouning when receive RST packet in ESTABLISHED state
Dong Wei [Wed, 4 Jun 2008 16:57:51 +0000 (09:57 -0700)]
netfilter: xt_connlimit: fix accouning when receive RST packet in ESTABLISHED state

In xt_connlimit match module, the counter of an IP is decreased when
the TCP packet is go through the chain with ip_conntrack state TW.
Well, it's very natural that the server and client close the socket
with FIN packet. But when the client/server close the socket with RST
packet(using so_linger), the counter for this connection still exsit.
The following patch can fix it which is based on linux-2.6.25.4

Signed-off-by: Dong Wei <dwei.zh@gmail.com>
Acked-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Wed, 4 Jun 2008 16:43:58 +0000 (09:43 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  [ALSA] hda - COMPAL IFL90/JFL-92 laptop quirk
  [ALSA] hda - Fix resume of auto-config mode with Realtek codecs
  [ALSA] hda - Fix model for LG LS75 laptop
  [ALSA] hda - Fix mic input on HP2133
  [ALSA] ac97 - Fix ASUS A9T laptop output

16 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 4 Jun 2008 16:15:51 +0000 (09:15 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip:
  x86, fpu: fix CONFIG_PREEMPT=y corruption of application's FPU stack
  suspend-vs-iommu: prevent suspend if we could not resume
  x86: section mismatch fix
  x86: fix Xorg crash with xf86MapVidMem error
  x86: fix pointer type warning in arch/x86/mm/init_64.c:early_memtest
  x86: fix bad pmd ffff810000207xxx(9090909090909090)
  x86: ioremap fix failing nesting check
  x86: fix broken math-emu with lazy allocation of fpu area
  x86: enable preemption in delay
  x86: disable preemption in native_smp_prepare_cpus
  x86: fix APIC warning on 32bit v2

16 years agoSmack: fuse mount hang fix
Casey Schaufler [Mon, 2 Jun 2008 17:04:32 +0000 (10:04 -0700)]
Smack: fuse mount hang fix

The d_instantiate hook for Smack can hang on the root inode of a
filesystem if the file system code has not really done all the set-up.
Fuse is known to encounter this problem.

This change detects an attempt to instantiate a root inode and addresses
it early in the processing, before any attempt is made to do something
that might hang.

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Tested-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Wed, 4 Jun 2008 15:36:56 +0000 (08:36 -0700)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  libata-sff: Fix oops reported in kerneloops.org for pnp devices with no ctl
  libata: kill unused constants
  sata_mv: PHY_MODE4 cleanups
  [libata] ata_piix: more acer short cable quirks
  [libata] ACPI: Properly handle bay devices in dock stations

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Wed, 4 Jun 2008 15:36:09 +0000 (08:36 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
  [SCSI] qla2xxx: Update version number to 8.02.01-k4.
  [SCSI] qla2xxx: Correct handling of AENs postings for vports.
  [SCSI] qla2xxx: Revert "qla2xxx: Use proper HA during asynchronous event handling."
  [SCSI] ibmvscsi: Non SCSI error status fixup
  [SCSI] fusion mpt: fix target missing after resetting external raid
  [SCSI] fix intermittent oops in scsi_bus_uevent
  [SCSI] qla2xxx: Update version number to 8.02.01-k3.
  [SCSI] qla2xxx: Revert "qla2xxx: Validate mid-layer 'underflow' during check-condition handling."
  [SCSI] qla2xxx: Disable local-interrupts while polling for RISC status.
  [SCSI] qla2xxx: Extend the 'fw_dump' SYSFS node the ability to initiate a firmware dump.
  [SCSI] qla2xxx: Don't depend on mailbox return values while enabling FCE tracing.
  [SCSI] qla2xxx: Convert vport_sem to a mutex
  [SCSI] qla2xxx: firmware semaphore to mutex
  [SCSI] qla2xxx: Correct locking within MSI-X interrupt handlers.
  [SCSI] qla2xxx: Display driver version at module init-time.
  [SCSI] qla2xxx: Return correct port_type to FC-transport for Vports.

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.26
Linus Torvalds [Wed, 4 Jun 2008 15:35:44 +0000 (08:35 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.26

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.26:
  sh: Add defconfig for RSK7203.
  sh: Update SE7206 defconfig.
  sh: Disable 4KSTACKS on nommu.
  sh: fix miscompilation of ip_fast_csum with gcc >= 4.3
  sh: module.c use kernel unaligned helpers
  sh/kernel/cpu/irq/intc-sh5.c build fix

16 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel...
Linus Torvalds [Wed, 4 Jun 2008 15:08:27 +0000 (08:08 -0700)]
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
  kgdbts: Use HW breakpoints with CONFIG_DEBUG_RODATA
  kgdb: use common ascii helpers and put_unaligned_be32 helper

16 years agobogus format in ip6mr
Al Viro [Mon, 2 Jun 2008 09:59:02 +0000 (10:59 +0100)]
bogus format in ip6mr

ptrdiff_t is %t..., not %Z...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocelleb_scc_pciex endianness misannotations
Al Viro [Mon, 2 Jun 2008 09:59:02 +0000 (10:59 +0100)]
celleb_scc_pciex endianness misannotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agompc52xx_gpio iomem annotations
Al Viro [Mon, 2 Jun 2008 09:59:02 +0000 (10:59 +0100)]
mpc52xx_gpio iomem annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agos2io iomem annotations
Al Viro [Mon, 2 Jun 2008 09:59:02 +0000 (10:59 +0100)]
s2io iomem annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocifs endianness fixes
Al Viro [Mon, 2 Jun 2008 09:59:02 +0000 (10:59 +0100)]
cifs endianness fixes

__le16 fields used as host-endian.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Steve French <smfrench@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoisp1760-if iomem annotations
Al Viro [Mon, 2 Jun 2008 09:59:02 +0000 (10:59 +0100)]
isp1760-if iomem annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agocdc-wdm endianness fixes
Al Viro [Mon, 2 Jun 2008 09:59:02 +0000 (10:59 +0100)]
cdc-wdm endianness fixes

* wMaxPacketSize is le16; copying it to a field of local structure and then
  using that field as host-endian (size of object to be allocated) is broken.
* bMaxPacketSize0 is 8-bit; feeding it to le16_to_cpu() is bogus and since the
  result is used as host-endian, it's not even misspelled cpu_to_le16().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agousb/c67x00 endianness annotations
Al Viro [Mon, 2 Jun 2008 09:59:02 +0000 (10:59 +0100)]
usb/c67x00 endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoibmaem endianness annotations
Al Viro [Mon, 2 Jun 2008 09:59:02 +0000 (10:59 +0100)]
ibmaem endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agox86, fpu: fix CONFIG_PREEMPT=y corruption of application's FPU stack
Suresh Siddha [Mon, 2 Jun 2008 22:57:27 +0000 (15:57 -0700)]
x86, fpu: fix CONFIG_PREEMPT=y corruption of application's FPU stack

Jürgen Mell reported an FPU state corruption bug under CONFIG_PREEMPT,
and bisected it to commit v2.6.19-1363-gacc2076, "i386: add sleazy FPU
optimization".

Add tsk_used_math() checks to prevent calling math_state_restore()
which can sleep in the case of !tsk_used_math(). This prevents
making a blocking call in __switch_to().

Apparently "fpu_counter > 5" check is not enough, as in some signal handling
and fork/exec scenarios, fpu_counter > 5 and !tsk_used_math() is possible.

It's a side effect though. This is the failing scenario:

process 'A' in save_i387_ia32() just after clear_used_math()

Got an interrupt and pre-empted out.

At the next context switch to process 'A' again, kernel tries to restore
the math state proactively and sees a fpu_counter > 0 and !tsk_used_math()

This results in init_fpu() during the __switch_to()'s math_state_restore()

And resulting in fpu corruption which will be saved/restored
(save_i387_fxsave and restore_i387_fxsave) during the remaining
part of the signal handling after the context switch.

Bisected-by: Jürgen Mell <j.mell@t-online.de>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Tested-by: Jürgen Mell <j.mell@t-online.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org
16 years agosuspend-vs-iommu: prevent suspend if we could not resume
Pavel Machek [Thu, 29 May 2008 07:30:21 +0000 (00:30 -0700)]
suspend-vs-iommu: prevent suspend if we could not resume

iommu/gart support misses suspend/resume code, which can do bad stuff,
including memory corruption on resume.  Prevent system suspend in case we
would be unable to resume.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Tested-by: Patrick <ragamuffin@datacomm.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: section mismatch fix
Andrew Morton [Thu, 29 May 2008 07:01:28 +0000 (00:01 -0700)]
x86: section mismatch fix

Fix this:

 WARNING: vmlinux.o(.text+0x114bb): Section mismatch in reference from
 the function nopat() to the function .cpuinit.text:pat_disable()
 The function nopat() references
 the function __cpuinit pat_disable().
 This is often because nopat lacks a __cpuinit
 annotation or the annotation of pat_disable is wrong.

Reported-by: "Fabio Comolli" <fabio.comolli@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix Xorg crash with xf86MapVidMem error
Venki Pallipadi [Thu, 29 May 2008 19:01:44 +0000 (12:01 -0700)]
x86: fix Xorg crash with xf86MapVidMem error

Clarify the usage of mtrr_lookup() in PAT code, and to make PAT code
resilient to mtrr lookup problems.

Specifically, pat_x_mtrr_type() is restructured to highlight, under what
conditions we look for mtrr hint. pat_x_mtrr_type() uses a default type
when there are any errors in mtrr lookup (still maintaining the pat
consistency). And, reserve_memtype() highlights its usage ot mtrr_lookup
for request type of '-1' and also defaults in a sane way on any mtrr
lookup failure.

pat.c looks at mtrr type of a range to get a hint on what mapping type
to request when user/API: (1) hasn't specified any type (/dev/mem
mapping) and we do not want to take performance hit by always mapping
UC_MINUS. This will be the case for /dev/mem mappings used to map BIOS
area or ACPI region which are WB'able. In this case, as long as MTRR is
not WB, PAT will request UC_MINUS for such mappings.

(2) user/API requests WB mapping while in reality MTRR may have UC or
WC. In this case, PAT can map as WB (without checking MTRR) and still
effective type will be UC or WC. But, a subsequent request to map same
region as UC or WC may fail, as the region will get trackked as WB in
PAT list. Looking at MTRR hint helps us to track based on effective type
rather than what user requested. Again, here mtrr_lookup is only used as
hint and we fallback to WB mapping (as requested by user) as default.

In both cases, after using the mtrr hint, we still go through the
memtype list to make sure there are no inconsistencies among multiple
users.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Tested-by: Rufus & Azrael <rufus-azrael@numericable.fr>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix pointer type warning in arch/x86/mm/init_64.c:early_memtest
Kevin Winchester [Fri, 30 May 2008 00:14:35 +0000 (21:14 -0300)]
x86: fix pointer type warning in arch/x86/mm/init_64.c:early_memtest

Changed the call to find_e820_area_size to pass u64 instead of unsigned long.

Signed-off-by: Kevin Winchester <kjwinchester@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: fix bad pmd ffff810000207xxx(9090909090909090)
Hugh Dickins [Wed, 28 May 2008 18:36:07 +0000 (19:36 +0100)]
x86: fix bad pmd ffff810000207xxx(9090909090909090)

OGAWA Hirofumi and Fede have reported rare pmd_ERROR messages:
mm/memory.c:127: bad pmd ffff810000207xxx(9090909090909090).

Initialization's cleanup_highmap was leaving alignment filler
behind in the pmd for MODULES_VADDR: when vmalloc's guard page
would occupy a new page table, it's not allocated, and then
module unload's vfree hits the bad 9090 pmd entry left over.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
16 years agox86: ioremap fix failing nesting check
Ingo Molnar [Tue, 27 May 2008 07:56:49 +0000 (09:56 +0200)]
x86: ioremap fix failing nesting check

Mika Kukkonen noticed that the nesting check in early_iounmap() is not
actually done.

Reported-by: Mika Kukkonen <mikukkon@srv1-m700-lanp.koti>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: torvalds@linux-foundation.org
Cc: arjan@linux.intel.com
Cc: mikukkon@iki.fi
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: fix broken math-emu with lazy allocation of fpu area
Suresh Siddha [Fri, 23 May 2008 23:26:37 +0000 (16:26 -0700)]
x86: fix broken math-emu with lazy allocation of fpu area

Fix the math emulation that got broken with the recent lazy allocation of FPU
area. init_fpu() need to be added for the math-emulation path aswell
for the FPU area allocation.

math emulation enabled kernel booted fine with this, in the presence
of "no387 nofxsr" boot param.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: hpa@zytor.com
Cc: mingo@elte.hu
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: enable preemption in delay
Steven Rostedt [Sun, 25 May 2008 15:13:32 +0000 (11:13 -0400)]
x86: enable preemption in delay

The RT team has been searching for a nasty latency. This latency shows
up out of the blue and has been seen to be as big as 5ms!

Using ftrace I found the cause of the latency.

   pcscd-2995  3dNh1 52360300us : irq_exit (smp_apic_timer_interrupt)
   pcscd-2995  3dN.2 52360301us : idle_cpu (irq_exit)
   pcscd-2995  3dN.2 52360301us : rcu_irq_exit (irq_exit)
   pcscd-2995  3dN.1 52360771us : smp_apic_timer_interrupt (apic_timer_interrupt
)
   pcscd-2995  3dN.1 52360771us : exit_idle (smp_apic_timer_interrupt)

Here's an example of a 400 us latency. pcscd took a timer interrupt and
returned with "need resched" enabled, but did not reschedule until after
the next interrupt came in at 52360771us 400us later!

At first I thought we somehow missed a preemption check in entry.S. But
I also noticed that this always seemed to happen during a __delay call.

   pcscd-2995  3dN.2 52360836us : rcu_irq_exit (irq_exit)
   pcscd-2995  3.N.. 52361265us : preempt_schedule (__delay)

Looking at the x86 delay, I found my problem.

In git commit 35d5d08a085c56f153458c3f5d8ce24123617faf, Andrew Morton
placed preempt_disable around the entire delay due to TSC's not working
nicely on SMP.  Unfortunately for those that care about latencies this
is devastating! Especially when we have callers to mdelay(8).

Here I enable preemption during the loop and account for anytime the task
migrates to a new CPU. The delay asked for may be extended a bit by
the migration, but delay only guarantees that it will delay for that minimum
time. Delaying longer should not be an issue.

[
  Thanks to Thomas Gleixner for spotting that cpu wasn't updated,
    and to place the rep_nop between preempt_enabled/disable.
]

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Cc: akpm@osdl.org
Cc: Clark Williams <clark.williams@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: "Luis Claudio R. Goncalves" <lclaudio@uudg.org>
Cc: Gregory Haskins <ghaskins@novell.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andi Kleen <andi-suse@firstfloor.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: disable preemption in native_smp_prepare_cpus
Ingo Molnar [Mon, 12 May 2008 13:44:38 +0000 (15:44 +0200)]
x86: disable preemption in native_smp_prepare_cpus

Priit Laes reported the following warning:

Call Trace:
 [<ffffffff8022f1e1>] warn_on_slowpath+0x51/0x63
 [<ffffffff80282e48>] sys_ioctl+0x2d/0x5d
 [<ffffffff805185ff>] _spin_lock+0xe/0x24
 [<ffffffff80227459>] task_rq_lock+0x3d/0x73
 [<ffffffff805133c3>] set_cpu_sibling_map+0x336/0x350
 [<ffffffff8021c1b8>] read_apic_id+0x30/0x62
 [<ffffffff806d921d>] verify_local_APIC+0x90/0x138
 [<ffffffff806d84b5>] native_smp_prepare_cpus+0x1f9/0x305
 [<ffffffff806ce7b1>] kernel_init+0x59/0x2d9
 [<ffffffff80518a26>] _spin_unlock_irq+0x11/0x2b
 [<ffffffff8020bf48>] child_rip+0xa/0x12
 [<ffffffff806ce758>] kernel_init+0x0/0x2d9
 [<ffffffff8020bf3e>] child_rip+0x0/0x12

fix this by generally disabling preemption in native_smp_prepare_cpus().

Reported-and-bisected-by: Priit Laes <plaes@plaes.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agox86: fix APIC warning on 32bit v2
Yinghai Lu [Fri, 23 May 2008 01:22:30 +0000 (18:22 -0700)]
x86: fix APIC warning on 32bit v2

for http://bugzilla.kernel.org/show_bug.cgi?id=10613

BIOS bug, APIC version is 0 for CPU#0! fixing up to 0x10. (tell your hw vendor)

v2: fix 64 bit compilation

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Gabriel C <nix.or.die@googlemail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
16 years agolibata-sff: Fix oops reported in kerneloops.org for pnp devices with no ctl
Alan Cox [Thu, 29 May 2008 21:10:58 +0000 (22:10 +0100)]
libata-sff: Fix oops reported in kerneloops.org for pnp devices with no ctl

- Make ata_sff_altstatus private so nobody uses it by mistake
- Drop the 400nS delay from it

Add

ata_sff_irq_status - encapsulates the IRQ check logic

This function keeps the existing behaviour for altstatus using devices. I
actually suspect the logic was wrong before the changes but -rc isn't the
time to play with that

ata_sff_sync - ensure writes hit the device

Really we want an io* operation for 'is posted' eg ioisposted(ioaddr) so
that we can fix the nasty delay this causes on most systems.

- ata_sff_pause - 400nS delay

Ensure the command hit the device and delay 400nS

- ata_sff_dma_pause

Ensure the I/O hit the device and enforce an HDMA1:0 transition delay.
Requires altstatus register exists, BUG if not so we don't risk
corruption in MWDMA modes. (UDMA the checksum will save your backside in
theory)

The only other complication then is devices with their own handlers.
rb532 can use dma_pause but scc needs to access its own altstatus
register for internal errata workarounds so directly call the drivers own
altstatus function.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agolibata: kill unused constants
Tejun Heo [Mon, 19 May 2008 17:17:50 +0000 (02:17 +0900)]
libata: kill unused constants

Kill a few unused constants.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosata_mv: PHY_MODE4 cleanups
Mark Lord [Sat, 31 May 2008 20:46:34 +0000 (16:46 -0400)]
sata_mv: PHY_MODE4 cleanups

The handling for PHY_MODE4 was originally just cloned from the
Marvell proprietary driver (with their blessing).
But we can do better than that.

Tidy things up with some judicious mask definitions, to improve maintainability.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago[libata] ata_piix: more acer short cable quirks
Colin Ian King [Tue, 3 Jun 2008 16:59:02 +0000 (18:59 +0200)]
[libata] ata_piix: more acer short cable quirks

Add ICH6 on ACER Aspire 1694WLMi to list of laptops that use short cables
rather than 80 wire

OriginalAuthor: Tiago Sousa
OriginalLocation: http://launchpadlibrarian.net/11627664/new.ich_laptop.short.cables.diff
Bug: #187121

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago[libata] ACPI: Properly handle bay devices in dock stations
Holger Macht [Tue, 3 Jun 2008 18:27:59 +0000 (20:27 +0200)]
[libata] ACPI: Properly handle bay devices in dock stations

* Differentiate between bay devices in dock stations and others:

 - When an ACPI_NOTIFY_EJECT_REQUEST appears, just signal uevent to
   userspace (that is when the optional eject button on a bay device is
   pressed/pulled) giving the possibility to unmount file systems and to
   clean up. Also, only send uevent in case we get an EJECT_REQUEST
   without doing anything else. In other cases, you'll get an add/remove
   event because libata attaches/detaches the device.

 - In case of a dock event, which in turn signals an
   ACPI_NOTIFY_EJECT_REQUEST, immediately detach the device, because it
   may already have been gone

* In case of an ACPI_NOTIFY_DEVICE/BUS_CHECK, evaluate _STA to check if
  the device has been plugged or unplugged. If plugged, hotplug it, if
  unplugged, just signal event to userspace
  (initial patch by Matthew Garrett <mjg59@srcf.ucam.org>)

* Call ACPI _EJ0 for detached devices

Signed-off-by: Holger Macht <hmacht@suse.de>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago[ALSA] hda - COMPAL IFL90/JFL-92 laptop quirk
Tony Vroon [Wed, 4 Jun 2008 10:08:30 +0000 (12:08 +0200)]
[ALSA] hda - COMPAL IFL90/JFL-92 laptop quirk

Use quirk table to assign ALC268_TOSHIBA to COMPAL IFL90/JFL-92 laptops.
No analog output on autoprobe.

Signed-off-by: Tony Vroon <tony@linx.net>
Tested-by: Guri <gurashka@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agoroute: Remove unused ifa_anycast field
Thomas Graf [Tue, 3 Jun 2008 23:37:33 +0000 (16:37 -0700)]
route: Remove unused ifa_anycast field

The field was supposed to allow the creation of an anycast route by
assigning an anycast address to an address prefix. It was never
implemented so this field is unused and serves no purpose. Remove it.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonetlink: Improve returned error codes
Thomas Graf [Tue, 3 Jun 2008 23:36:54 +0000 (16:36 -0700)]
netlink: Improve returned error codes

Make nlmsg_trim(), nlmsg_cancel(), genlmsg_cancel(), and
nla_nest_cancel() void functions.

Return -EMSGSIZE instead of -1 if the provided message buffer is not
big enough.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoroute: Mark unused routing attributes as such
Thomas Graf [Tue, 3 Jun 2008 23:36:27 +0000 (16:36 -0700)]
route: Mark unused routing attributes as such

Also removes an unused policy entry for an attribute which is
only used in kernel->user direction.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoroute: Mark unused route cache flags as such.
Thomas Graf [Tue, 3 Jun 2008 23:36:01 +0000 (16:36 -0700)]
route: Mark unused route cache flags as such.

Also removes an obsolete check for the unused flag RTCF_MASQ.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet_dma: remove duplicate assignment in dma_skb_copy_datagram_iovec
Brice Goglin [Tue, 3 Jun 2008 23:07:45 +0000 (16:07 -0700)]
net_dma: remove duplicate assignment in dma_skb_copy_datagram_iovec

No need to compute copy twice in the frags loop in
dma_skb_copy_datagram_iovec().

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agonet: neighbour table ABI problem
Stephen Hemminger [Tue, 3 Jun 2008 23:03:15 +0000 (16:03 -0700)]
net: neighbour table ABI problem

The neighbor table time of last use information is returned in the
incorrect unit. Kernel to user space ABI's need to use USER_HZ (or
milliseconds), otherwise the application has to try and discover the
real system HZ value which is problematic.  Linux has standardized on
keeping USER_HZ consistent (100hz) even when kernel is running
internally at some other value.

This change is small, but it breaks the ABI for older version of
iproute2 utilities.  But these utilities are already broken since they
are looking at the psched_hz values which are completely different. So
let's just go ahead and fix both kernel and user space. Older
utilities will just print wrong values.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobridge: update URL
Adrian Bunk [Tue, 3 Jun 2008 23:00:01 +0000 (16:00 -0700)]
bridge: update URL

This patch updates the URL of the bridge homepage.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agosparc: switch /proc/led to seq_file
Alexey Dobriyan [Tue, 3 Jun 2008 22:21:21 +0000 (15:21 -0700)]
sparc: switch /proc/led to seq_file

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoirda: Sock leak on error path in irda_create.
Pavel Emelyanov [Tue, 3 Jun 2008 22:18:36 +0000 (15:18 -0700)]
irda: Sock leak on error path in irda_create.

Bad type/protocol specified result in sk leak.

Fix is simple - release the sk if bad values are given,
but to make it possible just to call sk_free(), I move
some sk initialization a bit lower.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoax25: Fix NULL pointer dereference and lockup.
Jarek Poplawski [Tue, 3 Jun 2008 21:53:46 +0000 (14:53 -0700)]
ax25: Fix NULL pointer dereference and lockup.

From: Jarek Poplawski <jarkao2@gmail.com>

There is only one function in AX25 calling skb_append(), and it really
looks suspicious: appends skb after previously enqueued one, but in
the meantime this previous skb could be removed from the queue.

This patch Fixes it the simple way, so this is not fully compatible with
the current method, but testing hasn't shown any problems.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agobluetooth: rfcomm_dev_state_change deadlock fix
Dave Young [Mon, 2 Jun 2008 06:50:52 +0000 (23:50 -0700)]
bluetooth: rfcomm_dev_state_change deadlock fix

There's logic in __rfcomm_dlc_close:
rfcomm_dlc_lock(d);
d->state = BT_CLOSED;
d->state_changed(d, err);
rfcomm_dlc_unlock(d);

In rfcomm_dev_state_change, it's possible that rfcomm_dev_put try to
take the dlc lock, then we will deadlock.

Here fixed it by unlock dlc before rfcomm_dev_get in
rfcomm_dev_state_change.

why not unlock just before rfcomm_dev_put? it's because there's
another problem.  rfcomm_dev_get/rfcomm_dev_del will take
rfcomm_dev_lock, but in rfcomm_dev_add the lock order is :
rfcomm_dev_lock --> dlc lock

so I unlock dlc before the taken of rfcomm_dev_lock.

Actually it's a regression caused by commit
1905f6c736cb618e07eca0c96e60e3c024023428 ("bluetooth :
__rfcomm_dlc_close lock fix"), the dlc state_change could be two
callbacks : rfcomm_sk_state_change and rfcomm_dev_state_change. I
missed the rfcomm_sk_state_change that time.

Thanks Arjan van de Ven <arjan@linux.intel.com> for the effort in
commit 4c8411f8c115def968820a4df6658ccfd55d7f1a ("bluetooth: fix
locking bug in the rfcomm socket cleanup handling") but he missed the
rfcomm_dev_state_change lock issue.

Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoserial_core: uart_set_ldisc infrastructure
Alan Cox [Tue, 3 Jun 2008 14:18:54 +0000 (15:18 +0100)]
serial_core: uart_set_ldisc infrastructure

The tty layer provides a callback that is used when the line discipline
is changed. Some hardware uses this to configure hardware specific
features such as IrDA mode on serial ports. Unfortunately the serial
layer does not provide this feature or pass it down to drivers.

Blackfin used to hack around this by rewriting the tty ops, but those are
now properly shared and const so the hack fails. Instead provide the
proper operations.

This change plus a follow up from the Blackfin guys is needed to avoid
blackfin losing features in this release.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[ALSA] hda - Fix resume of auto-config mode with Realtek codecs
Takashi Iwai [Tue, 3 Jun 2008 12:46:34 +0000 (14:46 +0200)]
[ALSA] hda - Fix resume of auto-config mode with Realtek codecs

The auto-config mode of Realtek ALC codecs has a bug since 2.6.25
that it cannot resume properly.  The problem was the wrong assignment
of init_hook that overrides the whole initialization.

Relevant bug reports:
http://bugzilla.kernel.org/show_bug.cgi?id=10662
https://bugzilla.novell.com/show_bug.cgi?id=385473

Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 years agosh: Add defconfig for RSK7203.
Paul Mundt [Tue, 3 Jun 2008 11:30:10 +0000 (20:30 +0900)]
sh: Add defconfig for RSK7203.

RSK7203 is supportable through the generic machvec, so we add a defconfig
for those bits. This gets updated with more complete board support later.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: Update SE7206 defconfig.
Paul Mundt [Tue, 3 Jun 2008 11:29:55 +0000 (20:29 +0900)]
sh: Update SE7206 defconfig.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agoPNP: mark resources that conflict with PCI devices "disabled"
Bjorn Helgaas [Mon, 2 Jun 2008 22:42:49 +0000 (16:42 -0600)]
PNP: mark resources that conflict with PCI devices "disabled"

Both the PNP/PCI conflict detection quirk and the PNP system
driver must use the same mechanism to mark resources as disabled.

I think it's best to keep the resource and to keep the type bit
(IORESOURCE_MEM, etc), so that we match the list from firmware
as closely as possible.

Fixes this regression from 2.6.25: http://lkml.org/lkml/2008/6/1/82

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Tested-by: Avuton Olrich <avuton@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Mon, 2 Jun 2008 22:30:44 +0000 (15:30 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  [CRYPTO] cts: Init SG tables

16 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
Linus Torvalds [Mon, 2 Jun 2008 22:28:45 +0000 (15:28 -0700)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  [PATCH 3/3] ocfs2/net: Silence build warnings
  [PATCH 2/3] ocfs2/dlm: Silence build warnings
  [PATCH 1/3] ocfs2/net: Silence build warnings
  ocfs2: Rename 'user_stack' plugin structure to 'ocfs2_user_plugin'

16 years agommc_spi: mmc_spi.h should include linux/interrupts.h
Anton Vorontsov [Sun, 1 Jun 2008 09:49:32 +0000 (11:49 +0200)]
mmc_spi: mmc_spi.h should include linux/interrupts.h

Since mmc_spi.h uses irqreturn_t type, it should include appropriate
header, otherwise build will break if users didn't include it (some of
them do not use interrupts).

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
Linus Torvalds [Mon, 2 Jun 2008 22:26:02 +0000 (15:26 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  kbuild: fix $(src) assignmnet with external modules

16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney...
Linus Torvalds [Mon, 2 Jun 2008 22:25:27 +0000 (15:25 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
  8250 Serial Driver: revert extra IRQ flag definition patch
  Blackfin arch: update anomaly headers from toolchain trunk
  Blackfin arch: Remove bad and usless code
  Blackfin arch: Fix bug - set corret SSEL and IRQ to enable AD7877 on BF527
  Blackfin arch: Fix typo. it should be _outsw_8
  Blackfin arch: Cleanup no functional changes

16 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Mon, 2 Jun 2008 22:25:03 +0000 (15:25 -0700)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Fix DMA nodes in the MPC8610 HPCD device tree
  [POWERPC] Export empty_zero_page and copy_page in arch/ppc
  [POWERPC] Add "memory" clobber to MMIO accessors
  [POWERPC] pasemi: update pasemi_defconfig, enable electra_cf
  electra_cf: Add MODULE_DEVICE_TABLE()

16 years ago[CRYPTO] cts: Init SG tables
Alexey Dobriyan [Mon, 2 Jun 2008 05:46:51 +0000 (15:46 +1000)]
[CRYPTO] cts: Init SG tables

Steps to reproduce:

modprobe tcrypt # with CONFIG_DEBUG_SG=y

testing cts(cbc(aes)) encryption
test 1 (128 bit key):
------------[ cut here ]------------
kernel BUG at include/linux/scatterlist.h:65!
invalid opcode: 0000 [1] PREEMPT SMP DEBUG_PAGEALLOC
CPU 0
Modules linked in: tea xts twofish twofish_common tcrypt(+) [maaaany]
Pid: 16151, comm: modprobe Not tainted 2.6.26-rc4-fat #7
RIP: 0010:[<ffffffffa0bf032e>]  [<ffffffffa0bf032e>] :cts:cts_cbc_encrypt+0x151/0x355
RSP: 0018:ffff81016f497a88  EFLAGS: 00010286
RAX: ffffe20009535d58 RBX: ffff81016f497af0 RCX: 0000000087654321
RDX: ffff8100010d4f28 RSI: ffff81016f497ee8 RDI: ffff81016f497ac0
RBP: ffff81016f497c38 R08: 0000000000000000 R09: 0000000000000011
R10: ffffffff00000008 R11: ffff8100010d4f28 R12: ffff81016f497ac0
R13: ffff81016f497b30 R14: 0000000000000010 R15: 0000000000000010
FS:  00007fac6fa276f0(0000) GS:ffffffff8060e000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00007f12ca7cc000 CR3: 000000016f441000 CR4: 00000000000026e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff4ff0 DR7: 0000000000000400
Process modprobe (pid: 16151, threadinfo ffff81016f496000, task ffff8101755b4ae0)
Stack:  0000000000000001 ffff81016f496000 ffffffff80719f78 0000000000000001
 0000000000000001 ffffffff8020c87c ffff81016f99c918 20646c756f772049
 65687420656b696c 0000000000000020 0000000000000000 0000000033341102
Call Trace:
 [<ffffffff8020c87c>] ? restore_args+0x0/0x30
 [<ffffffffa04aa311>] ? :aes_generic:crypto_aes_expand_key+0x311/0x369
 [<ffffffff802ab453>] ? check_object+0x15a/0x213
 [<ffffffff802aad22>] ? init_object+0x6e/0x76
 [<ffffffff802ac3ae>] ? __slab_free+0xfc/0x371
 [<ffffffffa0bf05ed>] :cts:crypto_cts_encrypt+0xbb/0xca
 [<ffffffffa07108de>] ? :crypto_blkcipher:setkey+0xc7/0xec
 [<ffffffffa07110b8>] :crypto_blkcipher:async_encrypt+0x38/0x3a
 [<ffffffffa2ce9341>] :tcrypt:test_cipher+0x261/0x7c6
 [<ffffffffa2cfd9df>] :tcrypt:tcrypt_mod_init+0x9df/0x1b30
 [<ffffffff80261e35>] sys_init_module+0x9e/0x1b2
 [<ffffffff8020c15a>] system_call_after_swapgs+0x8a/0x8f
Code: 45 c0 e8 aa 24 63 df 48 c1 e8 0c 48 b9 00 00 00 00 00 e2 ff ff 48 8b 55 88 48 6b c0 68 48 01 c8 b9 21 43 65 87 48 39 4d 80 74 04 <0f> 0b eb fe f6 c2 01 74 04 0f 0b eb fe 83 e2 03 4c 89 ef 44 89
RIP  [<ffffffffa0bf032e>] :cts:cts_cbc_encrypt+0x151/0x355
 RSP <ffff81016f497a88>
---[ end trace e8bahiarjand37fd ]---

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
16 years agosh: Disable 4KSTACKS on nommu.
Paul Mundt [Mon, 2 Jun 2008 04:48:59 +0000 (13:48 +0900)]
sh: Disable 4KSTACKS on nommu.

4k stacks on nommu ends up blowing up with all sorts of interesting
slab corruption. Disable this by default unless BROKEN is also
enabled.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: fix miscompilation of ip_fast_csum with gcc >= 4.3
Paul Mundt [Mon, 2 Jun 2008 03:40:14 +0000 (12:40 +0900)]
sh: fix miscompilation of ip_fast_csum with gcc >= 4.3

As noted by Matthew Wilcox:

    Kyle McMartin just tracked down a bug on parisc to a missing
    "memory" clobber in the inline assembly implementation of
    ip_fast_csum.  The FRV, SH and Xtensa ports are also missing a
    memory clobber, so I thought it would be polite to let you know.

    The bug manifests as dropped network packets (obviously they have
    the wrong checksum).  It started appearing for parisc with GCC 4.3.

    The GCC manual says:

     If your assembler instructions access memory in an unpredictable
     fashion, add `memory' to the list of clobbered registers.  This
     will cause GCC to not keep memory values cached in registers
     across the assembler instruction and not optimize stores or loads
     to that memory.

    I see that FRV has a 400 byte memory output which may prevent this
    problem from appearing, but SH and Xtensa have nothing to prevent
    this bug.  Hope this saves you a few days of debugging.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh: module.c use kernel unaligned helpers
Harvey Harrison [Wed, 28 May 2008 23:38:17 +0000 (16:38 -0700)]
sh: module.c use kernel unaligned helpers

Replace the COPY_UNALIGNED_WORD helper.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agosh/kernel/cpu/irq/intc-sh5.c build fix
Adrian Bunk [Thu, 29 May 2008 22:04:49 +0000 (01:04 +0300)]
sh/kernel/cpu/irq/intc-sh5.c build fix

This patch fixes the following build error caused by
commit a1dc4b59fa4af97ae68ee214d4d72bbd7c7ec1dc
(sh: intc_sh5 depends on cayman board for IRQ priority table.):

<--  snip  -->

...
  CC      arch/sh/kernel/cpu/irq/intc-sh5.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/sh/kernel/cpu/irq/intc-sh5.c: In function 'plat_irq_setup':
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/sh/kernel/cpu/irq/intc-sh5.c:257: error: expected declaration or statement at end of input
make[4]: *** [arch/sh/kernel/cpu/irq/intc-sh5.o] Error 1

<--  snip  -->

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
16 years agokbuild: fix $(src) assignmnet with external modules
Sam Ravnborg [Sat, 31 May 2008 20:28:40 +0000 (22:28 +0200)]
kbuild: fix $(src) assignmnet with external modules

When we introduced support for KBUILD_EXTRA_SYMBOLS
we started to include the externam module's kbuild
file when doing the final modpost step.

As external modules often do:
ccflags-y := -I$(src)

We had problems because $(src) was unassinged and
gcc then used the next parameter for -I resulting in
strange build failures.

Fix is to assign $(src) and $(obj) when building
external modules.

This fixes: http://bugzilla.kernel.org/show_bug.cgi?id=10798

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Tvrtko <tvrtko.ursulin@sophos.com>
Cc: Andrea Arcangeli <andrea@qumranet.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
16 years ago8250 Serial Driver: revert extra IRQ flag definition patch
Bryan Wu [Sat, 31 May 2008 08:10:04 +0000 (16:10 +0800)]
8250 Serial Driver: revert extra IRQ flag definition patch

As Russell pointed out, original patch will break some serial configurations
because of the dependency of the <asm/serial.h> header file.

Revert it first and try to find out other solution later

Cc: Javier Herrero <jherrero@hvsistemas.es>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: update anomaly headers from toolchain trunk
Mike Frysinger [Sat, 31 May 2008 07:47:17 +0000 (15:47 +0800)]
Blackfin arch: update anomaly headers from toolchain trunk

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: Remove bad and usless code
Michael Hennerich [Sat, 31 May 2008 07:35:40 +0000 (15:35 +0800)]
Blackfin arch: Remove bad and usless code

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years agoBlackfin arch: Fix bug - set corret SSEL and IRQ to enable AD7877 on BF527
Bryan Wu [Sat, 31 May 2008 07:17:25 +0000 (15:17 +0800)]
Blackfin arch: Fix bug - set corret SSEL and IRQ to enable AD7877 on BF527

AD7877 use SSEL_2 (P9.9) and IRQ_PF8 (P9.14) on BF527

 - populating JP3 to enable STAMP
 - disable SW11.2 to disconnect SSEL_2/PF12 from Rotary NAND
 - disable SW18.1 to disconnect SSEL_2 from MAX1233 touchscreen chip

Signed-off-by: Bryan Wu <cooloney@kernel.org>
16 years ago[POWERPC] Fix DMA nodes in the MPC8610 HPCD device tree
Timur Tabi [Fri, 30 May 2008 22:12:05 +0000 (08:12 +1000)]
[POWERPC] Fix DMA nodes in the MPC8610 HPCD device tree

The node for DMA2 in the MPC8610 HPCD device tree has the wrong compatible
properties.  This breaks the DMA driver and the sound driver.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Export empty_zero_page and copy_page in arch/ppc
Tony Breeds [Wed, 28 May 2008 00:52:19 +0000 (10:52 +1000)]
[POWERPC] Export empty_zero_page and copy_page in arch/ppc

Currently ext4 and fuse fail to link if modular:
ERROR: "copy_page" [fs/fuse/fuse.ko] undefined!
ERROR: "empty_zero_page" [fs/ext4/ext4dev.ko] undefined!
make[3]: *** [__modpost] Error 1
make[2]: *** [modules] Error 2
make[1]: *** [sub-make] Error 2

While arch ppc exists it may as well compile, so this exports those
symbols (which are already exported in arch/powerpc).

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Add "memory" clobber to MMIO accessors
Benjamin Herrenschmidt [Wed, 28 May 2008 00:18:17 +0000 (10:18 +1000)]
[POWERPC] Add "memory" clobber to MMIO accessors

Gcc might re-order MMIO accessors vs. surrounding consistent
memory accesses, which is a "bad thing", and could break drivers.
This fixes it by adding a "memory" clobber to the MMIO accessors,
which should prevent gcc from doing that reordering.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[netdrvr] tulip: oops in tulip_interrupt when hibernating with swsusp/suspend2
Grant Grundler [Mon, 12 May 2008 06:37:51 +0000 (00:37 -0600)]
[netdrvr] tulip: oops in tulip_interrupt when hibernating with swsusp/suspend2

The following patch is seems to fix the tulip suspend/resume panic:
http://bugzilla.kernel.org/show_bug.cgi?id=8952#c46

My attempts at a cleaner patch failed and Pavel thinks this is OK.

Original from:  kernelbugs@tap.homeip.net
Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoatl1: fix 4G memory corruption bug
Alexey Dobriyan [Thu, 22 May 2008 22:00:25 +0000 (02:00 +0400)]
atl1: fix 4G memory corruption bug

When using 4+ GB RAM and SWIOTLB is active, the driver corrupts
memory by writing an skb after the relevant DMA page has been
unmapped.  Although this doesn't happen when *not* using bounce
buffers, clearing the pointer to the DMA page after unmapping
it fixes the problem.

http://marc.info/?t=120861317000005&r=2&w=2

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoucc_geth_ethtool: Add a missing HW stats counter
Li Yang [Fri, 23 May 2008 10:11:27 +0000 (18:11 +0800)]
ucc_geth_ethtool: Add a missing HW stats counter

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoucc_geth_ethtool: Fix typo
Joakim Tjernlund [Fri, 23 May 2008 10:11:26 +0000 (18:11 +0800)]
ucc_geth_ethtool: Fix typo

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agovirtio: fix delayed xmit of packet and freeing of old packets.
Rusty Russell [Mon, 26 May 2008 07:48:13 +0000 (17:48 +1000)]
virtio: fix delayed xmit of packet and freeing of old packets.

Because we cache the last failed-to-xmit packet, if there are no
packets queued behind that one we may never send it (reproduced here
as TCP stalls, "cured" by an outgoing ping).

Cc: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agovirtio: fix virtio_net xmit of freed skb bug
Rusty Russell [Mon, 26 May 2008 07:42:42 +0000 (17:42 +1000)]
virtio: fix virtio_net xmit of freed skb bug

If we fail to transmit a packet, we assume the queue is full and put
the skb into last_xmit_skb.  However, if more space frees up before we
xmit it, we loop, and the result can be transmitting the same skb twice.

Fix is simple: set skb to NULL if we've used it in some way, and check
before sending.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agomyri10ge: update driver version
Brice Goglin [Wed, 28 May 2008 07:10:01 +0000 (09:10 +0200)]
myri10ge: update driver version

Update myri10ge version to 1.3.99-1.347.

Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agosc92031: remove bogus unlikely()
Cesar Eduardo Barros [Fri, 30 May 2008 00:58:36 +0000 (21:58 -0300)]
sc92031: remove bogus unlikely()

Commit 5a0a92e67b5009a71e011658da04fb92dad8961f mentions len < ETH_ZLEN
is true for ARP packets. This obviously is not unlikely.

Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago[netdrvr] CS89X0: Add cleanup for dma after fail
Wang Chen [Fri, 30 May 2008 03:18:55 +0000 (11:18 +0800)]
[netdrvr] CS89X0: Add cleanup for dma after fail

After request_dma() succeeding, any error path should do free_dma().

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years ago[netdrvr] sfc: Report XAUI link down at default log level
Ben Hutchings [Fri, 30 May 2008 21:18:35 +0000 (22:18 +0100)]
[netdrvr] sfc: Report XAUI link down at default log level

This is normal when the external link is down so don't report it as an error.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
16 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Fri, 30 May 2008 22:39:05 +0000 (15:39 -0700)]
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  ahci: change the Device IDs of nvidia MCP7B AHCI controller in ahci.c
  [libata] sata_fsl: Fix broken driver, add port multiplier (PMP) support
  libata: SRST can't be trusted on PMP sil3726
  libata: fix libata-scsi kernel-doc notation
  ata: Convert to static DEFINE_SPINLOCK(lock)
  ata_piix: fix macbook ich8m problems
  sata_mv: implement SoC guideline SATA_S11
  sata_mv: workaround for 60x1 errata sata13
  sata_mv: nuke unreleased GenIIe revisions
  sata_mv: PHY_MODEx errata fixes
  sata_mv: move SOC_FLAG to hpriv

16 years ago[PATCH 3/3] ocfs2/net: Silence build warnings
Sunil Mushran [Tue, 13 May 2008 01:31:37 +0000 (18:31 -0700)]
[PATCH 3/3] ocfs2/net: Silence build warnings

This patch silences the build warnings concerning o2net_init_nst()
and friends when building without CONFIG_DEBUG_FS enabled.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
16 years ago[PATCH 2/3] ocfs2/dlm: Silence build warnings
Sunil Mushran [Tue, 13 May 2008 01:31:36 +0000 (18:31 -0700)]
[PATCH 2/3] ocfs2/dlm: Silence build warnings

This patch silences the build warnings concerning dlm_debug_init()
and friends when building without CONFIG_DEBUG_FS enabled.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
16 years ago[PATCH 1/3] ocfs2/net: Silence build warnings
Sunil Mushran [Tue, 13 May 2008 01:31:35 +0000 (18:31 -0700)]
[PATCH 1/3] ocfs2/net: Silence build warnings

This patch silences the build warnings concerning o2net_debugfs_init()
and friends when building without CONFIG_DEBUG_FS enabled.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
16 years agoocfs2: Rename 'user_stack' plugin structure to 'ocfs2_user_plugin'
Joel Becker [Sat, 10 May 2008 01:49:29 +0000 (18:49 -0700)]
ocfs2: Rename 'user_stack' plugin structure to 'ocfs2_user_plugin'

The static structure describing the userspace cluster plugin for ocfs2
was named 'user_stack', which is a real pain when people are grep(1)ing
the tree for the program stack object 'user_stack'.  Change the name to
something distinct and namespaced.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
16 years agoMark 'scripts/decodecode' executable
Linus Torvalds [Fri, 30 May 2008 21:02:21 +0000 (14:02 -0700)]
Mark 'scripts/decodecode' executable

.. because it is.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[SCSI] qla2xxx: Update version number to 8.02.01-k4.
Andrew Vasquez [Mon, 19 May 2008 21:25:41 +0000 (14:25 -0700)]
[SCSI] qla2xxx: Update version number to 8.02.01-k4.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Correct handling of AENs postings for vports.
Seokmann Ju [Mon, 19 May 2008 21:25:40 +0000 (14:25 -0700)]
[SCSI] qla2xxx: Correct handling of AENs postings for vports.

Initialize all proper structure members in order to support
work-list vport processing.  This code also properly acquires the
correct (physical hardware_lock) lock during work submission.

Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
16 years ago[SCSI] qla2xxx: Revert "qla2xxx: Use proper HA during asynchronous event handling."
Seokmann Ju [Mon, 19 May 2008 21:25:39 +0000 (14:25 -0700)]
[SCSI] qla2xxx: Revert "qla2xxx: Use proper HA during asynchronous event handling."

This reverts commit bd2a1846b2313e32d0270151a31a6b8335384a20.
The original (prior to the reverted commit) code was correct.
Additionally, the vp_idx should be checked during MBA_PORT_UPDATE
in order for proper handling to take place for a given vport.

Signed-off-by: Seokmann Ju <seokmann.ju@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>