linux-2.6
18 years ago[PATCH] ads7846 build fix
Andrew Morton [Sat, 25 Mar 2006 11:07:35 +0000 (03:07 -0800)] 
[PATCH] ads7846 build fix

sparc32:

drivers/input/touchscreen/ads7846.c: In function `ads7846_read12_ser':
drivers/input/touchscreen/ads7846.c:206: warning: implicit declaration of function `disable_irq'
drivers/input/touchscreen/ads7846.c:208: warning: implicit declaration of function `enable_irq'

Cc: Dmitry Torokhov <dtor_core@ameritech.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] tpm: sparc32 build fix
Andrew Morton [Sat, 25 Mar 2006 11:07:35 +0000 (03:07 -0800)] 
[PATCH] tpm: sparc32 build fix

In file included from drivers/char/tpm/tpm_nsc.c:23:
drivers/char/tpm/tpm.h: In function `tpm_read_index':
drivers/char/tpm/tpm.h:92: warning: implicit declaration of function `outb'
drivers/char/tpm/tpm.h:93: warning: implicit declaration of function `inb'

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] collie: fix missing pcmcia bits
Pavel Machek [Sat, 25 Mar 2006 11:07:34 +0000 (03:07 -0800)] 
[PATCH] collie: fix missing pcmcia bits

This adds missing bits of collie (sharp sl-5500) PCMCIA support and
MFD support.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fix hardcoded values in collie frontlight
Pavel Machek [Sat, 25 Mar 2006 11:07:33 +0000 (03:07 -0800)] 
[PATCH] fix hardcoded values in collie frontlight

In frontlight support, we should really use values from flash-ROM instead
of hardcoding our own.  Cleanup includes.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] remove MAINTAINERS entry for rtlinux
Adrian Bunk [Sat, 25 Mar 2006 11:07:32 +0000 (03:07 -0800)] 
[PATCH] remove MAINTAINERS entry for rtlinux

It's already big enough and there's no reason to list maintainers of
external patches.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] adjust /dev/{kmem,mem,port} write handlers
Jan Beulich [Sat, 25 Mar 2006 11:07:31 +0000 (03:07 -0800)] 
[PATCH] adjust /dev/{kmem,mem,port} write handlers

The /dev/mem and /dev/kmem write handlers weren't fully POSIX compliant in
that they wouldn't always force the file pointer to be updated when
returning success status.

The /dev/port write handler was inconsistent with the /dev/mem and
/dev/kmem handlers in that when encountering a -EFAULT condition after
already having written a number of items it would return -EFAULT rather
than the number of bytes written.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] smbfs: Fix debug logging-only compilation error
Kirk True [Sat, 25 Mar 2006 11:07:30 +0000 (03:07 -0800)] 
[PATCH] smbfs: Fix debug logging-only compilation error

When SMBFS_DEBUG_VERBOSE is #define-d, the compile breaks:

fs/smbfs/inode.c:217: error: aggregate value used where an integer was expected

This is a simple matter of using the .tv_sec attribute of struct time_spec.

Signed-off-by: Kirk True <kernel@kirkandsheila.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] 9p: update documentation
Eric Van Hensbergen [Sat, 25 Mar 2006 11:07:30 +0000 (03:07 -0800)] 
[PATCH] 9p: update documentation

Fix documentation to match current implementation.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] 9p: fix name consistency problems
Eric Van Hensbergen [Sat, 25 Mar 2006 11:07:29 +0000 (03:07 -0800)] 
[PATCH] 9p: fix name consistency problems

There were a number of conflicting naming schemes used in the v9fs project.
The directory was fs/9p, but MAINTAINERS and Documentation referred to
v9fs.  The module name itself was 9p2000, and the file system type was 9P.
This patch attempts to clean that up, changing all references to 9p in
order to match the directory name.  We'll also start using 9p instead of
v9fs as our patch prefix.

There is also a minor consistency cleanup in the options changing the name
option to uname in order to more closely match the Plan 9 options.

Signed-off-by: Eric Van Hensbergevan <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] v9fs: update license boilerplate
Eric Van Hensbergen [Sat, 25 Mar 2006 11:07:28 +0000 (03:07 -0800)] 
[PATCH] v9fs: update license boilerplate

Update license boilerplate to specify GPLv2 and remove the (at your option
clause).  This change was agreed to by all the copyright holders (approvals
can be found on v9fs-developer mailing list).

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] v9fs: fix vfs_inode dereference before NULL check
Eugene Teo [Sat, 25 Mar 2006 11:07:27 +0000 (03:07 -0800)] 
[PATCH] v9fs: fix vfs_inode dereference before NULL check

__getname, which in turn will call kmem_cache_alloc, may return NULL.

Coverity bug #977

Signed-off-by: Eugene Teo <eugene.teo@eugeneteo.net>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] v9fs: add extension field to Tcreate
Latchesar Ionkov [Sat, 25 Mar 2006 11:07:26 +0000 (03:07 -0800)] 
[PATCH] v9fs: add extension field to Tcreate

Implement a new way of creating special files.  Instead of Tcreate+Twstat,
add one more field to Tcreate that contains special file description.

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] v9fs: print 9p messages
Latchesar Ionkov [Sat, 25 Mar 2006 11:07:25 +0000 (03:07 -0800)] 
[PATCH] v9fs: print 9p messages

Print 9p messages.

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Cc: Eric Van Hensbergen <ericvh@ericvh.myip.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] v9fs: rename tids to tags to be consistent with Plan 9 documentation
Russ Cox [Sat, 25 Mar 2006 11:07:24 +0000 (03:07 -0800)] 
[PATCH] v9fs: rename tids to tags to be consistent with Plan 9 documentation

The code talks about these things called tids, which I eventually figured
out are tags.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] v9fs: consolidate trans_sock into trans_fd
Russ Cox [Sat, 25 Mar 2006 11:07:23 +0000 (03:07 -0800)] 
[PATCH] v9fs: consolidate trans_sock into trans_fd

Here is a new trans_fd.c that replaces the current trans_fd.c and
trans_sock.c.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] kconfig: clarify memory debug options
Andrew Morton [Sat, 25 Mar 2006 11:07:22 +0000 (03:07 -0800)] 
[PATCH] kconfig: clarify memory debug options

