safe/jmp/linux-2.6
18 years ago[PATCH] nfsd to unlock kernel before exiting
Steven Rostedt [Wed, 17 Aug 2005 18:25:23 +0000 (14:25 -0400)]
[PATCH] nfsd to unlock kernel before exiting

The nfsd holds the big kernel lock upon exit, when it really shouldn't.
Not to mention that this breaks Ingo's RT patch. This is a trivial fix
to release the lock.

Ingo, this patch also works with your kernel, and stops the problem with
nfsd.

Note, there's a "goto out;" where "out:" is right above svc_exit_thread.
The point of the goto also holds the kernel_lock, so I don't see any
problem here in releasing it.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] NPTL signal delivery deadlock fix
Bhavesh P. Davda [Wed, 17 Aug 2005 18:26:33 +0000 (12:26 -0600)]
[PATCH] NPTL signal delivery deadlock fix

This bug is quite subtle and only happens in a very interesting
situation where a real-time threaded process is in the middle of a
coredump when someone whacks it with a SIGKILL.  However, this deadlock
leaves the system pretty hosed and you have to reboot to recover.

Not good for real-time priority-preemption applications like our
telephony application, with 90+ real-time (SCHED_FIFO and SCHED_RR)
processes, many of them multi-threaded, interacting with each other for
high volume call processing.

Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 17 Aug 2005 15:21:00 +0000 (08:21 -0700)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6

18 years ago[PATCH] iSeries build with newer assemblers and compilers
Stephen Rothwell [Wed, 17 Aug 2005 03:01:50 +0000 (13:01 +1000)]
[PATCH] iSeries build with newer assemblers and compilers

Paulus suggested that we put xLparMap in its own .c file so that we can
generate a .s file to be included into head.S.  This doesn't get around
the problem of having it at a fixed address, but it makes it more
palatable.

It would be good if this could be included in 2.6.13 as it solves our
build problems with various versions of binutils and gcc.  In
particular, it allows us to build an iSeries kernel on Debian unstable
using their biarch compiler.

This has been built and booted on iSeries and built for pSeries and g5.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] USB: usbmon: Copyrights and a typo
Pete Zaitcev [Tue, 16 Aug 2005 22:16:46 +0000 (15:16 -0700)]
[PATCH] USB: usbmon: Copyrights and a typo

Add copyright statements and fix a typo.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] USB: fix usb wacom tablet driver bug
Ping Cheng [Tue, 16 Aug 2005 22:16:32 +0000 (15:16 -0700)]
[PATCH] USB: fix usb wacom tablet driver bug

This patch fixes bug 4905 and a Cintiq 21UX bug.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] PCI: update documentation
Jiri Slaby [Tue, 16 Aug 2005 22:16:26 +0000 (15:16 -0700)]
[PATCH] PCI: update documentation

This removes very old functions from pci docs, which are no longer in
the kernel.

Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] PCI Hotplug: new contact info
Kristen Accardi [Tue, 16 Aug 2005 22:16:10 +0000 (15:16 -0700)]
[PATCH] PCI Hotplug: new contact info

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] PCI: fix quirk-6700-fix.patch
Andrew Morton [Tue, 16 Aug 2005 22:16:05 +0000 (15:16 -0700)]
[PATCH] PCI: fix quirk-6700-fix.patch

drivers/built-in.o(.text+0x32c3): In function `quirk_pcie_pxh':
/usr/src/25/drivers/pci/quirks.c:1312: undefined reference to `disable_msi_mode'

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] PCI: 6700/6702PXH quirk
Kristen Accardi [Tue, 16 Aug 2005 22:15:58 +0000 (15:15 -0700)]
[PATCH] PCI: 6700/6702PXH quirk

On the 6700/6702 PXH part, a MSI may get corrupted if an ACPI hotplug
driver and SHPC driver in MSI mode are used together.

This patch will prevent MSI from being enabled for the SHPC as part of
an early pci quirk, as well as on any pci device which sets the no_msi
bit.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Driver core: potentially fix use after free in class_device_attr_show
Maneesh Soni [Tue, 16 Aug 2005 22:15:48 +0000 (15:15 -0700)]
[PATCH] Driver core: potentially fix use after free in class_device_attr_show

This moves the code to free devt_attr from class_device_del() to
class_dev_release() which is called after the last reference to the
corresponding kobject() is gone.

This allows us to keep the devt_attr alive while the corresponding
sysfs file is open.

Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[IPV6]: Fix SKB leak in ip6_input_finish()
Patrick McHardy [Wed, 17 Aug 2005 04:03:41 +0000 (21:03 -0700)]
[IPV6]: Fix SKB leak in ip6_input_finish()

Changing it to how ip_input handles should fix it.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TCP]: Fix bug #5070: kernel BUG at net/ipv4/tcp_output.c:864
Herbert Xu [Wed, 17 Aug 2005 03:43:40 +0000 (20:43 -0700)]
[TCP]: Fix bug #5070: kernel BUG at net/ipv4/tcp_output.c:864

1) We send out a normal sized packet with TSO on to start off.
2) ICMP is received indicating a smaller MTU.
3) We send the current sk_send_head which needs to be fragmented
since it was created before the ICMP event.  The first fragment
is then sent out.

At this point the remaining fragment is allocated by tcp_fragment.
However, its size is padded to fit the L1 cache-line size therefore
creating tail-room up to 124 bytes long.

