sfrench/cifs-2.6.git
17 years ago[PATCH] knfsd: Don't ignore kstrdup failure in rpc caches
NeilBrown [Wed, 13 Dec 2006 08:35:44 +0000 (00:35 -0800)]
[PATCH] knfsd: Don't ignore kstrdup failure in rpc caches

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] knfsd: nfsd4: simplify filehandle check
J.Bruce Fields [Wed, 13 Dec 2006 08:35:43 +0000 (00:35 -0800)]
[PATCH] knfsd: nfsd4: simplify filehandle check

Kill another big "if" clause.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] knfsd: nfsd4: simplify migration op check
J.Bruce Fields [Wed, 13 Dec 2006 08:35:39 +0000 (00:35 -0800)]
[PATCH] knfsd: nfsd4: simplify migration op check

I'm not too fond of these big if conditions.  Replace them by checks of a flag
in the operation descriptor.  To my eye this makes the code a bit more
self-documenting, and makes the complicated part of the code (proc_compound) a
little more compact.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] knfsd: nfsd4: reorganize compound ops
J.Bruce Fields [Wed, 13 Dec 2006 08:35:38 +0000 (00:35 -0800)]
[PATCH] knfsd: nfsd4: reorganize compound ops

Define an op descriptor struct, use it to simplify nfsd4_proc_compound().

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] knfsd: nfsd4: make verify and nverify wrappers
J.Bruce Fields [Wed, 13 Dec 2006 08:35:31 +0000 (00:35 -0800)]
[PATCH] knfsd: nfsd4: make verify and nverify wrappers

Make wrappers for verify and nverify, for consistency with other ops.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] knfsd: nfsd4: don't inline nfsd4 compound op functions
J.Bruce Fields [Wed, 13 Dec 2006 08:35:29 +0000 (00:35 -0800)]
[PATCH] knfsd: nfsd4: don't inline nfsd4 compound op functions

The inlining contributes to bloating the stack of nfsd4_compound, and I want
to change the compound op functions to function pointers anyway.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] knfsd: nfsd4: move replay_owner to cstate
J.Bruce Fields [Wed, 13 Dec 2006 08:35:28 +0000 (00:35 -0800)]
[PATCH] knfsd: nfsd4: move replay_owner to cstate

Tuck away the replay_owner in the cstate while we're at it.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] knfsd: nfsd4: remove spurious replay_owner check
J.Bruce Fields [Wed, 13 Dec 2006 08:35:28 +0000 (00:35 -0800)]
[PATCH] knfsd: nfsd4: remove spurious replay_owner check

OK, this is embarassing--I've even looked back at the history, and cannot for
the life of me figure out why I added this check.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] knfsd: nfsd4: pass saved and current fh together into nfsd4 operations
J.Bruce Fields [Wed, 13 Dec 2006 08:35:27 +0000 (00:35 -0800)]
[PATCH] knfsd: nfsd4: pass saved and current fh together into nfsd4 operations

Pass the saved and current filehandles together into all the nfsd4 compound
operations.

I want a unified interface to these operations so we can just call them by
pointer and throw out the huge switch statement.

Also I'll eventually want a structure like this--that holds the state used
during compound processing--for deferral.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] knfsd: svcrpc: remove another silent drop from deferral code
J.Bruce Fields [Wed, 13 Dec 2006 08:35:26 +0000 (00:35 -0800)]
[PATCH] knfsd: svcrpc: remove another silent drop from deferral code

There's no point deferring something just to immediately fail the deferral,
especially now that we can do something more useful in the failure case by
returning an error.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] knfsd: nfsd: don't drop silently on upcall deferral
J.Bruce Fields [Wed, 13 Dec 2006 08:35:25 +0000 (00:35 -0800)]
[PATCH] knfsd: nfsd: don't drop silently on upcall deferral

To avoid tying up server threads when nfsd makes an upcall (to mountd, to get
export options, to idmapd, for nfsv4 name<->id mapping, etc.), we temporarily
"drop" the request and save enough information so that we can revisit it
later.

Certain failures during the deferral process can cause us to really drop the
request and never revisit it.

This is often less than ideal, and is unacceptable in the NFSv4 case--rfc 3530
forbids the server from dropping a request without also closing the
connection.

As a first step, we modify the deferral code to return -ETIMEDOUT (which is
translated to nfserr_jukebox in the v3 and v4 cases, and remains a drop in the
v2 case).

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] knfsd: nfsd4: handling more nfsd_cross_mnt errors in nfsd4 readdir
J.Bruce Fields [Wed, 13 Dec 2006 08:35:24 +0000 (00:35 -0800)]
[PATCH] knfsd: nfsd4: handling more nfsd_cross_mnt errors in nfsd4 readdir

This patch on its own causes no change in behavior, since nfsd_cross_mnt()
only returns -EAGAIN; but in the future I'd like it to also be able to return
-ETIMEDOUT, so we may as well handle any possible error here.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] knfsd: nfsd: simplify exp_pseudoroot
J.Bruce Fields [Wed, 13 Dec 2006 08:35:23 +0000 (00:35 -0800)]
[PATCH] knfsd: nfsd: simplify exp_pseudoroot

Note there's no need for special handling of -EAGAIN here; nfserrno() does
what we want already.  So this is a pure cleanup with no change in
functionality.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] knfsd: nfsd: make exp_rootfh handle exp_parent errors
J.Bruce Fields [Wed, 13 Dec 2006 08:35:21 +0000 (00:35 -0800)]
[PATCH] knfsd: nfsd: make exp_rootfh handle exp_parent errors

Since exp_parent can fail by returning an error (-EAGAIN) in addition to by
returning NULL, we should check for that case in exp_rootfh.

(TODO: we should check that userland handles these errors too.)

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] knfsd: nfsd4: clarify units of COMPOUND_SLACK_SPACE
J.Bruce Fields [Wed, 13 Dec 2006 08:35:20 +0000 (00:35 -0800)]
[PATCH] knfsd: nfsd4: clarify units of COMPOUND_SLACK_SPACE