The Kconfig text for CONFIG_DEBUG_SLAB and CONFIG_DEBUG_PAGEALLOC have always
seemed a bit confusing.  Change them to:

CONFIG_DEBUG_SLAB: "Debug slab memory allocations"
CONFIG_DEBUG_PAGEALLOC: "Debug page memory allocations"

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] amiga: fix driver_register() return handling, remove zorro_module_init()
Bjorn Helgaas [Sat, 25 Mar 2006 11:07:20 +0000 (03:07 -0800)] 
[PATCH] amiga: fix driver_register() return handling, remove zorro_module_init()

Remove the assumption that driver_register() returns the number of devices
bound to the driver.  In fact, it returns zero for success or a negative
error value.

zorro_module_init() used the device count to automatically unregister and
unload drivers that found no devices.  That might have worked at one time,
but has been broken for some time because zorro_register_driver() returned
either a negative error or a positive count (never zero).  So it could only
unregister on failure, when it's not needed anyway.

This functionality could be resurrected in individual drivers by counting
devices in their .probe() methods.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] EISA: tidy-up driver_register() return value
Bjorn Helgaas [Sat, 25 Mar 2006 11:07:19 +0000 (03:07 -0800)] 
[PATCH] EISA: tidy-up driver_register() return value

Remove the assumption that driver_register() returns the number of devices
bound to the driver.  In fact, it returns zero for success or a negative
error value.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
Acked-by: Marc Zyngier <maz@misterjones.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] hp300: fix driver_register() return handling, remove dio_module_init()
Bjorn Helgaas [Sat, 25 Mar 2006 11:07:17 +0000 (03:07 -0800)] 
[PATCH] hp300: fix driver_register() return handling, remove dio_module_init()

Remove the assumption that driver_register() returns the number of devices
bound to the driver.  In fact, it returns zero for success or a negative
error value.

dio_module_init() used the device count to automatically unregister and
unload drivers that found no devices.  That might have worked at one time,
but has been broken for some time because dio_register_driver() returned
either a negative error or a positive count (never zero).  So it could only
unregister on failure, when it's not needed anyway.

This functionality could be resurrected in individual drivers by counting
devices in their .probe() methods.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Philip Blundell <philb@gnu.org>
Cc: Jochen Friedrich <jochen@scram.de>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] reiserfs: use balance_dirty_pages_ratelimited_nr in reiserfs_file_write()
Alexander Zarochentsev [Sat, 25 Mar 2006 11:07:16 +0000 (03:07 -0800)] 
[PATCH] reiserfs: use balance_dirty_pages_ratelimited_nr in reiserfs_file_write()

Use the new balance_dirty_pages_ratelimited_nr in reiserfs "largeio" file
write.

Signed-off-by: Hans Reiser <reiser@namesys.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] initcall failure reporting
Andrew Morton [Sat, 25 Mar 2006 11:07:15 +0000 (03:07 -0800)] 
[PATCH] initcall failure reporting

We presently ignore the return values from initcalls.  But that can carry
useful debugging information.  So print it out if it's non-zero.

It turns out the -ENODEV happens quite a lot, due to built-in drivers which
have no hardware to drive.  So suppress that unless initcall_debug was
specified.

Also make the warning message more friendly by printing the name of the
initcall function.

Also drop the KERN_DEBUG from the initcall_debug message.  If we specified
inticall_debug then we obviously want to see the messages.

Acked-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] reiserfs: cleanups
Vladimir V. Saveliev [Sat, 25 Mar 2006 11:07:15 +0000 (03:07 -0800)] 
[PATCH] reiserfs: cleanups

Clean up several places where gcc issues warnings when -W is specified.
Thanks to Neil for finding that.

Signed-off-by: Vladimir V. Saveliev <vs@namesys.com>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Hans Reiser <reiser@namesys.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] parport: move PP_MAJOR from ppdev.h to major.h
Rene Herman [Sat, 25 Mar 2006 11:07:13 +0000 (03:07 -0800)] 
[PATCH] parport: move PP_MAJOR from ppdev.h to major.h

Today I wondered about /dev/parport<n> after not seeing anything in
drivers/parport register char-major-99.  Having PP_MAJOR in
include/linux/major.h would've allowed me to more quickly determine that it
was the ppdev driver driving these.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] block/floppy: fix section mismatch warnings
Sam Ravnborg [Sat, 25 Mar 2006 11:07:13 +0000 (03:07 -0800)] 
[PATCH] block/floppy: fix section mismatch warnings

In latest -mm a number of section mismatch warnings are generated for
floppy.o like the following:

WARNING: drivers/block/floppy.o - Section mismatch: reference to    \
.init.data: from .text between 'init_module' (at offset 0x6976) and \
'cleanup_module'

The warning are caused by a reference to floppy_init() which is __init from
init_module() which is not declared __init.  Declaring init_module() _init
fixes this.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] ide: fix section mismatch warning
Sam Ravnborg [Sat, 25 Mar 2006 11:07:11 +0000 (03:07 -0800)] 
[PATCH] ide: fix section mismatch warning

In latest -mm ide-code.o gave a number of warnings like the following:

WARNING: drivers/ide/ide-core.o - Section mismatch: reference to    \
.init.text: from .text between 'init_module' (at offset 0x1f97) and \
'cleanup_module'

The warning was caused by init_module() calling parse_option() and
ide_init() both declared __init.

Declaring init_module() __init fixes the warnings.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] inotify: lock avoidance with parent watch status in dentry
Nick Piggin [Sat, 25 Mar 2006 11:07:09 +0000 (03:07 -0800)] 
[PATCH] inotify: lock avoidance with parent watch status in dentry

Previous inotify work avoidance is good when inotify is completely unused,
but it breaks down if even a single watch is in place anywhere in the
system.  Robin Holt notices that udev is one such culprit - it slows down a
512-thread application on a 512 CPU system from 6 seconds to 22 minutes.

Solve this by adding a flag in the dentry that tells inotify whether or not
its parent inode has a watch on it.  Event queueing to parent will skip
taking locks if this flag is cleared.  Setting and clearing of this flag on
all child dentries versus event delivery: this is no in terms of race
cases, and that was shown to be equivalent to always performing the check.