This fragment will also be sitting at sk_send_head.

4) tcp_sendmsg is called again and it stores data in the tail-room of
of the fragment.
5) tcp_push_one is called by tcp_sendmsg which then calls tso_fragment
since the packet as a whole exceeds the MTU.

At this point we have a packet that has data in the head area being
fed to tso_fragment which bombs out.

My take on this is that we shouldn't ever call tcp_fragment on a TSO
socket for a packet that is yet to be transmitted since this creates
a packet on sk_send_head that cannot be extended.

So here is a patch to change it so that tso_fragment is always used
in this case.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6]: Fix raw socket hardware checksum failures
Patrick McHardy [Wed, 17 Aug 2005 03:39:38 +0000 (20:39 -0700)]
[IPV6]: Fix raw socket hardware checksum failures

When packets hit raw sockets the csum update isn't done yet, do it manually.
Packets can also reach rawv6_rcv on the output path through
ip6_call_ra_chain, in this case skb->ip_summed is CHECKSUM_NONE and this
codepath isn't executed.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PATCH] i386 / desc_empty macro is incorrect
Zachary Amsden [Tue, 16 Aug 2005 19:05:09 +0000 (12:05 -0700)]
[PATCH] i386 / desc_empty macro is incorrect

Chuck Ebbert noticed that the desc_empty macro is incorrect.  Fix it.

Thankfully, this is not used as a security check, but it can falsely
overwrite TLS segments with carefully chosen base / limits.  I do not
believe this is an issue in practice, but it is a kernel bug.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Chris Wright <chrisw@osdl.org>
[ x86-64 had the same problem, and the same fix. Linus ]

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge head 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/shaggy/jfs-2.6
Linus Torvalds [Tue, 16 Aug 2005 19:12:30 +0000 (12:12 -0700)]
Merge head 'for-linus' of /linux/kernel/git/shaggy/jfs-2.6

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/lenb/to-linus
Linus Torvalds [Tue, 16 Aug 2005 16:43:13 +0000 (09:43 -0700)]
Merge /pub/scm/linux/kernel/git/lenb/to-linus

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/aia21/ntfs-2.6
Linus Torvalds [Tue, 16 Aug 2005 16:31:28 +0000 (09:31 -0700)]
Merge /pub/scm/linux/kernel/git/aia21/ntfs-2.6

18 years ago[PATCH] NFS: Ensure we always update inode->i_mode when doing O_EXCL creates
Trond Myklebust [Tue, 16 Aug 2005 15:49:44 +0000 (11:49 -0400)]
[PATCH] NFS: Ensure we always update inode->i_mode when doing O_EXCL creates

When the client performs an exclusive create and opens the file for writing,
a Netapp filer will first create the file using the mode 01777. It does this
since an NFSv3/v4 exclusive create cannot immediately set the mode bits.
The 01777 mode then gets put into the inode->i_mode. After the file creation
is successful, we then do a setattr to change the mode to the correct value
(as per the NFS spec).

The problem is that nfs_refresh_inode() no longer updates inode->i_mode, so
the latter retains the 01777 mode. A bit later, the VFS notices this, and calls
remove_suid(). This of course now resets the file mode to inode->i_mode & 0777.
Hey presto, the file mode on the server is now magically changed to 0777. Duh...

Fixes http://bugzilla.linux-nfs.org/show_bug.cgi?id=32

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fix for ia64 sched-domains code
John Hawkes [Tue, 16 Aug 2005 07:59:20 +0000 (17:59 +1000)]
[PATCH] fix for ia64 sched-domains code

Fix for ia64 sched domain building triggered by cpuset code.

Acked-by: Nick Piggin <npiggin@suse.de>
Acked-by: Dinakar Guniguntala <dino@in.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] NFS: Ensure ACL xdr code doesn't overflow.
Trond Myklebust [Wed, 10 Aug 2005 22:15:12 +0000 (18:15 -0400)]
[PATCH] NFS: Ensure ACL xdr code doesn't overflow.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoNTFS: Fix bug in mft record writing where we forgot to set the device in
Anton Altaparmakov [Tue, 16 Aug 2005 15:38:28 +0000 (16:38 +0100)]
NTFS: Fix bug in mft record writing where we forgot to set the device in
      the buffers when mapping them after the VM had discarded them.
      Thanks to Martin MOKREJŠ for the bug report.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
18 years agoum: fix __pa/__va macro expansion problem
Linus Torvalds [Tue, 16 Aug 2005 00:40:46 +0000 (17:40 -0700)]
um: fix __pa/__va macro expansion problem

Proper parentheses around arguments needed, especially as the macros use
a high-precedence cast operator on the argument.

18 years agoMerge ../from-linus
Len Brown [Mon, 15 Aug 2005 20:02:50 +0000 (16:02 -0400)]
Merge ../from-linus

18 years agoMerge ../to-linus-stable/
Len Brown [Mon, 15 Aug 2005 19:49:00 +0000 (15:49 -0400)]
Merge ../to-linus-stable/

18 years ago[ACPI] re-enable platform-specific hotkey drivers by default
Luming Yu [Fri, 12 Aug 2005 04:31:00 +0000 (00:31 -0400)]
[ACPI] re-enable platform-specific hotkey drivers by default