A comment here incorrectly states that "slack_space" is measured in words, not
bytes.  Remove the comment, and adjust a variable name and a few comments to
clarify the situation.

This is pure cleanup; there should be no change in functionality.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] knfsd: svcrpc: fix gss krb5i memory leak
J.Bruce Fields [Wed, 13 Dec 2006 08:35:19 +0000 (00:35 -0800)]
[PATCH] knfsd: svcrpc: fix gss krb5i memory leak

The memory leak here is embarassingly obvious.

This fixes a problem that causes the kernel to leak a small amount of memory
every time it receives a integrity-protected request.

Thanks to Aim Le Rouzic for the bug report.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] knfsd: nfsd4: remove a dprink from nfsd4_lock
J.Bruce Fields [Wed, 13 Dec 2006 08:35:18 +0000 (00:35 -0800)]
[PATCH] knfsd: nfsd4: remove a dprink from nfsd4_lock

This dprintk is printing the wrong error now, but it's probably an unnecessary
dprintk anyway; just remove it.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] remove the broken BLK_DEV_SWIM_IOP driver
Adrian Bunk [Wed, 13 Dec 2006 08:35:17 +0000 (00:35 -0800)]
[PATCH] remove the broken BLK_DEV_SWIM_IOP driver

The BLK_DEV_SWIM_IOP driver has:
- already been marked as BROKEN in 2.6.0 three years ago and
- is still marked as BROKEN.

Drivers that had been marked as BROKEN for such a long time seem to be
unlikely to be revived in the forseeable future.

But if anyone wants to ever revive this driver, the code is still
present in the older kernel releases.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Jens Axboe <jens.axboe@oracle.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] one more EXPORT_UNUSED_SYMBOL removal
Adrian Bunk [Wed, 13 Dec 2006 08:35:16 +0000 (00:35 -0800)]
[PATCH] one more EXPORT_UNUSED_SYMBOL removal

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] update Tigran's email addresses
Tigran Aivazian [Wed, 13 Dec 2006 08:35:14 +0000 (00:35 -0800)]
[PATCH] update Tigran's email addresses

As Adrian pointed out recently, there were still a couple of places where
I should have fixed my email address.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] ncpfs: ensure we free wdog_pid on parse_option or fill_inode failure
Eric W. Biederman [Wed, 13 Dec 2006 08:35:13 +0000 (00:35 -0800)]
[PATCH] ncpfs: ensure we free wdog_pid on parse_option or fill_inode failure

This took a little refactoring but now errors are handled cleanly.  When
this code used pid_t values this wasn't necessary because you can't
leak a pid_t.

Thanks to Peter Vandrovec for spotting this.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Peter Vandrovec <vandrove@vc.cvut.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] ncpfs: Use struct pid to track the userspace watchdog process
Eric W. Biederman [Wed, 13 Dec 2006 08:35:11 +0000 (00:35 -0800)]
[PATCH] ncpfs: Use struct pid to track the userspace watchdog process

This patch converts the tracking of the user space watchdog process from using
a pid_t to use struct pid.  This makes us safe from pid wrap around issues and
prepares the way for the pid namespace.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Petr Vandrovec <VANDROVE@vc.cvut.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] smbfs: Make conn_pid a struct pid
Eric W. Biederman [Wed, 13 Dec 2006 08:35:10 +0000 (00:35 -0800)]
[PATCH] smbfs: Make conn_pid a struct pid

smbfs keeps track of the user space server process in conn_pid.  This converts
that track to use a struct pid instead of pid_t.  This keeps us safe from pid
wrap around issues and prepares the way for the pid namespace.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] n_r3964: Use struct pid to track user space clients
Eric W. Biederman [Wed, 13 Dec 2006 08:35:10 +0000 (00:35 -0800)]
[PATCH] n_r3964: Use struct pid to track user space clients

Currently this driver tracks user space clients it should send signals to.  In
the presenct of file descriptor passing this is appears susceptible to
confusion from pid wrap around issues.

Replacing this with a struct pid prevents us from getting confused, and
prepares for a pid namespace implementation.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] tty_io.c balance tty_ldisc_ref()
Dan Carpenter [Wed, 13 Dec 2006 08:35:09 +0000 (00:35 -0800)]
[PATCH] tty_io.c balance tty_ldisc_ref()

tty_ldisc_deref() should only be called when tty_ldisc_ref() succeeds
otherwise it triggers a BUG().  There's already a function
tty_ldisc_flush() that flushes properly.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] rtc framewok: rtc_wkalrm.enabled reporting updates
David Brownell [Wed, 13 Dec 2006 08:35:08 +0000 (00:35 -0800)]
[PATCH] rtc framewok: rtc_wkalrm.enabled reporting updates

Fix a glitch in the procfs dumping of whether the alarm IRQ is enabled: use
the traditional name (from drivers/char/rtc.c and many other places) of
"alarm_IRQ", not "alrm_wakeup" (which didn't even match the efirtc code, which
originated that reporting API).

Also, update a few of the RTC drivers to stop providing that duplicate status,
and/or to expose it properly when reporting the alarm state.  We really don't
want every RTC driver doing their own thing here...

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] rtc: remove syslog spam on registration
David Brownell [Wed, 13 Dec 2006 08:35:06 +0000 (00:35 -0800)]
[PATCH] rtc: remove syslog spam on registration

This removes some syslog spam as RTC drivers register; debug messages
shouldn't come out at "info" level.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] RTC driver init adjustment
Jan Beulich [Wed, 13 Dec 2006 08:35:05 +0000 (00:35 -0800)]
[PATCH] RTC driver init adjustment

- conditionalizes procfs code upon CONFIG_PROC_FS (to reduce code size when
  that option is not enabled)

- make initialization no longer fail when the procfs entry can't be
  allocated (namely would initialization always have failed when
  CONFIG_PROC_FS was not set)