The essential behaviour is that activity occuring _after_ a watch has been
added and _before_ it has been removed, will generate events.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Robert Love <rml@novell.com>
Cc: John McCutchan <ttb@tentacle.dhs.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sysrq cleanup
Andrew Morton [Sat, 25 Mar 2006 11:07:08 +0000 (03:07 -0800)] 
[PATCH] sysrq cleanup

sysrq.c is fairly revolting.  Fix.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fix 'defined but not used' warning in net/rxrpc/main.c::rxrpc_initialise
Jesper Juhl [Sat, 25 Mar 2006 11:07:08 +0000 (03:07 -0800)] 
[PATCH] fix 'defined but not used' warning in net/rxrpc/main.c::rxrpc_initialise

net/rxrpc/main.c: In function `rxrpc_initialise':
net/rxrpc/main.c:83: warning: label `error_proc' defined but not used

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Fix EDD to properly ignore signature of non-existing drives
Andrey Borzenkov [Sat, 25 Mar 2006 11:07:07 +0000 (03:07 -0800)] 
[PATCH] Fix EDD to properly ignore signature of non-existing drives

Some BIOSes do not always set CF on error before return from int13.  The
patch adds additional check for status being zero (AH == 0).

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] kernel/params.c: make param_array() static
Adrian Bunk [Sat, 25 Mar 2006 11:07:06 +0000 (03:07 -0800)] 
[PATCH] kernel/params.c: make param_array() static

param_array() in kernel/params.c can now become static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Remove MODULE_PARM
Rusty Russell [Sat, 25 Mar 2006 11:07:05 +0000 (03:07 -0800)] 
[PATCH] Remove MODULE_PARM

MODULE_PARM was actually breaking: recent gcc version optimize them out as
unused.  It's time to replace the last users, which are generally in the
most unloved drivers anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] hysdn: remove custom types
Andrew Morton [Sat, 25 Mar 2006 11:07:04 +0000 (03:07 -0800)] 
[PATCH] hysdn: remove custom types

hysdn defines its own types: ulong, uint, uchar and word.

Problem is, the module_param macros rely upon some of those identifiers having
special meanings too.  The net effect is that module_param() and friends
cannot be used in ISDN because of this namespace clash.

So remove the hysdn-private defines and open-code them all.

Cc: Karsten Keil <kkeil@suse.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] drivers/block/nbd.c: don't defer compile error to runtime
Adrian Bunk [Sat, 25 Mar 2006 11:07:04 +0000 (03:07 -0800)] 
[PATCH] drivers/block/nbd.c: don't defer compile error to runtime

If we can detect a problem at compile time, the compilation should fail.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] constify tty flip buffer handling
Thomas Koeller [Sat, 25 Mar 2006 11:07:03 +0000 (03:07 -0800)] 
[PATCH] constify tty flip buffer handling

Add a couple of 'const' qualifiers to the TTY flip buffer APIs, where
appropriate.