When both platform-specific and generic drivers exist,
enable generic over-ride with "acpi_generic_hotkey".

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

Signed-off-by: Luming Yu <luming.yu@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
18 years ago[PATCH] intelfb/fbdev: Save info->flags in a local variable
Antonino A. Daplas [Mon, 15 Aug 2005 13:29:11 +0000 (21:29 +0800)]
[PATCH] intelfb/fbdev: Save info->flags in a local variable

Reported by: Pavel Kysilka (Bugzilla Bug 5059)

The intelfb driver does not keep resolution set with fbset after
switching to anot console and back.

Steps to reproduce:

  initial options: tty1,tty2 - 1024x768-60
  1) tty1 - fbset after booting (1024x768-60)
  2) tty1 - fbset 800x600-100
  tty1: 800x600-100
  3) swith to tty2, swith to tty1
  tty1: 1024x768-60 (the same resolution as default from kernel booting)

This bug is caused by intelfb unintentionally destroying info->flags in
set_par(). Therefore the flag, FBINFO_MISC_USEREVENT used to notify
fbcon of a mode change was cleared causing the above problem. This bug
though is not intelfb specific, as other drivers may also be affected.

The fix is to save info->flags in a local variable before calling any
of the driver hooks.  A more definitive fix (for post 2.6.13) is to
separate info->flags into one that is set by the driver and another that
is set by core fbdev/fbcon.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] intelfb: Do not ioremap entire graphics aperture
Sylvain Meyer [Mon, 15 Aug 2005 13:27:13 +0000 (21:27 +0800)]
[PATCH] intelfb: Do not ioremap entire graphics aperture

Reported by: Pavel Kysilka (Bugzilla Bug 4738)

modprobe of intelfb results in the following error message:

intelfb: Framebuffer driver for Intel(R) 830M/845G/852GM/855GM/865G/915G chi
intelfb: Version 0.9.2
ACPI: PCI Interrupt 0000:00:02.0[A] -> GSI 16 (level, low) -> IRQ 16
allocation failed: out of vmalloc space - use vmalloc=<size> to increase siz
intelfb: Cannot remap FB region.

This will fail if the graphics aperture size is greater than 128 MB.

Fix is to ioremap only from the beginning of graphics aperture to the
end of the used framebuffer memory.

Signed-off-by: Sylvain Meyer <sylvain.meyer@worldonline.fr>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] inotify: add MOVE_SELF event
John McCutchan [Mon, 15 Aug 2005 16:13:28 +0000 (12:13 -0400)]
[PATCH] inotify: add MOVE_SELF event

This adds a MOVE_SELF event to inotify.  It is sent whenever the inode
you are watching is moved.  We need this event so that we can catch
something like this:

 - app1:
watch /etc/mtab

 - app2:
cp /etc/mtab /tmp/mtab-work
mv /etc/mtab /etc/mtab~
mv /tmp/mtab-work /etc/mtab

app1 still thinks it's watching /etc/mtab but it's actually watching
/etc/mtab~.

Signed-off-by: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Robert Love <rml@novell.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] inotify: fix idr_get_new_above usage
Robert Love [Mon, 15 Aug 2005 16:27:54 +0000 (12:27 -0400)]
[PATCH] inotify: fix idr_get_new_above usage

We are saving the wrong thing in ->last_wd.  We want the wd, not the
return value.

Signed-off-by: Robert Love <rml@novell.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoRevert PCIBIOS_MIN_IO changes for 2.6.13
Linus Torvalds [Mon, 15 Aug 2005 01:21:30 +0000 (18:21 -0700)]
Revert PCIBIOS_MIN_IO changes for 2.6.13

This reverts commits

  71db63acff69618b3d9d3114bd061938150e146b
[PATCH] increase PCIBIOS_MIN_IO on x86

and

  0b2bfb4e7ff61f286676867c3508569bea6fbf7a
    ACPI: increase PCIBIOS_MIN_IO on x86

since Lukas Sandströ<lukass@etek.chalmers.se> reports that this breaks
his on-board nvidia audio.

We should re-visit this later. For now we revert the change

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoRevert "dc395x: Fix support for highmem"
Linus Torvalds [Sun, 14 Aug 2005 22:43:39 +0000 (15:43 -0700)]
Revert "dc395x: Fix support for highmem"

It introduces a repeatable oops in the driver, which is a bigger problem
than the patch tries to solve. From the original description:

    Author: Jamie Lenehan <lenehan@twibble.org>
    Date:   Thu Mar 3 14:41:40 2005 +0200

    [PATCH] dc395x: Fix support for highmem

    From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

    Removes the page_to_virt and maps sg lists dynamically.
    This makes the driver work with highmem pages.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Jamie Lenehan <lenehan@twibble.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] CIFS: Fix path name conversion for long filenames
Steve French [Sun, 14 Aug 2005 21:55:23 +0000 (16:55 -0500)]
[PATCH] CIFS: Fix path name conversion for long filenames

Fix path name conversion for long filenames when mapchars mount option
was specified at mount time.

Signed-off-by: Steve French (sfrench@us.ibm.com)
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] CIFS: Fix missing entries in search results
Steve French [Sun, 14 Aug 2005 21:55:23 +0000 (16:55 -0500)]
[PATCH] CIFS: Fix missing entries in search results