- move the formerly file-scope static variable rtc_int_handler_ptr into
  the only function using it, and makes it automatic.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] rtc: fx error case
Jan Beulich [Wed, 13 Dec 2006 08:35:04 +0000 (00:35 -0800)]
[PATCH] rtc: fx error case

Ensure RTC driver doesn't use its timer when it doesn't get to set it up
(as it cannot currently prevent other of its functions to be called from
outside when not built as a module - probably this should also be
addressed).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] lockd endianness annotations
Al Viro [Wed, 13 Dec 2006 08:35:03 +0000 (00:35 -0800)]
[PATCH] lockd endianness annotations

Annotated, all places switched to keeping status net-endian.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] hci endianness annotations
Al Viro [Wed, 13 Dec 2006 08:35:01 +0000 (00:35 -0800)]
[PATCH] hci endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] missing includes in hilkbd
Al Viro [Wed, 13 Dec 2006 08:35:01 +0000 (00:35 -0800)]
[PATCH] missing includes in hilkbd

Now that it's built on m68k too...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] uml problems with linux/io.h
Al Viro [Wed, 13 Dec 2006 08:35:00 +0000 (00:35 -0800)]
[PATCH] uml problems with linux/io.h

Remove useless includes of linux/io.h, don't even try to build iomap_copy
on uml (it doesn't have readb() et.al., so...)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] appldata_mem dependes on vm counters
Al Viro [Wed, 13 Dec 2006 08:34:59 +0000 (00:34 -0800)]
[PATCH] appldata_mem dependes on vm counters

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] CONFIG_COMPUTONE should depend on ISA|EISA|PCI
Al Viro [Wed, 13 Dec 2006 08:34:58 +0000 (00:34 -0800)]
[PATCH] CONFIG_COMPUTONE should depend on ISA|EISA|PCI

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] tty: remove useless memory barrier
Ralf Baechle [Wed, 13 Dec 2006 08:34:57 +0000 (00:34 -0800)]
[PATCH] tty: remove useless memory barrier

I don't see why there is a memory barrier in copy_from_read_buf() at all.
Even if it was useful spin_unlock_irqrestore implies a barrier.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Fix numerous kcalloc() calls, convert to kzalloc()
Robert P. J. Day [Wed, 13 Dec 2006 08:34:52 +0000 (00:34 -0800)]
[PATCH] Fix numerous kcalloc() calls, convert to kzalloc()

All kcalloc() calls of the form "kcalloc(1,...)" are converted to the
equivalent kzalloc() calls, and a few kcalloc() calls with the incorrect
ordering of the first two arguments are fixed.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Adam Belay <ambx1@neo.rr.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Greg KH <greg@kroah.com>
Cc: Mark Fasheh <mark.fasheh@oracle.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Use activate_mm() in fs/aio.c:use_mm()
Jeremy Fitzhardinge [Wed, 13 Dec 2006 08:34:49 +0000 (00:34 -0800)]
[PATCH] Use activate_mm() in fs/aio.c:use_mm()

activate_mm() is not the right thing to be using in use_mm().  It should be
switch_mm().

On normal x86, they're synonymous, but for the Xen patches I'm adding a
hook which assumes that activate_mm is only used the first time a new mm
is used after creation (I have another hook for dealing with dup_mm).  I
think this use of activate_mm() is the only place where it could be used
a second time on an mm.

>From a quick look at the other architectures I think this is OK (most
simply implement one in terms of the other), but some are doing some
subtly different stuff between the two.

Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] lockdep: fix possible races while disabling lock-debugging
Ingo Molnar [Wed, 13 Dec 2006 08:34:43 +0000 (00:34 -0800)]
[PATCH] lockdep: fix possible races while disabling lock-debugging

Jarek Poplawski noticed that lockdep global state could be accessed in a
racy way if one CPU did a lockdep assert (shutting lockdep down), while the
other CPU would try to do something that changes its global state.

This patch fixes those races and cleans up lockdep's internal locking by
adding a graph_lock()/graph_unlock()/debug_locks_off_graph_unlock helpers.

(Also note that as we all know the Linux kernel is, by definition, bug-free
and perfect, so this code never triggers, so these fixes are highly
theoretical.  I wrote this patch for aesthetic reasons alone.)

[akpm@osdl.org: build fix]
[jarkao2@o2.pl: build fix's refix]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jarek Poplawski <jarkao2@o2.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] lockdep: print irq-trace info on asserts
Ingo Molnar [Wed, 13 Dec 2006 08:34:43 +0000 (00:34 -0800)]
[PATCH] lockdep: print irq-trace info on asserts

When we print an assert due to scheduling-in-atomic bugs, and if lockdep
is enabled, then the IRQ tracing information of lockdep can be printed
to pinpoint the code location that disabled interrupts. This saved me
quite a bit of debugging time in cases where the backtrace did not
identify the irq-disabling site well enough.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] lockdep: use chain hash on CONFIG_DEBUG_LOCKDEP too
Ingo Molnar [Wed, 13 Dec 2006 08:34:42 +0000 (00:34 -0800)]
[PATCH] lockdep: use chain hash on CONFIG_DEBUG_LOCKDEP too

CONFIG_DEBUG_LOCKDEP is unacceptably slow because it does not utilize
the chain-hash. Turn the chain-hash back on in this case too.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] lockdep: clean up VERY_VERBOSE define
Ingo Molnar [Wed, 13 Dec 2006 08:34:41 +0000 (00:34 -0800)]
[PATCH] lockdep: clean up VERY_VERBOSE define

Cleanup: the VERY_VERBOSE define was unnecessarily dependent on #ifdef VERBOSE
- while the VERBOSE switch is 0 or 1 (always defined).

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] lockdep: improve lockdep_reset()
Ingo Molnar [Wed, 13 Dec 2006 08:34:40 +0000 (00:34 -0800)]
[PATCH] lockdep: improve lockdep_reset()