Signed-off-by: Thomas Koeller <thomas@koeller.dyndns.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] ISDN: fix copy_to_user() unused result warning in isdn_ppp
Jesper Juhl [Sat, 25 Mar 2006 11:07:02 +0000 (03:07 -0800)] 
[PATCH] ISDN: fix copy_to_user() unused result warning in isdn_ppp

   drivers/isdn/i4l/isdn_ppp.c:785: warning: ignoring return value of `copy_to_user', declared with attribute warn_unused_result

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Add lookup_instantiate_filp usage warning
Oleg Drokin [Sat, 25 Mar 2006 11:07:02 +0000 (03:07 -0800)] 
[PATCH] Add lookup_instantiate_filp usage warning

I think it would be nice to put an usage warning in header of
lookup_instantiate_filp() to indicate it is unsafe to use it on anything
but regular files (even that is potentially unsafe, but there your ->open()
is usually in your hands anyway), so that others won't fall into the same
trap I did.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Introduce FMODE_EXEC file flag
Oleg Drokin [Sat, 25 Mar 2006 11:07:01 +0000 (03:07 -0800)] 
[PATCH] Introduce FMODE_EXEC file flag

Introduce FMODE_EXEC file flag, to indicate that file is being opened for
execution.  This is useful for distributed filesystems to maintain
consistent behavior for returning ETXTBUSY when opening for write and
execution happens on different nodes.

akpm:

  Needed by Lustre at present.  I assume their objective to to work towards
  being able to install Lustre on an unmodified distro kernel, which seems
  sane.  It should have zero runtime cost.

  Trond and Chuck indicate that NFS4 can probably use this too, for the same
  thing.

  Steven says it's also on the GFS todo list.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Chuck Lever <cel@citi.umich.edu>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] reiserfs: reiserfs_file_write() will lose error code when a 0-length write...
Jeff Mahoney [Sat, 25 Mar 2006 11:07:00 +0000 (03:07 -0800)] 
[PATCH] reiserfs: reiserfs_file_write() will lose error code when a 0-length write occurs w/ O_SYNC

When an error occurs in reiserfs_file_write before any data is written, and
O_SYNC is set, the return code of generic_osync_write will overwrite the
error code, losing it.

This patch ensures that generic_osync_inode() doesn't run under an error
condition, losing the error.  This duplicates the logic from
generic_file_buffered_write().

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <mason@suse.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Alexander Zarochentsev <zam@namesys.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] reiserfs: handle trans_id overflow
Alexander Zarochentsev [Sat, 25 Mar 2006 11:06:59 +0000 (03:06 -0800)] 
[PATCH] reiserfs: handle trans_id overflow

Reiserfs does not handle transaction ID overflow correctly.  Transaction ID
== 0 causes reiserfs to crash.  The patch fixes all places where the
transaction ID is incremented.

Signed-off-by: Alexander Zarochentsev <zam@namesys.com>
Signed-off-by: Hans Reiser <reiser@namesys.com>
Cc: Chris Mason <mason@suse.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] reiserfs: fix transaction overflowing
Alexander Zarochentzev [Sat, 25 Mar 2006 11:06:57 +0000 (03:06 -0800)] 
[PATCH] reiserfs: fix transaction overflowing

This patch fixes a bug in reiserfs truncate.  A transaction might overflow
when truncating long highly fragmented file.  The fix is to split
truncation into several transactions to avoid overflowing.

Signed-off-by: Vladimir V. Saveliev <vs@namesys.com>
Cc; Charles McColgan <cm@chuck.net>
Cc: Alexander Zarochentsev <zam@namesys.com>
Cc: Hans Reiser <reiser@namesys.com>
Cc: Chris Mason <mason@suse.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fs/inode.c: make iprune_mutex static
Adrian Bunk [Sat, 25 Mar 2006 11:06:56 +0000 (03:06 -0800)] 
[PATCH] fs/inode.c: make iprune_mutex static

There's no reason for iprune_mutex being global.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Small cleanup in quota.h
Jan Kara [Sat, 25 Mar 2006 11:06:55 +0000 (03:06 -0800)] 
[PATCH] Small cleanup in quota.h

Remove unused quota flag.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Missed error checking for intent's filp in open_namei().
Oleg Drokin [Sat, 25 Mar 2006 11:06:54 +0000 (03:06 -0800)] 
[PATCH] Missed error checking for intent's filp in open_namei().

It seems there is error check missing in open_namei for errors returned
through intent.open.file (from lookup_instantiate_filp).

If there is plain open performed, then such a check done inside
__path_lookup_intent_open called from path_lookup_open(), but when the open
is performed with O_CREAT flag set, then __path_lookup_intent_open is only
called with LOOKUP_PARENT set where no file opening can occur yet.

Later on lookup_hash is called where exact opening might take place and
intent.open.file may be filled.  If it is filled with error value of some
sort, then we get kernel attempting to dereference this error value as
address (and corresponding oops) in nameidata_to_filp() called from
filp_open().

While this is relatively simple to workaround in ->lookup() method by just
checking lookup_instantiate_filp() return value and returning error as
needed, this is not so easy in ->d_revalidate(), where we can only return
"yes, dentry is valid" or "no, dentry is invalid, perform full lookup
again", and just returning 0 on error would cause extra lookup (with
potential extra costly RPCs).

So in short, I believe that there should be no difference in error handling
for opening a file and creating a file in open_namei() and propose this
simple patch as a solution.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] jbd: convert kjournald to kthread API
Andrew Morton [Sat, 25 Mar 2006 11:06:53 +0000 (03:06 -0800)] 
[PATCH] jbd: convert kjournald to kthread API

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] jbd: embed j_commit_timer in journal struct
Andrew Morton [Sat, 25 Mar 2006 11:06:53 +0000 (03:06 -0800)] 
[PATCH] jbd: embed j_commit_timer in journal struct

The kjournald timer is currently on the kernel thread's stack and the journal
structure points at it.  Save a pointer hop by moving the timer into the
journal structure.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Keys: Replace duplicate non-updateable keys rather than failing
David Howells [Sat, 25 Mar 2006 11:06:52 +0000 (03:06 -0800)] 
[PATCH] Keys: Replace duplicate non-updateable keys rather than failing

Cause an attempt to add a duplicate non-updateable key (such as a keyring) to
a keyring to discard the extant copy in favour of the new one rather than
failing with EEXIST:

# do the test in an empty session
keyctl session
# create a new keyring called "a" and attach to session
keyctl newring a @s
# create another new keyring called "a" and attach to session,
# displacing the keyring added by the second command:
keyctl newring a @s

Without this patch, the third command will fail.

For updateable keys (such as those of "user" type), the update method will
still be called rather than a new key being created.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Keys: Fix key quota management on key allocation
David Howells [Sat, 25 Mar 2006 11:06:51 +0000 (03:06 -0800)] 
[PATCH] Keys: Fix key quota management on key allocation

Make key quota detection generate an error if either quota is exceeded rather
than only if both quotas are exceeded.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] x86: HUGETLBFS and DEBUG_PAGEALLOC are incompatible
Chen, Kenneth W [Sat, 25 Mar 2006 11:06:50 +0000 (03:06 -0800)] 
[PATCH] x86: HUGETLBFS and DEBUG_PAGEALLOC are incompatible

DEBUG_PAGEALLOC is not compatible with hugetlb page support.  That debug
option turns off PSE.  Once it is turned off in CR4, the cpu will ignore
pse bit in the pmd and causing infinite page-not- present faults.

So disable DEBUG_PAGEALLOC if the user selected hugetlbfs.

Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] x86: make CONFIG_HOTPLUG_CPU depend on !X86_PC
Ashok Raj [Sat, 25 Mar 2006 11:06:50 +0000 (03:06 -0800)] 
[PATCH] x86: make CONFIG_HOTPLUG_CPU depend on !X86_PC

Make CONFIG_HOTPLUG_CPU depend on !X86_PC, so we need to turn on either
CONFIG_GENERICARCH, CONFIG_BIGSMP or any other subarch except X86_PC when
CONFIG_HOTPLUG_CPU=y

With 2.6.15+ kernels when CONFIG_HOTPLUG_CPU is turned on we switch to
bigsmp mode for sending IPI's and ioapic configurations that caused the
following error message.

>> More than 8 CPUs detected and CONFIG_X86_PC cannot handle it.
>> Use CONFIG_X86_GENERICARCH or CONFIG_X86_BIGSMP.

Originally bigsmp was added just to handle >8 cpus, but now with hotplug
cpu support we need to use bigsmp mode (why?  see below), that cause the
above error message even if there were less than 8 cpus in the system.

The message is bogus, but we are cannot use logical flat mode due to issues
with broadcast IPI can confuse a CPU just comming up.  We use flat physical
mode just like x86_64 case.  More details on why bigsmp now uses flat
physical mode (vs.  cluster mode) in following link.

http://marc.theaimsgroup.com/?l=linux-kernel&m=113261865814107&w=2

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] quieten zone_pcp_init
Anton Blanchard [Sat, 25 Mar 2006 11:06:49 +0000 (03:06 -0800)] 
[PATCH] quieten zone_pcp_init

In zone_pcp_init we print out all zones even if they are empty:

On node 0 totalpages: 245760
  DMA zone: 245760 pages, LIFO batch:31
  DMA32 zone: 0 pages, LIFO batch:0
  Normal zone: 0 pages, LIFO batch:0
  HighMem zone: 0 pages, LIFO batch:0

To conserve dmesg space why not print only the non zero zones.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] mm: make page migration dependent on swap and NUMA
Christoph Lameter [Sat, 25 Mar 2006 11:06:48 +0000 (03:06 -0800)] 
[PATCH] mm: make page migration dependent on swap and NUMA

The page migration code could function without NUMA but we currently have
no users for the non-NUMA case.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: fix memory leak in alloc_kmemlist
Christoph Lameter [Sat, 25 Mar 2006 11:06:47 +0000 (03:06 -0800)] 
[PATCH] slab: fix memory leak in alloc_kmemlist

We have had this memory leak for a while now.  The situation is complicated
by the use of alloc_kmemlist() as a function to resize various caches by
do_tune_cpucache().

What we do here is first of all make sure that we deallocate properly in
the loop over all the nodes.

If we are just resizing caches then we can simply return with -ENOMEM if an
allocation fails.

If the cache is new then we need to rollback and remove all earlier
allocations.

We detect that a cache is new by checking if the link to the global cache
chain has been setup.  This is a bit hackish ....

(also fix up too overlong lines that I added in the last patch...)

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] alloc_kmemlist: Some cleanup in preparation for a real memory leak fix
Christoph Lameter [Sat, 25 Mar 2006 11:06:46 +0000 (03:06 -0800)] 
[PATCH] alloc_kmemlist: Some cleanup in preparation for a real memory leak fix

Inspired by Jesper Juhl's patch from today

1. Get rid of err
We do not set it to anything else but zero.

2. Drop the CONFIG_NUMA stuff.
There are definitions for alloc_alien_cache and free_alien_cache()
that do the right thing for the non NUMA case.

3. Better naming of variables.

4. Remove redundant cachep->nodelists[node] expressions.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: Bypass free lists for __drain_alien_cache()
Christoph Lameter [Sat, 25 Mar 2006 11:06:45 +0000 (03:06 -0800)] 
[PATCH] slab: Bypass free lists for __drain_alien_cache()

__drain_alien_cache() currently drains objects by freeing them to the
(remote) freelists of the original node.  However, each node also has a
shared list containing objects to be used on any processor of that node.
We can avoid a number of remote node accesses by copying the pointers to
the free objects directly into the remote shared array.

And while we are at it: Skip alien draining if the alien cache spinlock is
already taken.

Kiran reported that this is a performance benefit.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: add transfer_objects() function
Christoph Lameter [Sat, 25 Mar 2006 11:06:44 +0000 (03:06 -0800)] 
[PATCH] slab: add transfer_objects() function

slabr_objects() can be used to transfer objects between various object
caches of the slab allocator.  It is currently only used during
__cache_alloc() to retrieve elements from the shared array.  We will be
using it soon to transfer elements from the alien caches to the remote
shared array.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] mm: use kmem_cache_zalloc
Pekka Enberg [Sat, 25 Mar 2006 11:06:43 +0000 (03:06 -0800)] 
[PATCH] mm: use kmem_cache_zalloc

Convert mm/ to use the new kmem_cache_zalloc allocator.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: optimize constant-size kzalloc calls
Pekka Enberg [Sat, 25 Mar 2006 11:06:43 +0000 (03:06 -0800)] 
[PATCH] slab: optimize constant-size kzalloc calls

As suggested by Eric Dumazet, optimize kzalloc() calls that pass a
compile-time constant size.  Please note that the patch increases kernel
text slightly (~200 bytes for defconfig on x86).

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: introduce kmem_cache_zalloc allocator
Pekka Enberg [Sat, 25 Mar 2006 11:06:42 +0000 (03:06 -0800)] 
[PATCH] slab: introduce kmem_cache_zalloc allocator

Introduce a memory-zeroing variant of kmem_cache_alloc.  The allocator
already exits in XFS and there are potential users for it so this patch
makes the allocator available for the general public.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: implement /proc/slab_allocators
Al Viro [Sat, 25 Mar 2006 11:06:39 +0000 (03:06 -0800)] 
[PATCH] slab: implement /proc/slab_allocators

Implement /proc/slab_allocators.   It produces output like:

idr_layer_cache: 80 idr_pre_get+0x33/0x4e
buffer_head: 2555 alloc_buffer_head+0x20/0x75
mm_struct: 9 mm_alloc+0x1e/0x42
mm_struct: 20 dup_mm+0x36/0x370
vm_area_struct: 384 dup_mm+0x18f/0x370
vm_area_struct: 151 do_mmap_pgoff+0x2e0/0x7c3
vm_area_struct: 1 split_vma+0x5a/0x10e
vm_area_struct: 11 do_brk+0x206/0x2e2
vm_area_struct: 2 copy_vma+0xda/0x142
vm_area_struct: 9 setup_arg_pages+0x99/0x214
fs_cache: 8 copy_fs_struct+0x21/0x133
fs_cache: 29 copy_process+0xf38/0x10e3
files_cache: 30 alloc_files+0x1b/0xcf
signal_cache: 81 copy_process+0xbaa/0x10e3
sighand_cache: 77 copy_process+0xe65/0x10e3
sighand_cache: 1 de_thread+0x4d/0x5f8
anon_vma: 241 anon_vma_prepare+0xd9/0xf3
size-2048: 1 add_sect_attrs+0x5f/0x145
size-2048: 2 journal_init_revoke+0x99/0x302
size-2048: 2 journal_init_revoke+0x137/0x302
size-2048: 2 journal_init_inode+0xf9/0x1c4

Cc: Manfred Spraul <manfred@colorfullife.com>
Cc: Alexander Nyberg <alexn@telia.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Christoph Lameter <clameter@engr.sgi.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
DESC
slab-leaks3-locking-fix
EDESC
From: Andrew Morton <akpm@osdl.org>

Update for slab-remove-cachep-spinlock.patch

Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: Manfred Spraul <manfred@colorfullife.com>
Cc: Alexander Nyberg <alexn@telia.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Christoph Lameter <clameter@engr.sgi.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] cirrus ep93xx watchdog driver
Alessandro Zummo [Sat, 25 Mar 2006 11:06:37 +0000 (03:06 -0800)] 
[PATCH] cirrus ep93xx watchdog driver

Add a driver for the on-chip watchdog on the cirrus ep93xx series of ARM
CPUs.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Optimise d_find_alias()
David Howells [Sat, 25 Mar 2006 11:06:36 +0000 (03:06 -0800)] 
[PATCH] Optimise d_find_alias()

The attached patch optimises d_find_alias() to only take the spinlock if
there's anything in the the inode's alias list.  If there isn't, it returns
NULL immediately.

With respect to the superblock sharing patch, this should reduce by one the
number of times the dcache_lock is taken by nfs_lookup() for ordinary
directory lookups.

Only in the case where there's already a dentry for particular directory inode
(such as might happen when another mountpoint is rooted at that dentry) will
the lock then be taken the extra time.

Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Validate and sanitze itimer timeval from userspace
Thomas Gleixner [Sat, 25 Mar 2006 11:06:35 +0000 (03:06 -0800)] 
[PATCH] Validate and sanitze itimer timeval from userspace

According to the specification the timevals must be validated and an
errorcode -EINVAL returned in case the timevals are not in canonical form.
This check was never done in Linux.

The pre 2.6.16 code converted invalid timevals silently.  Negative timeouts
were converted by the timeval_to_jiffies conversion to the maximum timeout.

hrtimers and the ktime_t operations expect timevals in canonical form.
Otherwise random results might happen on 32 bits machines due to the
optimized ktime_add/sub operations.  Negative timeouts are treated as
already expired.  This might break applications which work on pre 2.6.16.

To prevent random behaviour and API breakage the timevals are checked and
invalid timevals sanitized in a simliar way as the pre 2.6.16 code did.

Invalid timevals are reported with a per boot limited number of kernel
messages so applications which use this misfeature can be corrected.

After a grace period of one year the sanitizing should be replaced by a
correct validation check.  This is also documented in
Documentation/feature-removal-schedule.txt

The validation and sanitizing is done inside do_setitimer so all callers
(sys_setitimer, compat_sys_setitimer, osf_setitimer) are catched.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sys_alarm() unsigned signed conversion fixup
Thomas Gleixner [Sat, 25 Mar 2006 11:06:33 +0000 (03:06 -0800)] 
[PATCH] sys_alarm() unsigned signed conversion fixup

alarm() calls the kernel with an unsigend int timeout in seconds.  The
value is stored in the tv_sec field of a struct timeval to setup the
itimer.  The tv_sec field of struct timeval is of type long, which causes
the tv_sec value to be negative on 32 bit machines if seconds > INT_MAX.

Before the hrtimer merge (pre 2.6.16) such a negative value was converted
to the maximum jiffies timeout by the timeval_to_jiffies conversion.  It's
not clear whether this was intended or just happened to be done by the
timeval_to_jiffies code.

hrtimers expect a timeval in canonical form and treat a negative timeout as
already expired.  This breaks the legitimate usage of alarm() with a
timeout value > INT_MAX seconds.

For 32 bit machines it is therefor necessary to limit the internal seconds
value to avoid API breakage.  Instead of doing this in all implementations
of sys_alarm the duplicated sys_alarm code is moved into a common function
in itimer.c

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] timer irq driven soft watchdog fix
Andrew Morton [Sat, 25 Mar 2006 11:06:32 +0000 (03:06 -0800)] 
[PATCH] timer irq driven soft watchdog fix

I seem to have lost this hunk in yesterday's patch.  It brings the
coming-online CPU's softlockup timer up to date so we don't get false-positive
tripups during CPU hot-add.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fix DMI onboard device discovery
Andrey Panin [Sat, 25 Mar 2006 11:06:31 +0000 (03:06 -0800)] 
[PATCH] fix DMI onboard device discovery

Attached patch fixes invalid pointer arithmetic in DMI code to make onboard
device discovery working again.

akpm: bug has been present since dmi_find_device() was added in 2.6.14.
Affects ipmi only (I think) - the symptoms weren't described.

akpm: changed to use pointer arithmetic rather than open-coded sizeof.

Signed-off-by: Andrey Panin <pazke@donpac.ru>
Cc: Corey Minyard <minyard@acm.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoV4L/DVB (3604): V4l printk fix
Andrew Morton [Sat, 25 Mar 2006 12:24:19 +0000 (09:24 -0300)] 
V4L/DVB (3604): V4l printk fix

drivers/media/video/v4l2-common.c: In function `v4l_printk_ioctl_arg':
drivers/media/video/v4l2-common.c:477: warning: `0' flag used with `%p' printf format
Someone went and "improved" my patch ;)

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3599c): Whitespace cleanups under Documentation/video4linux
Mauro Carvalho Chehab [Sat, 25 Mar 2006 12:21:43 +0000 (09:21 -0300)] 
V4L/DVB (3599c): Whitespace cleanups under Documentation/video4linux

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3599b): Whitespace cleanups under drivers/media
Mauro Carvalho Chehab [Sat, 25 Mar 2006 12:19:53 +0000 (09:19 -0300)] 
V4L/DVB (3599b): Whitespace cleanups under drivers/media

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years agoV4L/DVB (3599a): Move drivers/usb/media to drivers/media/video
Mauro Carvalho Chehab [Sat, 25 Mar 2006 12:05:39 +0000 (09:05 -0300)] 
V4L/DVB (3599a): Move drivers/usb/media to drivers/media/video