Fix missing entries in search results when very long file names and more
than 50 (or so) of such long search entries in the directory.

FindNext could send corrupt last byte of resume name when resume key was
a few hundred bytes long file name or longer.

Fixes Samba Bug # 2932

Signed-off-by: Steve French (sfrench@us.ibm.com)
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Fix error handling in reiserfs
Jan Kara [Sat, 13 Aug 2005 11:15:34 +0000 (13:15 +0200)]
[PATCH] Fix error handling in reiserfs

Initialize key object ID in inode so that we don't try to remove the inode
when we fail on some checks even before we manage to allocate something.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sh: Make _syscall6() do the right thing.
Paul Mundt [Sat, 13 Aug 2005 17:28:06 +0000 (20:28 +0300)]
[PATCH] sh: Make _syscall6() do the right thing.

There was a rather silly and embarrassing typo in the sh _syscall6().
For the syscall ABI we have the trapa value specified as 0x10 + number
of arguments, this was being set incorrectly in the _syscall6() case
which ended up causing some problems for users.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoFix up mmap of /dev/kmem
Linus Torvalds [Sat, 13 Aug 2005 21:22:59 +0000 (14:22 -0700)]
Fix up mmap of /dev/kmem

This leaves the issue of whether we should deprecate the whole thing (or
if we should check the whole mmap range, for that matter) open. Just do
the minimal fix for now.

18 years ago[PATCH] w1: more debug level decrease.
Evgeniy Polyakov [Fri, 12 Aug 2005 18:46:22 +0000 (11:46 -0700)]
[PATCH] w1: more debug level decrease.

Do not spam syslog each 10 seconds when there is nothing on the wire.

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 12 Aug 2005 16:22:34 +0000 (09:22 -0700)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6

18 years ago[PATCH] x86_64: Fix apicid versus cpu# confusion.
Eric W. Biederman [Fri, 12 Aug 2005 04:26:25 +0000 (22:26 -0600)]
[PATCH] x86_64: Fix apicid versus cpu# confusion.

Oops.  I knew I didn't have the physical versus logical cpu identifiers right
when I generated that patch.  It's not nearly as bad as I feared at the time
though.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[NETPOLL]: remove unused variable
Matt Mackall [Fri, 12 Aug 2005 02:28:05 +0000 (19:28 -0700)]
[NETPOLL]: remove unused variable

Remove unused variable

Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETPOLL]: fix initialization/NAPI race
Matt Mackall [Fri, 12 Aug 2005 02:27:43 +0000 (19:27 -0700)]
[NETPOLL]: fix initialization/NAPI race

This fixes a race during initialization with the NAPI softirq
processing by using an RCU approach.

This race was discovered when refill_skbs() was added to
the setup code.

Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETPOLL]: pre-fill skb pool
Ingo Molnar [Fri, 12 Aug 2005 02:26:42 +0000 (19:26 -0700)]
[NETPOLL]: pre-fill skb pool

we could do one thing (see the patch below): i think it would be useful
to fill up the netlogging skb queue straight at initialization time.
Especially if netpoll is used for dumping alone, the system might not be
in a situation to fill up the queue at the point of crash, so better be
a bit more prepared and keep the pipeline filled.

[ I've modified this to be called earlier - mpm ]

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETPOLL]: add retry timeout
Matt Mackall [Fri, 12 Aug 2005 02:25:54 +0000 (19:25 -0700)]
[NETPOLL]: add retry timeout

Add limited retry logic to netpoll_send_skb

Each time we attempt to send, decrement our per-device retry counter.
On every successful send, we reset the counter.

We delay 50us between attempts with up to 20000 retries for a total of
1 second. After we've exhausted our retries, subsequent failed
attempts will try only once until reset by success.

Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETPOLL]: netpoll_send_skb simplify
Matt Mackall [Fri, 12 Aug 2005 02:25:11 +0000 (19:25 -0700)]
[NETPOLL]: netpoll_send_skb simplify

Minor netpoll_send_skb restructuring

Restructure to avoid confusing goto and move some bits out of the
retry loop.

Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETPOLL]: e1000 netpoll tweak
Matt Mackall [Fri, 12 Aug 2005 02:24:33 +0000 (19:24 -0700)]
[NETPOLL]: e1000 netpoll tweak

Suggested by Steven Rostedt, matches his patch included in e100.

Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETPOLL]: deadlock bugfix
Jeff Moyer [Fri, 12 Aug 2005 02:23:50 +0000 (19:23 -0700)]
[NETPOLL]: deadlock bugfix

This fixes an obvious deadlock in the netpoll code.  netpoll_rx takes the
npinfo->rx_lock.  netpoll_rx is also the only caller of arp_reply (through
__netpoll_rx).  As such, it is not necessary to take this lock.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETPOLL]: rx_flags bugfix
Jeff Moyer [Fri, 12 Aug 2005 02:23:04 +0000 (19:23 -0700)]
[NETPOLL]: rx_flags bugfix

Initialize npinfo->rx_flags.  The way it stands now, this will have random
garbage, and so will incur a locking penalty even when an rx_hook isn't
registered and we are not active in the netpoll polling code.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Make skb->protocol __be16
Alexey Dobriyan [Thu, 11 Aug 2005 23:05:50 +0000 (16:05 -0700)]
[NET]: Make skb->protocol __be16