Clear all the chains during lockdep_reset().  This fixes some locking-selftest
false positives i saw on -rt.  (never saw those on mainline though, but it
could happen.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] lockdep: improve verbose messages
Ingo Molnar [Wed, 13 Dec 2006 08:34:40 +0000 (00:34 -0800)]
[PATCH] lockdep: improve verbose messages

Make verbose lockdep messages (off by default) more informative by printing
out the hash chain key.  (this patch was what helped me catch the earlier
lockdep hash-collision bug)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] lockdep: filter off by default
Ingo Molnar [Wed, 13 Dec 2006 08:34:39 +0000 (00:34 -0800)]
[PATCH] lockdep: filter off by default

Fix typo in the class_filter() function.  (filtering is not used by default so
this only affects lockdep-internal debugging cases)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] debug: add sysrq_always_enabled boot option
Ingo Molnar [Wed, 13 Dec 2006 08:34:36 +0000 (00:34 -0800)]
[PATCH] debug: add sysrq_always_enabled boot option

Most distributions enable sysrq support but set it to 0 by default.  Add a
sysrq_always_enabled boot option to always-enable sysrq keys.  Useful for
debugging - without having to modify the disribution's config files (which
might not be possible if the kernel is on a live CD, etc.).

Also, while at it, clean up the sysrq interfaces.

[bunk@stusta.de: make sysrq_always_enabled_setup() static]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] optimize o_direct on block devices
Chen, Kenneth W [Wed, 13 Dec 2006 08:34:36 +0000 (00:34 -0800)]
[PATCH] optimize o_direct on block devices

Implement block device specific .direct_IO method instead of going through
generic direct_io_worker for block device.

direct_io_worker() is fairly complex because it needs to handle O_DIRECT on
file system, where it needs to perform block allocation, hole detection,
extents file on write, and tons of other corner cases.  The end result is
that it takes tons of CPU time to submit an I/O.

For block device, the block allocation is much simpler and a tight triple
loop can be written to iterate each iovec and each page within the iovec in
order to construct/prepare bio structure and then subsequently submit it to
the block layer.  This significantly speeds up O_D on block device.

[akpm@osdl.org: small speedup]
Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Zach Brown <zach.brown@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] ocfs2: relative atime support
Mark Fasheh [Wed, 13 Dec 2006 08:34:35 +0000 (00:34 -0800)]
[PATCH] ocfs2: relative atime support

Update ocfs2_should_update_atime() to understand the MNT_RELATIME flag and
to test against mtime / ctime accordingly.

[akpm@osdl.org: cleanups]
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Cc: Valerie Henson <val_henson@linux.intel.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] relative atime
Valerie Henson [Wed, 13 Dec 2006 08:34:34 +0000 (00:34 -0800)]
[PATCH] relative atime

Add "relatime" (relative atime) support.  Relative atime only updates the
atime if the previous atime is older than the mtime or ctime.  Like
noatime, but useful for applications like mutt that need to know when a
file has been read since it was last modified.

A corresponding patch against mount(8) is available at
http://userweb.kernel.org/~akpm/mount-relative-atime.txt

Signed-off-by: Valerie Henson <val_henson@linux.intel.com>
Cc: Mark Fasheh <mark.fasheh@oracle.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Karel Zak <kzak@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] touch_atime() cleanup
Andrew Morton [Wed, 13 Dec 2006 08:34:33 +0000 (00:34 -0800)]
[PATCH] touch_atime() cleanup

Simplify touch_atime() layout.

Cc: Valerie Henson <val_henson@linux.intel.com>
Cc: Mark Fasheh <mark.fasheh@oracle.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Xtensa: Add ktermios and minor filename fix
Chris Zankel [Wed, 13 Dec 2006 08:34:32 +0000 (00:34 -0800)]
[PATCH] Xtensa: Add ktermios and minor filename fix

The kernel termios (ktermios) changes were somehow missed for Xtensa.  This
patch adds the ktermios structure and also includes some minor file name
fix that was missed in the syscall patch.

Signed-off-by: Chris Zankel <chris@zankel.net>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] PM: Fix SMP races in the freezer
Rafael J. Wysocki [Wed, 13 Dec 2006 08:34:30 +0000 (00:34 -0800)]
[PATCH] PM: Fix SMP races in the freezer

Currently, to tell a task that it should go to the refrigerator, we set the
PF_FREEZE flag for it and send a fake signal to it.  Unfortunately there
are two SMP-related problems with this approach.  First, a task running on
another CPU may be updating its flags while the freezer attempts to set
PF_FREEZE for it and this may leave the task's flags in an inconsistent
state.  Second, there is a potential race between freeze_process() and
refrigerator() in which freeze_process() running on one CPU is reading a
task's PF_FREEZE flag while refrigerator() running on another CPU has just
set PF_FROZEN for the same task and attempts to reset PF_FREEZE for it.  If
the refrigerator wins the race, freeze_process() will state that PF_FREEZE
hasn't been set for the task and will set it unnecessarily, so the task
will go to the refrigerator once again after it's been thawed.

To solve first of these problems we need to stop using PF_FREEZE to tell
tasks that they should go to the refrigerator.  Instead, we can introduce a
special TIF_*** flag and use it for this purpose, since it is allowed to
change the other tasks' TIF_*** flags and there are special calls for it.

To avoid the freeze_process()-refrigerator() race we can make
freeze_process() to always check the task's PF_FROZEN flag after it's read
its "freeze" flag.  We should also make sure that refrigerator() will
always reset the task's "freeze" flag after it's set PF_FROZEN for it.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: David Howells <dhowells@redhat.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] PM: Fix freezing of stopped tasks
Rafael J. Wysocki [Wed, 13 Dec 2006 08:34:28 +0000 (00:34 -0800)]
[PATCH] PM: Fix freezing of stopped tasks