Because of historic reasons, there are two separate directories with
V4L stuff. Most drivers are located at driver/media/video. However, some
code for USB Webcams were inserted under drivers/usb/media.

This makes difficult for module authors to know were things should be.
Also, makes Kconfig menu confusing for normal users.

This patch moves all V4L content under drivers/usb/media to
drivers/media/video, and fixes Kconfig/Makefile entries.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
18 years ago[NETFILTER] x_table.c: sem2mutex
Ingo Molnar [Sat, 25 Mar 2006 09:41:10 +0000 (01:41 -0800)] 
[NETFILTER] x_table.c: sem2mutex

Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV4]: Aggregate route entries with different TOS values
Ilia Sotnikov [Sat, 25 Mar 2006 09:38:55 +0000 (01:38 -0800)] 
[IPV4]: Aggregate route entries with different TOS values

When we get an ICMP need-to-frag message, the original TOS value in the
ICMP payload cannot be used as a key to look up the routes to update.
This is because the TOS field may have been modified by routers on the
way.  Similarly, ip_rt_redirect should also ignore the TOS as the router
that gave us the message may have modified the TOS value.

The patch achieves this objective by aggregating entries with different
TOS values (but are otherwise identical) into the same bucket.  This
makes it easy to update them at the same time when an ICMP message is
received.