There are many instances of

skb->protocol = htons(ETH_P_*);
skb->protocol = __constant_htons(ETH_P_*);
and
skb->protocol = *_type_trans(...);

Most of *_type_trans() are already endian-annotated, so, let's shift
attention on other warnings.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PATCH] Fix DVB URL
Johannes Stezenbach [Thu, 11 Aug 2005 09:54:24 +0000 (11:54 +0200)]
[PATCH] Fix DVB URL

Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[TCP]: Adjust {p,f}ackets_out correctly in tcp_retransmit_skb()
Herbert Xu [Thu, 11 Aug 2005 01:32:36 +0000 (18:32 -0700)]
[TCP]: Adjust {p,f}ackets_out correctly in tcp_retransmit_skb()

Well I've only found one potential cause for the assertion
failure in tcp_mark_head_lost.  First of all, this can only
occur if cnt > 1 since tp->packets_out is never zero here.
If it did hit zero we'd have much bigger problems.

So cnt is equal to fackets_out - reordering.  Normally
fackets_out is less than packets_out.  The only reason
I've found that might cause fackets_out to exceed packets_out
is if tcp_fragment is called from tcp_retransmit_skb with a
TSO skb and the current MSS is greater than the MSS stored
in the TSO skb.  This might occur as the result of an expiring
dst entry.

In that case, packets_out may decrease (line 1380-1381 in
tcp_output.c).  However, fackets_out is unchanged which means
that it may in fact exceed packets_out.

Previously tcp_retrans_try_collapse was the only place where
packets_out can go down and it takes care of this by decrementing
fackets_out.

So we should make sure that fackets_out is reduced by an appropriate
amount here as well.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 10 Aug 2005 19:21:25 +0000 (12:21 -0700)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6

18 years agoMerge head 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Wed, 10 Aug 2005 18:56:19 +0000 (11:56 -0700)]
Merge head 'upstream-fixes' of /linux/kernel/git/jgarzik/libata-dev

18 years ago[PATCH] remove name length check in a workqueue
James Bottomley [Wed, 10 Aug 2005 18:29:15 +0000 (11:29 -0700)]
[PATCH] remove name length check in a workqueue

We have a chek in there to make sure that the name won't overflow
task_struct.comm[], but it's triggering for scsi with lots of HBAs, only
scsi is using single-threaded workqueues which don't append the "/%d"
anyway.

All too hard.  Just kill the BUG_ON.

Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
[ kthread_create() uses vsnprintf() and limits the thing, so no
  actual overflow can actually happen regardless ]

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[DECNET]: Use sk_stream_error function rather than DECnet's own
Steven Whitehouse [Wed, 10 Aug 2005 18:32:57 +0000 (11:32 -0700)]
[DECNET]: Use sk_stream_error function rather than DECnet's own

Signed-off-by: Steven Whitehouse <steve@chygwyn.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PATCH] wbsd version bump
Pierre Ossman [Mon, 11 Jul 2005 12:19:35 +0000 (14:19 +0200)]
[PATCH] wbsd version bump

Even though the changes are minor for the next release an increasing
version number simplifies my support issues.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] ppc64: Fix Fan control for new PowerMac G5 2.7GHz machines
Benjamin Herrenschmidt [Wed, 10 Aug 2005 09:12:09 +0000 (11:12 +0200)]
[PATCH] ppc64: Fix Fan control for new PowerMac G5 2.7GHz machines

The workaround for broken device-tree that prevents fan control from
working on recent G5 models need to be "enabled" for machines with
revision 0x37 of the bridge in addition to machines with revision 0x35.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm-smp
Linus Torvalds [Wed, 10 Aug 2005 18:05:56 +0000 (11:05 -0700)]
Merge kernel.org:/home/rmk/linux-2.6-arm-smp

18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Wed, 10 Aug 2005 18:05:28 +0000 (11:05 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

18 years ago[PATCH] ns558 list handling fix
Alexander Nyberg [Wed, 10 Aug 2005 17:11:36 +0000 (10:11 -0700)]
[PATCH] ns558 list handling fix

Need to use list_for_entry_safe(), as we're removing items during the
traversal.  list_for_each_entry() uses the first ptr also as an iterator, if
you kfree() it slab takes it, might poison it and then you try to use it to
iterate to the next object in list.

Cc: Vojtech Pavlik <vojtech@suse.cz>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] 6pack persistence fix
Ralf Baechle DL5RB [Wed, 10 Aug 2005 17:03:20 +0000 (10:03 -0700)]
[PATCH] 6pack persistence fix

Fix the p-persistence CSMA algorithm which in simplex mode was starting
with a slottime delay before doing anything else as if there was carrier
collision resulting in bad performance on simplex links.

Signed-off-by: Ralf Baechle DL5RB <ralf@linux-mips.org>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agolibata: fix EH-related lockup by properly cleaning EH command list
Tejun Heo [Wed, 10 Aug 2005 17:38:27 +0000 (13:38 -0400)]
libata: fix EH-related lockup by properly cleaning EH command list

Yet another hack due to the fact that libata is the only user of SCSI's
->eh_strategy_handler() hook.

18 years ago[PATCH] sata: fix sata_sx4 dma_prep to not use sg->length
Tejun Heo [Sun, 7 Aug 2005 05:53:40 +0000 (14:53 +0900)]
[PATCH] sata: fix sata_sx4 dma_prep to not use sg->length

 sata_sx4 directly references sg->length to calculate total_len in