Currently, if a task is stopped (ie.  it's in the TASK_STOPPED state), it
is considered by the freezer as unfreezeable.  However, there may be a race
between the freezer and the delivery of the continuation signal to the task
resulting in the task running after we have finished freezing the other
tasks.  This, in turn, may lead to undesirable effects up to and including
data corruption.

To prevent this from happening we first need to make the freezer consider
stopped tasks as freezeable.  For this purpose we need to make freezeable()
stop returning 0 for these tasks and we need to force them to enter the
refrigerator.  However, if there's no continuation signal in the meantime,
the stopped tasks should remain stopped after all processes have been
thawed, so we need to send an additional SIGSTOP to each of them before
waking it up.

Also, a stopped task that has just been woken up should first check if
there's a freezing request for it and go to the refrigerator if that's the
case.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] SLAB: use a multiply instead of a divide in obj_to_index()
Eric Dumazet [Wed, 13 Dec 2006 08:34:27 +0000 (00:34 -0800)]
[PATCH] SLAB: use a multiply instead of a divide in obj_to_index()

When some objects are allocated by one CPU but freed by another CPU we can
consume lot of cycles doing divides in obj_to_index().

(Typical load on a dual processor machine where network interrupts are
handled by one particular CPU (allocating skbufs), and the other CPU is
running the application (consuming and freeing skbufs))

Here on one production server (dual-core AMD Opteron 285), I noticed this
divide took 1.20 % of CPU_CLK_UNHALTED events in kernel.  But Opteron are
quite modern cpus and the divide is much more expensive on oldest
architectures :

On a 200 MHz sparcv9 machine, the division takes 64 cycles instead of 1
cycle for a multiply.

Doing some math, we can use a reciprocal multiplication instead of a divide.

If we want to compute V = (A / B)  (A and B being u32 quantities)
we can instead use :

V = ((u64)A * RECIPROCAL(B)) >> 32 ;

where RECIPROCAL(B) is precalculated to ((1LL << 32) + (B - 1)) / B

Note :

I wrote pure C code for clarity. gcc output for i386 is not optimal but
acceptable :

mull   0x14(%ebx)
mov    %edx,%eax // part of the >> 32
xor     %edx,%edx // useless
mov    %eax,(%esp) // could be avoided
mov    %edx,0x4(%esp) // useless
mov    (%esp),%ebx

[akpm@osdl.org: small cleanups]
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] cpuset: rework cpuset_zone_allowed api
Paul Jackson [Wed, 13 Dec 2006 08:34:25 +0000 (00:34 -0800)]
[PATCH] cpuset: rework cpuset_zone_allowed api

Elaborate the API for calling cpuset_zone_allowed(), so that users have to
explicitly choose between the two variants:

  cpuset_zone_allowed_hardwall()
  cpuset_zone_allowed_softwall()

Until now, whether or not you got the hardwall flavor depended solely on
whether or not you or'd in the __GFP_HARDWALL gfp flag to the gfp_mask
argument.

If you didn't specify __GFP_HARDWALL, you implicitly got the softwall
version.

Unfortunately, this meant that users would end up with the softwall version
without thinking about it.  Since only the softwall version might sleep,
this led to bugs with possible sleeping in interrupt context on more than
one occassion.

The hardwall version requires that the current tasks mems_allowed allows
the node of the specified zone (or that you're in interrupt or that
__GFP_THISNODE is set or that you're on a one cpuset system.)

The softwall version, depending on the gfp_mask, might allow a node if it
was allowed in the nearest enclusing cpuset marked mem_exclusive (which
requires taking the cpuset lock 'callback_mutex' to evaluate.)

This patch removes the cpuset_zone_allowed() call, and forces the caller to
explicitly choose between the hardwall and the softwall case.

If the caller wants the gfp_mask to determine this choice, they should (1)
be sure they can sleep or that __GFP_HARDWALL is set, and (2) invoke the
cpuset_zone_allowed_softwall() routine.

This adds another 100 or 200 bytes to the kernel text space, due to the few
lines of nearly duplicate code at the top of both cpuset_zone_allowed_*
routines.  It should save a few instructions executed for the calls that
turned into calls of cpuset_zone_allowed_hardwall, thanks to not having to
set (before the call) then check (within the call) the __GFP_HARDWALL flag.

For the most critical call, from get_page_from_freelist(), the same
instructions are executed as before -- the old cpuset_zone_allowed()
routine it used to call is the same code as the
cpuset_zone_allowed_softwall() routine that it calls now.

Not a perfect win, but seems worth it, to reduce this chance of hitting a
sleeping with irq off complaint again.

Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] More slab.h cleanups
Christoph Lameter [Wed, 13 Dec 2006 08:34:24 +0000 (00:34 -0800)]
[PATCH] More slab.h cleanups

More cleanups for slab.h

1. Remove tabs from weird locations as suggested by Pekka

2. Drop the check for NUMA and SLAB_DEBUG from the fallback section
   as suggested by Pekka.

3. Uses static inline for the fallback defs as also suggested by Pekka.

4. Make kmem_ptr_valid take a const * argument.

5. Separate the NUMA fallback definitions from the kmalloc_track fallback
   definitions.

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>
17 years ago[PATCH] Cleanup slab headers / API to allow easy addition of new slab allocators
Christoph Lameter [Wed, 13 Dec 2006 08:34:23 +0000 (00:34 -0800)]
[PATCH] Cleanup slab headers / API to allow easy addition of new slab allocators

This is a response to an earlier discussion on linux-mm about splitting
slab.h components per allocator.  Patch is against 2.6.19-git11.  See
http://marc.theaimsgroup.com/?l=linux-mm&m=116469577431008&w=2

This patch cleans up the slab header definitions.  We define the common
functions of slob and slab in slab.h and put the extra definitions needed
for slab's kmalloc implementations in <linux/slab_def.h>.  In order to get
a greater set of common functions we add several empty functions to slob.c
and also rename slob's kmalloc to __kmalloc.

Slob does not need any special definitions since we introduce a fallback
case.  If there is no need for a slab implementation to provide its own
kmalloc mess^H^H^Hacros then we simply fall back to __kmalloc functions.
That is sufficient for SLOB.