In future we should use a twin-hashing scheme where teh aggregation
occurs at the entry level.  That is, the TOS goes back into the hash
for normal lookups while ICMP lookups will end up with a node that
gives us a list that contains all other route entries that differ
only by TOS.

Signed-off-by: Ilia Sotnikov <hostcc@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TCP]: Mark tcp_*mem[] __read_mostly.
David S. Miller [Sat, 25 Mar 2006 09:36:56 +0000 (01:36 -0800)] 
[TCP]: Mark tcp_*mem[] __read_mostly.

Suggested by Stephen Hemminger.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TCP]: Set default max buffers from memory pool size
John Heffner [Sat, 25 Mar 2006 09:34:07 +0000 (01:34 -0800)] 
[TCP]: Set default max buffers from memory pool size

This patch sets the maximum TCP buffer sizes (available to automatic
buffer tuning, not to setsockopt) based on the TCP memory pool size.
The maximum sndbuf and rcvbuf each will be up to 4 MB, but no more
than 1/128 of the memory pressure threshold.

Signed-off-by: John Heffner <jheffner@psc.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SCTP]: Fix up sctp_rcv return value
Herbert Xu [Sat, 25 Mar 2006 09:25:29 +0000 (01:25 -0800)] 
[SCTP]: Fix up sctp_rcv return value