pdc20621_dma_prep().  This is incorrect as dma_map_sg() could have
merged multiple sg's into one and, in such case, sg->length doesn't
reflect true size of the entry.  This patch makes it use
sg_dma_len(sg).

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
Linus Torvalds [Wed, 10 Aug 2005 16:36:02 +0000 (09:36 -0700)]
Merge /linux/kernel/git/jejb/scsi-rc-fixes-2.6

18 years agoMerge with /home/shaggy/git/linus-clean/
Dave Kleikamp [Wed, 10 Aug 2005 16:15:13 +0000 (11:15 -0500)]
Merge with /home/shaggy/git/linus-clean/

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
18 years agoJFS: Fix race in txLock
Dave Kleikamp [Wed, 10 Aug 2005 16:14:39 +0000 (11:14 -0500)]
JFS: Fix race in txLock

TxAnchor.anon_list is protected by jfsTxnLock (TXN_LOCK), but there was
a place in txLock() that was removing an entry from the list without holding
the spinlock.

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
18 years ago[PATCH] ARM: 2849/1: S3C24XX - USB host update (2848/1)
Ben Dooks [Wed, 10 Aug 2005 15:45:14 +0000 (16:45 +0100)]
[PATCH] ARM: 2849/1: S3C24XX - USB host update (2848/1)

Patch from Ben Dooks

Rename the s3c2410_report_oc() to s3c2410_usb_report_oc()
as this is an usb specific function.
Change port power on the usb-simtec implementation to only
power up the output if both are set, as per the usb 1.1
specification

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[PATCH] ARM: 2847/1: S3C24XX - Documentation for USB OHCI host
Ben Dooks [Wed, 10 Aug 2005 15:45:14 +0000 (16:45 +0100)]
[PATCH] ARM: 2847/1: S3C24XX - Documentation for USB OHCI host

Patch from Ben Dooks

Documentation for the in-built OHCI host controller
and the support for it in Linux.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[PATCH] ARM: 2846/1: proper handling of CKEN for pxafb
Nicolas Pitre [Wed, 10 Aug 2005 15:45:13 +0000 (16:45 +0100)]
[PATCH] ARM: 2846/1: proper handling of CKEN for pxafb

Patch from Nicolas Pitre

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] Control v6 'global' bit via Linux PTE entries
Russell King [Wed, 10 Aug 2005 15:18:35 +0000 (16:18 +0100)]
[ARM] Control v6 'global' bit via Linux PTE entries

Unfortunately, we can't use the "user" bit in the page tables to
control whether a page table entry is "global" or "asid" specific,
since the vector page is mapped as "user" accessible but is not
process specific.

Therefore, give direct control of the ARMv6 "nG" (not global)
bit to the mm layers.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] Use #defined constants for manipulating v6 hardware PTE bits
Russell King [Wed, 10 Aug 2005 15:15:32 +0000 (16:15 +0100)]
[ARM] Use #defined constants for manipulating v6 hardware PTE bits

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM SMP] Clear the exclusive monitor on ARMv6 CPUs on context switch
Russell King [Wed, 10 Aug 2005 13:52:52 +0000 (14:52 +0100)]
[ARM SMP] Clear the exclusive monitor on ARMv6 CPUs on context switch

Ensure that the exclusive monitor is cleared on context switch with
ARMv6 CPUs.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM SMP] Only enable V6K instructions on V6 MP core CPUs
Russell King [Wed, 10 Aug 2005 13:41:45 +0000 (14:41 +0100)]
[ARM SMP] Only enable V6K instructions on V6 MP core CPUs

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[PATCH] Fix ide-disk.c oops caused by hwif == NULL
Christoph Lameter [Wed, 10 Aug 2005 02:59:21 +0000 (19:59 -0700)]
[PATCH] Fix ide-disk.c oops caused by hwif == NULL

1. Move hwif_to_node to ide.h

2. Use hwif_to_node in ide-disk.c

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] DVB: lgdt330x frontend: some bug fixes & add lgdt3303 support
Michael Krufky [Wed, 10 Aug 2005 00:48:54 +0000 (17:48 -0700)]
[PATCH] DVB: lgdt330x frontend: some bug fixes & add lgdt3303 support

This patch removes the tda9887 stuff from lgdt330x.c.  It's experimental code
which wasn't supposed to leak out and we don't want it in 2.6.13.

Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Acked-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] dvb: lgdt330x frontend: trivial text cleanups
Michael Krufky [Wed, 10 Aug 2005 00:48:54 +0000 (17:48 -0700)]
[PATCH] dvb: lgdt330x frontend: trivial text cleanups

Two trivial text changes in Kconfig and lgdt330x.c

Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] I2O: added pci_request_regions() before using the controller
Markus Lidel [Tue, 9 Aug 2005 21:30:57 +0000 (14:30 -0700)]
[PATCH] I2O: added pci_request_regions() before using the controller

Added pci_request_regions() before using the controller to avoid duplicate
usage of the I2O controller when the dpt_i2o driver and I2O subsystem is
loaded at the same time.

Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com>
Cc: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Tue, 9 Aug 2005 23:03:19 +0000 (16:03 -0700)]
Merge /pub/scm/linux/kernel/git/aegl/linux-2.6

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Tue, 9 Aug 2005 23:02:15 +0000 (16:02 -0700)]
Merge /pub/scm/linux/kernel/git/davem/sparc-2.6

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 9 Aug 2005 23:00:05 +0000 (16:00 -0700)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6