Sort the function in slab.h according to their functionality.  First the
functions operating on struct kmem_cache * then the kmalloc related
functions followed by special debug and fallback definitions.

Also redo a lot of comments.

Signed-off-by: Christoph Lameter <clameter@sgi.com>?
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] cciss: remove calls to pci_disable_device
Mike Miller [Wed, 13 Dec 2006 08:34:22 +0000 (00:34 -0800)]
[PATCH] cciss: remove calls to pci_disable_device

Remove calls to pci_disable_device except in fail_all_cmds.  The
pci_disable_device function does something nasty to Smart Array controllers
that pci_enable_device does not undo.  So if the driver is unloaded it
cannot be reloaded.

Also, customers can disable any pci device via the ROM Based Setup Utility
(RBSU).  If the customer has disabled the controller we should not try to
blindly enable the card from the driver.  Please consider this for
inclusion.

Signed-off-by: Mike Miller <mike.miller@hp.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] cciss: map out more memory for config table
Mike Miller [Wed, 13 Dec 2006 08:34:21 +0000 (00:34 -0800)]
[PATCH] cciss: map out more memory for config table

Map out more memory for our config table.  It's required to reach offset
0x214 to disable DMA on the P600.  I'm not sure how I lost this hunk.
Please consider this for inclusion.

Signed-off-by: Mike Miller <mike.miller@hp.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] sx: fix non-PCI build
Jiri Slaby [Wed, 13 Dec 2006 08:34:20 +0000 (00:34 -0800)]
[PATCH] sx: fix non-PCI build

When CONFIG_PCI is not defined (i.e.  PCI bus is disabled), the sx driver
fails to link, since some pci functions are not available.  Fix this
behaviour to be able to compile this driver on machines with no PCI bus
(but with ISA bus support).

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] mxser_new: fix non-PCI build
Jiri Slaby [Wed, 13 Dec 2006 08:34:19 +0000 (00:34 -0800)]
[PATCH] mxser_new: fix non-PCI build

When CONFIG_PCI is not defined (i.e.  PCI bus is disabled), the mxser_new
driver fails to link, since some pci functions are not available.  Fix this
behaviour to be able to compile this driver on machines with no PCI bus
(but with ISA bus support).

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] isicom: fix build with PCI disabled
Randy Dunlap [Wed, 13 Dec 2006 08:34:18 +0000 (00:34 -0800)]
[PATCH] isicom: fix build with PCI disabled

With CONFIG_PCI=n:
drivers/char/isicom.c: In function 'isicom_probe':
drivers/char/isicom.c:1793: warning: implicit declaration of function
'pci_request_region'
drivers/char/isicom.c:1827: warning: implicit declaration of function
'pci_release_region'

Let's CONFIG_ISI depend on CONFIG_PCI.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] w1: Fix for kconfig entry typo
Evgeniy Polyakov [Wed, 13 Dec 2006 08:34:16 +0000 (00:34 -0800)]
[PATCH] w1: Fix for kconfig entry typo

Based on patch from Alexander Rigbo <alexander.rigbo@acgnystrom.se>

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] KVM: Fix vmx hardware_enable() on macbooks
Avi Kivity [Wed, 13 Dec 2006 08:34:16 +0000 (00:34 -0800)]
[PATCH] KVM: Fix vmx hardware_enable() on macbooks

It seems macbooks set bit 2 but not bit 0, which is an "enabled but vmxon will
fault" setting.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Tested-by: Alex Larsson (sometimes testing helps)
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] KVM: Don't touch the virtual apic vt registers on 32-bit
Michael Riepe [Wed, 13 Dec 2006 08:34:15 +0000 (00:34 -0800)]
[PATCH] KVM: Don't touch the virtual apic vt registers on 32-bit

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] KVM: Disallow the kvm-amd module on intel hardware, and vice versa
Avi Kivity [Wed, 13 Dec 2006 08:34:14 +0000 (00:34 -0800)]
[PATCH] KVM: Disallow the kvm-amd module on intel hardware, and vice versa

They're not on speaking terms.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] md: Don't assume that READ==0 and WRITE==1 - use the names explicitly
NeilBrown [Wed, 13 Dec 2006 08:34:13 +0000 (00:34 -0800)]
[PATCH] md: Don't assume that READ==0 and WRITE==1 - use the names explicitly

Thanks Jens for alerting me to this.

Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: <raziebe@gmail.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Fix crossbuilding checkstack
Jeff Dike [Wed, 13 Dec 2006 08:34:12 +0000 (00:34 -0800)]
[PATCH] Fix crossbuilding checkstack

The previous checkstack fix for UML, which needs to use the host's tools,
was wrong in the crossbuilding case.  It would use the build host's, rather
than the target's, toolchain.

This patch removes the old fix and adds an explicit special case for UML,
leaving everyone else alone.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] slab: fix sleeping in atomic bug
Christoph Lameter [Wed, 13 Dec 2006 08:34:11 +0000 (00:34 -0800)]
[PATCH] slab: fix sleeping in atomic bug

Fallback_alloc() does not do the check for GFP_WAIT as done in
cache_grow().  Thus interrupts are disabled when we call kmem_getpages()
which results in the failure.

Duplicate the handling of GFP_WAIT in cache_grow().

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Jay Cliburn <jacliburn@bellsouth.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] reorder struct pipe_buf_operations
Eric Dumazet [Wed, 13 Dec 2006 08:34:10 +0000 (00:34 -0800)]
[PATCH] reorder struct pipe_buf_operations

Fields of struct pipe_buf_operations have not a precise layout (ie not
optimized to fit cache lines nor reduce cache line ping pongs)

The bufs[] array is *large* and is placed near the beginning of the
structure, so all following fields have a large offset.  This is
unfortunate because many archs have smaller instructions when using small
offsets relative to a base register.  On x86 for example, 7 bits offsets
have smaller instruction lengths.

Moving bufs[] at the end of pipe_buf_operations permits all fields to have
small offsets, and reduce text size, and icache pressure.