I was working on the ipip/xfrm problem and as usual I get side-tracked by
other problems.

As part of an attempt to change the IPv4 protocol handler calling
convention I found that SCTP violated the existing convention.

It's returning non-zero values after freeing the skb.  This is doubly bad
as 1) the skb gets resubmitted; 2) the return value is interpreted as a
protocol number.

This patch changes those return values to zero.

IPv6 doesn't suffer from this problem because it uses a positive return
value as an indication for resubmission.  So the only effect of this patch
there is to increment the IPSTATS_MIB_INDELIVERS counter which IMHO is
the right thing to do.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Take RTNL when unregistering notifier
Herbert Xu [Sat, 25 Mar 2006 09:24:25 +0000 (01:24 -0800)] 
[NET]: Take RTNL when unregistering notifier

The netdev notifier call chain is currently unregistered without taking
any locks outside the notifier system.  Because the notifier system itself
does not synchronise unregistration with respect to the calling of the
chain, we as its user need to do our own locking.

We are supposed to take the RTNL for all calls to netdev notifiers, so
taking the RTNL should be sufficient to protect it.

The registration path in dev.c already takes the RTNL so it's OK.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years agoIPoIB: P_Key change event handling
Leonid Arsh [Thu, 23 Mar 2006 17:52:51 +0000 (19:52 +0200)] 
IPoIB: P_Key change event handling

This patch causes the network interface to respond to P_Key change
events correctly.  As a result, you'll see a child interface in the
"RUNNING" state (netif_carrier_on()) only when the corresponding P_Key
is configured by the SM.  When SM removes a P_Key, the "RUNNING" state
will be disabled for the corresponding network interface.  To
implement this, I added IB_EVENT_PKEY_CHANGE event handling.  To
prevent flushing the device before the device is open by the "delay
open" mechanism, I added an additional device flag called
IPOIB_FLAG_INITIALIZED.

This also prevents the child network interface from trying to join to
multicast groups until the PKEY is configured.  We used to get error
messages like:

    ib0.f2f2: couldn't attach QP to multicast group ff12:401b:f2f2:0:0:0:ffff:ffff

in this case.  To fix this, I just check IPOIB_FLAG_OPER_UP flag in
ipoib_set_mcast_list().

Signed-off-by: Leonid Arsh <leonida@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/mthca: Fix modify QP error path
Roland Dreier [Fri, 24 Mar 2006 23:47:30 +0000 (15:47 -0800)] 
IB/mthca: Fix modify QP error path

If the call to mthca_MODIFY_QP() failed, then mthca_modify_qp() would
still do some things it shouldn't, such as store away attributes for
special QPs.  Fix this, and simplify the code, by simply jumping to
the exit path if mthca_MODIFY_QP() fails.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIPoIB: Fix network interface "RUNNING" status
Leonid Arsh [Wed, 22 Mar 2006 17:54:24 +0000 (19:54 +0200)] 
IPoIB: Fix network interface "RUNNING" status

With the current IPoIB driver, the status of network interfaces stays
"RUNNING" even if the link goes down (for example because a cable is
unplugged).  Fix this by flushing the IPoIB interface when the link
goes down.

Signed-off-by: Leonid Arsh <leonida@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/mthca: Fix indentation
Roland Dreier [Fri, 24 Mar 2006 23:47:29 +0000 (15:47 -0800)] 
IB/mthca: Fix indentation

Fix some whitespace damage (indenting with spaces) that snuck in.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/mthca: Fix uninitialized variable in mthca_alloc_qp()
Jack Morgenstein [Wed, 22 Mar 2006 07:52:31 +0000 (09:52 +0200)] 
IB/mthca: Fix uninitialized variable in mthca_alloc_qp()

mthca_alloc_sqp() by mthca_set_qp_size() need to set qp->transport
before calling mthca_set_qp_size(), since the value is used there.

Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/mthca: Check SRQ limit in modify SRQ operation
Jack Morgenstein [Mon, 20 Mar 2006 15:32:43 +0000 (17:32 +0200)] 
IB/mthca: Check SRQ limit in modify SRQ operation

When setting the shared receive queue (SRQ) watermark in a modify SRQ
operation, make sure that the supplied value is not larger than the
full size of the SRQ.

Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/mthca: Check that SRQ WQE size does not exceed device's max value
Jack Morgenstein [Mon, 20 Mar 2006 10:35:34 +0000 (12:35 +0200)] 
IB/mthca: Check that SRQ WQE size does not exceed device's max value

Guarantee the calculated work queue entry size does not exceed the max
allowable WQE size when creating an SRQ.  This is a problem with Arbel
in Tavor-compatibility mode because the current WQE size computation
method rounds up to next power of 2.

Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/mthca: Check that sgid_index and path_mtu are valid in modify_qp
Dotan Barak [Sun, 19 Mar 2006 15:20:36 +0000 (17:20 +0200)] 
IB/mthca: Check that sgid_index and path_mtu are valid in modify_qp

Add a check that the modify QP parameters sgid_index and path_mtu are
valid, since they might come from userspace.

Signed-off-by: Dotan Barak <dotanb@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years agoIB/srp: Use a fake scatterlist for non-SG SCSI commands
Roland Dreier [Fri, 24 Mar 2006 23:47:26 +0000 (15:47 -0800)] 
IB/srp: Use a fake scatterlist for non-SG SCSI commands