18 years ago[NET]: Fix memory leak in sys_{send,recv}msg() w/compat
Andrew Morton [Tue, 9 Aug 2005 22:29:19 +0000 (15:29 -0700)]
[NET]: Fix memory leak in sys_{send,recv}msg() w/compat

From: Dave Johnson <djohnson+linux-kernel@sw.starentnetworks.com>

sendmsg()/recvmsg() syscalls from o32/n32 apps to a 64bit kernel will
cause a kernel memory leak if iov_len > UIO_FASTIOV for each syscall!

This is because both sys_sendmsg() and verify_compat_iovec() kmalloc a
new iovec structure.  Only the one from sys_sendmsg() is free'ed.

I wrote a simple test program to confirm this after identifying the
problem:

http://davej.org/programs/testsendmsg.c

Note that the below fix will break solaris_sendmsg()/solaris_recvmsg() as
it also calls verify_compat_iovec() but expects it to malloc internally.

[ I fixed that. -DaveM ]

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SUNRPC]: Fix nsec --> usec conversion.
David S. Miller [Tue, 9 Aug 2005 21:57:12 +0000 (14:57 -0700)]
[SUNRPC]: Fix nsec --> usec conversion.

We need to divide, not multiply.  While we're here,
use NSEC_PER_USEC instead of a magic constant.

Based upon a report from Josip Loncaric and a patch
by Andrew Morton.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC]: envctrl: ERR_PTR() --> PTR_ERR()
David S. Miller [Tue, 9 Aug 2005 21:43:14 +0000 (14:43 -0700)]
[SPARC]: envctrl: ERR_PTR() --> PTR_ERR()

Fix thinko in Christoph's changes.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC]: remove ifdef CONFIG_PCI from envctrl.c
Christoph Hellwig [Tue, 9 Aug 2005 21:39:10 +0000 (14:39 -0700)]
[SPARC]: remove ifdef CONFIG_PCI from envctrl.c

The driver already depends on CONFIG_PCI in Kconfig.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC]: Use kthread infrastructure in bbc_envctrl
Christoph Hellwig [Tue, 9 Aug 2005 20:32:25 +0000 (13:32 -0700)]
[SPARC]: Use kthread infrastructure in bbc_envctrl

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC]: Use kthread infrastructure in envctrl
Christoph Hellwig [Tue, 9 Aug 2005 19:30:07 +0000 (12:30 -0700)]
[SPARC]: Use kthread infrastructure in envctrl

envctrl currently uses very odd ways to stop a thread, using various
things that should be exposed to drivers at all.

This patch (which is untested as I don't have sparc hardware) switches
it to use the proper kthread infrastructure.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PATCH] i2o: remove new configuration API
Markus Lidel [Tue, 9 Aug 2005 17:08:03 +0000 (10:08 -0700)]
[PATCH] i2o: remove new configuration API

Remove new configuration API from i2o_config

The API-patch is still available from the I2O website (which is mentioned in
the kernel config now).  It is removed because it creates a new binary
sysfs-attribute, which doesn't have the limitiation of 4k.  Expect for the
Adaptec controllers, which has a limitation in the hardware this attribute
doesn't make sense anywhere else.  Until the sysfs API provides an attribute
which doesn't buffer (like firmware) and let access to at least 64k blocks i
provide a separate patch...

(akpm: basically, this API was introduced post-2.6.12 and Markus wants to pull
it out before 2.6.13).

Signed-off-by: Markus Lidel <Markus.Lidel@shadowconnect.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] cpm_uart: needs some love to compile with GCC4.0.1
Kumar Gala [Tue, 9 Aug 2005 17:08:02 +0000 (10:08 -0700)]
[PATCH] cpm_uart: needs some love to compile with GCC4.0.1

Fixed problems so we can build with gcc-4.0.1

Signed-off-by: Peter Schaefer-Hutter <peter.schaefer-hutter@tfk-racoms.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] cpm_uart: Fix dpram allocation and non-console uarts
Kumar Gala [Tue, 9 Aug 2005 17:08:00 +0000 (10:08 -0700)]
[PATCH] cpm_uart: Fix dpram allocation and non-console uarts

* Makes dpram allocations work
* Makes non-console UART work on both 8xx and 82xx
* Fixed whitespace in files that were touched

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Pantelis Antoniou <panto@intracom.gr>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] cpuset release ABBA deadlock fix
Paul Jackson [Tue, 9 Aug 2005 17:07:59 +0000 (10:07 -0700)]
[PATCH] cpuset release ABBA deadlock fix

Fix possible cpuset_sem ABBA deadlock if 'notify_on_release' set.

For a particular usage pattern, creating and destroying cpusets fairly
frequently using notify_on_release, on a very large system, this deadlock
can be seen every few days.  If you are not using the cpuset
notify_on_release feature, you will never see this deadlock.

The existing code, on task exit (or cpuset deletion) did:

  get cpuset_sem
  if cpuset marked notify_on_release and is ready to release:
    compute cpuset path relative to /dev/cpuset mount point
    call_usermodehelper() forks /sbin/cpuset_release_agent with path
  drop cpuset_sem