# size vmlinux.pre vmlinux
    text    data     bss     dec     hex filename
3268989  664356  492196 4425541  438745 vmlinux.pre
3268765  664356  492196 4425317  438665 vmlinux

So this patch reduces text size by 224 bytes on my x86_64 machine. Similar
results on ia32.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] kconfig: set gconf's save-widget's sensitivity according to .config's changed...
Karsten Wiese [Wed, 13 Dec 2006 08:34:09 +0000 (00:34 -0800)]
[PATCH] kconfig: set gconf's save-widget's sensitivity according to .config's changed state

Clean up a little.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] kconfig: add "void conf_set_changed_callback(void (*fn)(void))", use it in...
Karsten Wiese [Wed, 13 Dec 2006 08:34:08 +0000 (00:34 -0800)]
[PATCH] kconfig: add "void conf_set_changed_callback(void (*fn)(void))", use it in qconf.cc

Added function sets "void (*conf_changed_callback)(void)".  Call it, if
.config's changed state changes.  Use above in qconf.cc to set gui's
save-widget's sensitvity.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] kconfig: make sym_change_count static, let it be altered by 2 functions only
Karsten Wiese [Wed, 13 Dec 2006 08:34:07 +0000 (00:34 -0800)]
[PATCH] kconfig: make sym_change_count static, let it be altered by 2 functions only

Those two functions are
void sym_set_change_count(int count)
and
void sym_add_change_count(int count)

All write accesses to sym_change_count are replaced by calls to above
functions.

Variable and changer-functions are moved to confdata.c.  IMO thats ok, as
sym_change_count is an attribute of the .config's change state.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] kconfig: new function "bool conf_get_changed(void)"
Karsten Wiese [Wed, 13 Dec 2006 08:34:06 +0000 (00:34 -0800)]
[PATCH] kconfig: new function "bool conf_get_changed(void)"

Run "make xconfig" on a freshly untarred kernel-tree.  Look at the floppy disk
icon of the qt application, that has just started: Its in a normal, active
state.

Mouse click on it: .config is being saved.

This patch series changes things so taht
after the mouse click on the floppy disk icon, the icon is greyed out.
If you mouse click on it now, nothing happens.

If you change some CONFIG_*, the floppy disk icon returns to "active state",
that is, if you mouse click it now, .config is written.

This patch:

Returns sym_change_count to reflect the .config's change state.
All read only accesses of
sym_change_count
are replaced by calls to
conf_get_changed()
.
mconfig.c is manipulated to ask for saving only when
conf_get_changed() returned true.

Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] vt: fix comments to not refer to kill_proc
Eric W. Biederman [Wed, 13 Dec 2006 08:34:05 +0000 (00:34 -0800)]
[PATCH] vt: fix comments to not refer to kill_proc

The code has been fixed to use kill_pid instead of kill_proc fix the
comments as well.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Revert "[PATCH] identifier to nsproxy"
Eric W. Biederman [Wed, 13 Dec 2006 08:34:04 +0000 (00:34 -0800)]
[PATCH] Revert "[PATCH] identifier to nsproxy"

This reverts commit 373beb35cd6b625e0ba4ad98baace12310a26aa8.

No one is using this identifier yet.  The purpose of this identifier is to
export nsproxy to user space which is wrong.  nsproxy is an internal
implementation optimization, which should keep our fork times from getting
slower as we increase the number of global namespaces you don't have to
share.

Adding a global identifier like this is inappropriate because it makes
namespaces inherently non-recursive, greatly limiting what we can do with
them in the future.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] constify pipe_buf_operations
Eric Dumazet [Wed, 13 Dec 2006 08:34:04 +0000 (00:34 -0800)]
[PATCH] constify pipe_buf_operations

- pipe/splice should use const pipe_buf_operations and file_operations

- struct pipe_inode_info has an unused field "start" : get rid of it.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] KVM: Add MAINTAINERS entry
Avi Kivity [Wed, 13 Dec 2006 08:34:03 +0000 (00:34 -0800)]
[PATCH] KVM: Add MAINTAINERS entry

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] KVM: MMU: Ignore pcd, pwt, and pat bits on ptes
Avi Kivity [Wed, 13 Dec 2006 08:34:02 +0000 (00:34 -0800)]
[PATCH] KVM: MMU: Ignore pcd, pwt, and pat bits on ptes

The pcd, pwt, and pat bits on page table entries affect the cpu cache.  Since
the cache is a host resource, the guest should not be able to control it.
Moreover, the meaning of these bits changes depending on whether pat is
enabled or not.

So, force these bits to zero on shadow page table entries at all times.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] KVM: Remove extranous put_cpu() from vcpu_put()
Avi Kivity [Wed, 13 Dec 2006 08:34:01 +0000 (00:34 -0800)]
[PATCH] KVM: Remove extranous put_cpu() from vcpu_put()

The arch splitting patchset left an extra put_cpu() in core code, where it can
cause trouble for CONFIG_PREEMPT kernels.

Reported-by: Huihong Luo <huisinro@yahoo.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] KVM: Move find_vmx_entry() to vmx.c
Avi Kivity [Wed, 13 Dec 2006 08:34:01 +0000 (00:34 -0800)]
[PATCH] KVM: Move find_vmx_entry() to vmx.c

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] KVM: Make the GET_SREGS and SET_SREGS ioctls symmetric
Uri Lublin [Wed, 13 Dec 2006 08:34:00 +0000 (00:34 -0800)]
[PATCH] KVM: Make the GET_SREGS and SET_SREGS ioctls symmetric

This makes the SET_SREGS ioctl behave symmetrically to the GET_SREGS ioctl wrt
the segment access rights flag.

Signed-off-by: Uri Lublin <uril@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] Fix section mismatch in parainstructions
Randy Dunlap [Wed, 13 Dec 2006 08:33:57 +0000 (00:33 -0800)]
[PATCH] Fix section mismatch in parainstructions

Section .parainstructions should not warn about section mismatches.

WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x0)
WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x8)

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Andi Kleen <ak@suse.de>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] i2o_exec_exit and i2o_driver_exit should not be __exit.
Ralf Baechle [Wed, 13 Dec 2006 08:33:53 +0000 (00:33 -0800)]
[PATCH] i2o_exec_exit and i2o_driver_exit should not be __exit.

i2o_exec_exit and i2o_driver_exit were marked as __exit which is a bug
because both are invoked from __init and __exit functions.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] isdn/gigaset: fix possible missing wakeup
Tilman Schmidt [Wed, 13 Dec 2006 08:33:52 +0000 (00:33 -0800)]
[PATCH] isdn/gigaset: fix possible missing wakeup

Eliminate some possibilities for user processes writing to the Gigaset
character device to be left sleeping indefinitely, by adding wakeup calls
to error paths and properly disposing of pending write requests when the
device is disconnected.

It also removes unnecessary NULL checks before usb_free_urb() and
usb_kill_urb() calls.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] uml: fix net_kern workqueue abuse
Peter Zijlstra [Wed, 13 Dec 2006 08:33:50 +0000 (00:33 -0800)]
[PATCH] uml: fix net_kern workqueue abuse

Fix up the work on stack and exit scope trouble by placing the work_struct
in the uml_net_private data.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] another build fix, header rearrangements (OSK)
David Brownell [Wed, 13 Dec 2006 08:33:49 +0000 (00:33 -0800)]
[PATCH] another build fix, header rearrangements (OSK)

Some of the header file rearrangements broke the build for board-osk.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: <tony@atomide.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] fix more workqueue build breakage (tps65010)
David Brownell [Wed, 13 Dec 2006 08:33:46 +0000 (00:33 -0800)]
[PATCH] fix more workqueue build breakage (tps65010)

More fixes to build breakage from the work_struct changes ...  this updates
the tps65010 driver.  Plus, fix some dependencies related to the way it's
used on the OMAP OSK: force static linking there, since the resulting
kernel can't link.

NOTE that until the i2c core gets fixed to work without SMBUS_QUICK,
kernels needing this driver must still use "tps65010.force=0,0x48" on the
command line.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] KVM: Replace __x86_64__ with CONFIG_X86_64
Avi Kivity [Wed, 13 Dec 2006 08:33:45 +0000 (00:33 -0800)]
[PATCH] KVM: Replace __x86_64__ with CONFIG_X86_64

As per akpm's request.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] KVM: Clean up AMD SVM debug registers load and unload
Avi Kivity [Wed, 13 Dec 2006 08:33:45 +0000 (00:33 -0800)]
[PATCH] KVM: Clean up AMD SVM debug registers load and unload

By letting gcc choose the temporary register for us, we lose arch dependency
and some ugliness.  Conceivably gcc will also generate marginally better code.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] KVM: Put KVM in a new Virtualization menu
Avi Kivity [Wed, 13 Dec 2006 08:33:44 +0000 (00:33 -0800)]
[PATCH] KVM: Put KVM in a new Virtualization menu

Instead of in the main drivers menu.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] KVM: Add missing include
Anthony Liguori [Wed, 13 Dec 2006 08:33:43 +0000 (00:33 -0800)]
[PATCH] KVM: Add missing include

load_TR_desc() lives in asm/desc.h, so #include that file.

Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] tty: export get_current_tty
Heiko Carstens [Wed, 13 Dec 2006 08:33:41 +0000 (00:33 -0800)]
[PATCH] tty: export get_current_tty

24ec839c431eb79bb8f6abc00c4e1eb3b8c4d517 causes this:

WARNING: "get_current_tty" [drivers/s390/char/fs3270.ko] undefined!

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[PATCH] arch/i386/kernel/smpboot.c: remove unneeded ifdef
Andrew Morton [Wed, 13 Dec 2006 08:33:40 +0000 (00:33 -0800)]
[PATCH] arch/i386/kernel/smpboot.c: remove unneeded ifdef

#ifdef CONFIG_SMP in a file which isn't compiled in non-SMP kernels.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
17 years ago[CPUFREQ] fixes typo in cpufreq.c
Dhaval Giani [Wed, 13 Dec 2006 09:19:15 +0000 (14:49 +0530)]
[CPUFREQ] fixes typo in cpufreq.c

This patch fixes a typo in cpufreq.c

From: Dhaval Giani <dhaval.giani@gmail.com>
Signed-off-by: Dave Jones <davej@redhat.com>
17 years ago[ARM] Remove empty fixup function
Russell King [Wed, 13 Dec 2006 14:48:36 +0000 (14:48 +0000)]
[ARM] Remove empty fixup function

Empty fixup functions are just a waste of code, and are not
necessary.  Remote them.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[PATCH] Fixup cciss error handling
Jens Axboe [Wed, 13 Dec 2006 14:44:27 +0000 (15:44 +0100)]
[PATCH] Fixup cciss error handling

The previous cciss commit removed the err_out_disable_pdev label, but
there was still a user of that. Fix that up.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
17 years ago[ARM] 4014/1: include drivers/hid/Kconfig
Sascha Hauer [Tue, 12 Dec 2006 09:32:42 +0000 (10:32 +0100)]
[ARM] 4014/1: include drivers/hid/Kconfig

HID drivers are in their own directory now, so we have to
include the Kconfig file for arm.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4013/1: clocksource driver for netx
Sascha Hauer [Tue, 12 Dec 2006 08:23:45 +0000 (09:23 +0100)]
[ARM] 4013/1: clocksource driver for netx

Add a clocksource driver for netx systems

Signed-off-by: Luotao Fu <lfu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
17 years ago[ARM] 4012/1: Clocksource for pxa
Sascha Hauer [Tue, 12 Dec 2006 08:21:50 +0000 (09:21 +0100)]
[ARM] 4012/1: Clocksource for pxa

Add a clocksource driver for pxa2xx systems

Signed-off-by: Luotao Fu <lfu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>