Since the SCSI midlayer is moving towards entirely getting rid of
commands with use_sg == 0, we should treat this case as an exception.
Therefore, change the IB SRP initiator to create a fake scatterlist
for these commands with sg_init_one().  This simplifies the flow of
DMA mapping and unmapping, since SRP can just use dma_map_sg() and
dma_unmap_sg() unconditionally, rather than having to choose between
the dma_{map,unmap}_sg() and dma_{map,unmap}_single() variants.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years ago[WIRELESS]: Fix config dependencies.
Dave Jones [Fri, 24 Mar 2006 23:47:25 +0000 (15:47 -0800)] 
[WIRELESS]: Fix config dependencies.

I accidentally ended up with a config that set NET_RADIO off,
and NET_WIRELESS_RTNETLINK on, which blew up thus..

net/built-in.o: In function `do_setlink':net/core/rtnetlink.c:479: undefined reference to `wireless_rtnetlink_set'
net/built-in.o: In function `do_getlink':net/core/rtnetlink.c:521: undefined reference to `wireless_rtnetlink_get'

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years agoIPoIB: Pass correct pointer when flushing child interfaces
Leonid Arsh [Fri, 24 Mar 2006 23:47:25 +0000 (15:47 -0800)] 
IPoIB: Pass correct pointer when flushing child interfaces

ipoib_ib_dev_flush() should get passed cpriv->dev, not &cpriv->dev.

Signed-off-by: Leonid Arsh <leonida@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
18 years ago[NET]: Fill in a 32-bit hole in struct sock on 64-bit platforms.
David S. Miller [Fri, 24 Mar 2006 23:12:37 +0000 (15:12 -0800)] 
[NET]: Fill in a 32-bit hole in struct sock on 64-bit platforms.

This makes struct sock 8 bytes smaller on 64-bit.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Ensure device name passed to SO_BINDTODEVICE is NULL terminated.
David S. Miller [Fri, 24 Mar 2006 06:47:40 +0000 (22:47 -0800)] 
[NET]: Ensure device name passed to SO_BINDTODEVICE is NULL terminated.

Found by Solar Designer.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[MODULES]: Don't allow statically declared exports
Patrick McHardy [Fri, 24 Mar 2006 06:07:34 +0000 (22:07 -0800)] 
[MODULES]: Don't allow statically declared exports

Add an extern declaration for exported symbols to make the compiler warn
on symbols declared statically.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[BRIDGE]: Unaligned accesses in the ethernet bridge
Peter Chubb [Fri, 24 Mar 2006 05:39:47 +0000 (21:39 -0800)] 
[BRIDGE]: Unaligned accesses in the ethernet bridge

I see lots of
kernel unaligned access to 0xa0000001009dbb6f, ip=0xa000000100811591
kernel unaligned access to 0xa0000001009dbb6b, ip=0xa0000001008115c1
kernel unaligned access to 0xa0000001009dbb6d, ip=0xa0000001008115f1
messages in my logs on IA64 when using the ethernet bridge with 2.6.16.

Appended is a patch to fix them.

Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years agoocfs2: finally remove MLF* macros
Mark Fasheh [Mon, 6 Mar 2006 20:33:14 +0000 (12:33 -0800)] 
ocfs2: finally remove MLF* macros

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: don't use MLF* in the file system
Mark Fasheh [Fri, 3 Mar 2006 18:24:33 +0000 (10:24 -0800)] 
ocfs2: don't use MLF* in the file system

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: don't use MLF* in dlm/ files
Kurt Hackel [Fri, 3 Mar 2006 00:43:36 +0000 (16:43 -0800)] 
ocfs2: don't use MLF* in dlm/ files

Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: don't use MLF* in cluster/ files
Mark Fasheh [Thu, 2 Mar 2006 19:10:05 +0000 (11:10 -0800)] 
ocfs2: don't use MLF* in cluster/ files

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years ago[PATCH] ocfs2: dlm recovery fixes
Kurt Hackel [Mon, 6 Mar 2006 22:08:49 +0000 (14:08 -0800)] 
[PATCH] ocfs2: dlm recovery fixes

when starting lock mastery (excepting the recovery lock) wait on any nodes
needing recovery. fix one instance where lock resources were left attached
to the recovery list after recovery completed.  ensure that the node_down
code is run uniformly regardless of which node found the dead node first.

Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years ago[PATCH] ocfs2: fix hang in dlm lock resource mastery
Kurt Hackel [Fri, 3 Mar 2006 02:09:26 +0000 (18:09 -0800)] 
[PATCH] ocfs2: fix hang in dlm lock resource mastery

fixes hangs in lock mastery related to refcounting on the mle structure

Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years agoocfs2: use __attribute__ format
Mark Fasheh [Fri, 3 Mar 2006 18:18:58 +0000 (10:18 -0800)] 
ocfs2: use __attribute__ format

Use the "format" attribute on ocfs2_error() and ocfs2_abort() so that the
compiler will warn when we get calls to those functions wrong.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years ago[IA64] New IA64 core/thread detection patch
Fenghua Yu [Tue, 28 Feb 2006 00:16:22 +0000 (16:16 -0800)] 
[IA64] New IA64 core/thread detection patch

IPF SDM 2.2 changes definition of PAL_LOGICAL_TO_PHYSICAL to add
proc_number=-1 to get core/thread mapping info on the running processer.

Based on this change, we had better to update existing core/thread
detection in IA64 kernel correspondingly. The attached patch implements
this change. It simplifies detection code and eliminates potential race
condition. It also runs a bit faster and has better scalability especially
when cores and threads number grows up in one package.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
18 years ago[IA64] Increase max node count on SN platforms
Jack Steiner [Thu, 2 Mar 2006 22:02:32 +0000 (16:02 -0600)] 
[IA64] Increase max node count on SN platforms

Update configuration files with new CONFIG option.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
18 years ago[IA64] Increase max node count on SN platforms
Jack Steiner [Thu, 2 Mar 2006 22:02:28 +0000 (16:02 -0600)] 
[IA64] Increase max node count on SN platforms

Node number are kept in the cpu_to_node_map which is
currently defined as u8. Change to u16 to accomodate
larger node numbers.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>