Unfortunately, the fork in call_usermodehelper can allocate memory, and
allocating memory can require cpuset_sem, if the mems_generation values
changed in the interim.  This results in an ABBA deadlock, trying to obtain
cpuset_sem when it is already held by the current task.

To fix this, I put the cpuset path (which must be computed while holding
cpuset_sem) in a temporary buffer, to be used in the call_usermodehelper
call of /sbin/cpuset_release_agent only _after_ dropping cpuset_sem.

So the new logic is:

  get cpuset_sem
  if cpuset marked notify_on_release and is ready to release:
    compute cpuset path relative to /dev/cpuset mount point
    stash path in kmalloc'd buffer
  drop cpuset_sem
  call_usermodehelper() forks /sbin/cpuset_release_agent with path
  free path

The sharp eyed reader might notice that this patch does not contain any
calls to kmalloc.  The existing code in the check_for_release() routine was
already kmalloc'ing a buffer to hold the cpuset path.  In the old code, it
just held the buffer for a few lines, over the cpuset_release_agent() call
that in turn invoked call_usermodehelper().  In the new code, with the
application of this patch, it returns that buffer via the new char
**ppathbuf parameter, for later use and freeing in cpuset_release_agent(),
which is called after cpuset_sem is dropped.  Whereas the old code has just
one call to cpuset_release_agent(), right in the check_for_release()
routine, the new code has three calls to cpuset_release_agent(), from the
various places that a cpuset can be released.

This patch has been build and booted on SN2, and passed a stress test that
previously hit the deadlock within a few seconds.

Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Build fix for the Sibyte I2C driver
Ralf Baechle [Tue, 9 Aug 2005 17:07:57 +0000 (10:07 -0700)]
[PATCH] Build fix for the Sibyte I2C driver

Compile fix for the BCM1250 I2C driver.

Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] i8xx_tco.c: arm watchdog only when started
Wim Van Sebroeck [Tue, 9 Aug 2005 17:07:56 +0000 (10:07 -0700)]
[PATCH] i8xx_tco.c: arm watchdog only when started

i8xx_tco.c v0.08: only "arm" the watchdog when the watchdog has been
started.  (Kernel Bug 4251: system reset when battery is read and i8xx_tco
driver loaded)

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[SCSI] dpt_i2o pci_request_regions fix
Salyzyn, Mark [Tue, 9 Aug 2005 16:57:58 +0000 (12:57 -0400)]
[SCSI] dpt_i2o pci_request_regions fix

Originally From: Andrew Morton <akpm@osdl.org>

Altered By: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>

There is an additional 'build fix' patch that Andrew Morton submitted on
the kernel list (I have changed out his dpr_i2o with dpt_i2o below
though).

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
18 years ago[PATCH] fsnotify-cleanups
John McCutchan [Tue, 9 Aug 2005 02:13:05 +0000 (22:13 -0400)]
[PATCH] fsnotify-cleanups

This removes the now unused fsnotify_unlink & fsnotify_rmdir code.
Compile tested.

Signed-off-by: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoRevert "[PATCH] PCI: restore BAR values..."
Linus Torvalds [Tue, 9 Aug 2005 01:46:09 +0000 (18:46 -0700)]
Revert "[PATCH] PCI: restore BAR values..."

Revert commit fec59a711eef002d4ef9eb8de09dd0a26986eb77, which is
breaking sparc64 that doesn't have a working pci_update_resource.

We'll re-do this after 2.6.13 when we'll do it all properly.

18 years ago[PATCH] icn driver fails to unload when no hardware present
Dave Jones [Mon, 8 Aug 2005 23:13:15 +0000 (16:13 -0700)]
[PATCH] icn driver fails to unload when no hardware present

Fix a null dereference in module unload path.

Found by a simple modprobe icn ; rmmod icn

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 8 Aug 2005 23:06:01 +0000 (16:06 -0700)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6

18 years ago[IA64] fix nohalt boot option
Ken Chen [Mon, 8 Aug 2005 22:25:00 +0000 (15:25 -0700)]
[IA64] fix nohalt boot option

this changeset broke the "nohalt" kernel boot option.
  8df5a500a3e97f7811cdce0f553ca1917ccd4220

default_idle() is looking at new variable can_do_pal_halt.  However,
that variable did not get cleared upon "nohalt" boot option.  Result
is that "nohalt" option is ignored until perfmon is exercised.

Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
18 years ago[PATCH] x86_64: add MODULE_ALIAS for aes
Olaf Hering [Mon, 8 Aug 2005 21:49:18 +0000 (14:49 -0700)]
[PATCH] x86_64: add MODULE_ALIAS for aes

modprobe aes does not work on x86_64.  i386 has a similar line, this could
be the right fix.  Would be nice to have in 2.6.13 final.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] ppc32: Fix MPC834x USB memory map offsets
Kumar Gala [Mon, 8 Aug 2005 21:49:17 +0000 (14:49 -0700)]
[PATCH] ppc32: Fix MPC834x USB memory map offsets

The memory mappings for MPC8349 USB MPH and DR modules were reversed.

Signed-off-by: Li Yang <LeoLi@freescale.com>
Signed-off-by: Jiang Bo <Tanya.jiang@freescale.com>
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>