safe/jmp/linux-2.6
15 years ago[PATCH] reduce the stack footprint of exportfs_decode_fh()
Al Viro [Mon, 11 Aug 2008 16:39:47 +0000 (12:39 -0400)]
[PATCH] reduce the stack footprint of exportfs_decode_fh()

no need to have _two_ 256-byte arrays on stack...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] kill d_alloc_anon
Christoph Hellwig [Mon, 11 Aug 2008 13:49:12 +0000 (15:49 +0200)]
[PATCH] kill d_alloc_anon

Remove d_alloc_anon now that no users are left.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] switch all filesystems over to d_obtain_alias
Christoph Hellwig [Mon, 11 Aug 2008 13:49:04 +0000 (15:49 +0200)]
[PATCH] switch all filesystems over to d_obtain_alias

Switch all users of d_alloc_anon to d_obtain_alias.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] new helper: d_obtain_alias
Christoph Hellwig [Mon, 11 Aug 2008 13:48:57 +0000 (15:48 +0200)]
[PATCH] new helper: d_obtain_alias

The calling conventions of d_alloc_anon are rather unfortunate for all
users, and it's name is not very descriptive either.

Add d_obtain_alias as a new exported helper that drops the inode
reference in the failure case, too and allows to pass-through NULL
pointers and inodes to allow for tail-calls in the export operations.

Incidentally this helper already existed as a private function in
libfs.c as exportfs_d_alloc so kill that one and switch the callers
to d_obtain_alias.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] generic_file_llseek tidyups
Christoph Hellwig [Mon, 11 Aug 2008 13:37:17 +0000 (15:37 +0200)]
[PATCH] generic_file_llseek tidyups

Add kerneldoc for generic_file_llseek and generic_file_llseek_unlocked,
use sane variable names and unclutter the code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] tidy up chrdev_open
Christoph Hellwig [Mon, 11 Aug 2008 13:34:22 +0000 (15:34 +0200)]
[PATCH] tidy up chrdev_open

Use a single goto label for chrdev_put + return error cases.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] hpfs: cleanup ->setattr
Christoph Hellwig [Sun, 10 Aug 2008 22:27:59 +0000 (00:27 +0200)]
[PATCH] hpfs: cleanup ->setattr

Reformat hpfs_notify_change to standard kernel style to make it readable
and rename it to hpfs_setattr as that's what the method is called.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] dm: kill lookup_device wrapper
Christoph Hellwig [Sun, 10 Aug 2008 22:24:08 +0000 (00:24 +0200)]
[PATCH] dm: kill lookup_device wrapper

Now that lookup_bdev is exported and used by dm just use it directly
instead of through a trivial wrapper.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] make O_EXCL in nd->intent.flags visible in nd->flags
Al Viro [Tue, 5 Aug 2008 07:00:49 +0000 (03:00 -0400)]
[PATCH] make O_EXCL in nd->intent.flags visible in nd->flags

New flag: LOOKUP_EXCL.  Set before doing the final step of pathname
resolution on the paths that have LOOKUP_CREATE and O_EXCL.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] don't pass bogus flags to LOOKUP_PARENT lookup in spufs
Al Viro [Sun, 3 Aug 2008 02:40:42 +0000 (22:40 -0400)]
[PATCH] don't pass bogus flags to LOOKUP_PARENT lookup in spufs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] get rid of path_lookup_create()
Al Viro [Sun, 3 Aug 2008 02:36:57 +0000 (22:36 -0400)]
[PATCH] get rid of path_lookup_create()

... and don't pass bogus flags when we are just looking for parent.
Fold __path_lookup_intent_open() into path_lookup_open() while we
are at it; that's the only remaining caller.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] get rid of nameidata in audit_tree
Al Viro [Sat, 2 Aug 2008 05:06:21 +0000 (01:06 -0400)]
[PATCH] get rid of nameidata in audit_tree

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] assorted path_lookup() -> kern_path() conversions
Al Viro [Sat, 2 Aug 2008 05:04:36 +0000 (01:04 -0400)]
[PATCH] assorted path_lookup() -> kern_path() conversions

more nameidata eviction

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] switch nfsd to kern_path()
Al Viro [Sat, 2 Aug 2008 05:03:36 +0000 (01:03 -0400)]
[PATCH] switch nfsd to kern_path()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] sanitize svc_export_parse()
Al Viro [Sat, 2 Aug 2008 05:01:02 +0000 (01:01 -0400)]
[PATCH] sanitize svc_export_parse()

clean up the exit paths, get rid of nameidata

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] switch quota_on-related stuff to kern_path()
Al Viro [Sat, 2 Aug 2008 04:57:06 +0000 (00:57 -0400)]
[PATCH] switch quota_on-related stuff to kern_path()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agonet: Fix disjunct computation of netdev features
Herbert Xu [Thu, 23 Oct 2008 08:11:29 +0000 (01:11 -0700)]
net: Fix disjunct computation of netdev features

My change

    commit e2a6b85247aacc52d6ba0d9b37a99b8d1a3e0d83
    net: Enable TSO if supported by at least one device

didn't do what was intended because the netdev_compute_features
function was designed for conjunctions.  So what happened was that
it would simply take the TSO status of the last constituent device.

This patch extends it to support both conjunctions and disjunctions
under the new name of netdev_increment_features.

It also adds a new function netdev_fix_features which does the
sanity checking that usually occurs upon registration.  This ensures
that the computation doesn't result in an illegal combination
since this checking is absent when the change is initiated via
ethtool.

The two users of netdev_compute_features have been converted.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosctp: Fix to handle SHUTDOWN in SHUTDOWN_RECEIVED state
Wei Yongjun [Thu, 23 Oct 2008 08:01:18 +0000 (01:01 -0700)]
sctp: Fix to handle SHUTDOWN in SHUTDOWN_RECEIVED state

Once an endpoint has reached the SHUTDOWN-RECEIVED state,
it MUST NOT send a SHUTDOWN in response to a ULP request.
The Cumulative TSN Ack of the received SHUTDOWN chunk
MUST be processed.

This patch fix to process Cumulative TSN Ack of the received
SHUTDOWN chunk in SHUTDOWN_RECEIVED state.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosctp: Fix to handle SHUTDOWN in SHUTDOWN-PENDING state
Wei Yongjun [Thu, 23 Oct 2008 08:00:49 +0000 (01:00 -0700)]
sctp: Fix to handle SHUTDOWN in SHUTDOWN-PENDING state

If SHUTDOWN is received in SHUTDOWN-PENDING state, enpoint should enter
the SHUTDOWN-RECEIVED state and check the Cumulative TSN Ack field of
the SHUTDOWN chunk (RFC 4960 Section 9.2). If the SHUTDOWN chunk can
acknowledge all of the send DATA chunks, SHUTDOWN-ACK should be sent.

But now endpoint just silently discarded the SHUTDOWN chunk.

SHUTDOWN received in SHUTDOWN-PENDING state can happend when the last
SACK is lost by network, or the SHUTDOWN chunk can acknowledge all of
the received DATA chunks. The packet sequence(SACK lost) is like this:

Endpoint A                       Endpoint B       ULP
(ESTABLISHED)                    (ESTABLISHED)

               <-----------      DATA
                                             <--- shutdown
                                 Enter SHUTDOWN-PENDING state
  SACK         ----lost---->

  SHUTDOWN(*1) ------------>

               <-----------      SHUTDOWN-ACK

 (*1) silently discarded now.

This patch fix to handle SHUTDOWN in SHUTDOWN-PENDING state as the same
as ESTABLISHED state.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agodock: make dock driver not a module
Shaohua Li [Sat, 27 Sep 2008 03:10:28 +0000 (11:10 +0800)]
dock: make dock driver not a module

To avoid dock driver is loaded after other drivers like libata, let's
make dock driver not a module.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agosctp: Add check for the TSN field of the SHUTDOWN chunk
Wei Yongjun [Thu, 23 Oct 2008 08:00:21 +0000 (01:00 -0700)]
sctp: Add check for the TSN field of the SHUTDOWN chunk

If SHUTDOWN chunk is received Cumulative TSN Ack beyond the max tsn currently
send, SHUTDOWN chunk be accepted and the association will be broken. New data
is send, but after received SACK it will be drop because TSN in SACK is less
than the Cumulative TSN, data will be retrans again and again even if correct
SACK is received.

The packet sequence is like this:

Endpoint A                       Endpoint B       ULP
(ESTABLISHED)                    (ESTABLISHED)

               <-----------      DATA (TSN=x-1)

               <-----------      DATA (TSN=x)

  SHUTDOWN     ----------->      (Now Cumulative TSN=x+1000)
  (TSN=x+1000)
               <-----------      DATA (TSN=x+1)

  SACK         ----------->      drop the SACK
  (TSN=x+1)
               <-----------      DATA (TSN=x+1)(retrans)

This patch fix this problem by terminating the association and respond to
the sender with an ABORT.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosctp: Drop ICMP packet too big message with MTU larger than current PMTU
Wei Yongjun [Thu, 23 Oct 2008 07:59:52 +0000 (00:59 -0700)]
sctp: Drop ICMP packet too big message with MTU larger than current PMTU

If ICMP packet too big message is received with MTU larger than current
PMTU, SCTP will still accept this ICMP message and sync the PMTU of assoc
with the wrong MTU.

Endpoing A                 Endpoint B
(ESTABLISHED)              (ESTABLISHED)
ICMP         --------->
(packet too big, MTU too larger)
                           sync PMTU

This patch fixed the problem by drop that ICMP message.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Thu, 23 Oct 2008 07:44:04 +0000 (00:44 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

15 years ago[PATCH] no need for noinline stuff in fs/namespace.c anymore
Al Viro [Sat, 2 Aug 2008 04:55:27 +0000 (00:55 -0400)]
[PATCH] no need for noinline stuff in fs/namespace.c anymore

Stack footprint from hell had been due to many struct nameidata in there.
No more.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] finally get rid of nameidata in namespace.c
Al Viro [Sat, 2 Aug 2008 04:51:11 +0000 (00:51 -0400)]
[PATCH] finally get rid of nameidata in namespace.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] new helper - kern_path()
Al Viro [Sat, 2 Aug 2008 04:49:18 +0000 (00:49 -0400)]
[PATCH] new helper - kern_path()

Analog of lookup_path(), takes struct path *.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agox86: canonicalize remaining header guards
H. Peter Anvin [Thu, 23 Oct 2008 07:20:33 +0000 (00:20 -0700)]
x86: canonicalize remaining header guards

Canonicalize a few remaining header guards, with the exception for
those which are still in subarchitecture directories.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86: drop double underscores from header guards
H. Peter Anvin [Thu, 23 Oct 2008 07:01:39 +0000 (00:01 -0700)]
x86: drop double underscores from header guards

Drop double underscores from header guards in arch/x86/include.  They
are used inconsistently, and are not necessary.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86: Fix ASM_X86__ header guards
H. Peter Anvin [Thu, 23 Oct 2008 05:26:29 +0000 (22:26 -0700)]
x86: Fix ASM_X86__ header guards

Change header guards named "ASM_X86__*" to "_ASM_X86_*" since:

a. the double underscore is ugly and pointless.
b. no leading underscore violates namespace constraints.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of uml-config.h
Al Viro [Sat, 11 Oct 2008 22:39:18 +0000 (18:39 -0400)]
x86, um: get rid of uml-config.h

Take a few symbols we need into kern_constants.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of arch/um/Kconfig.arch
Al Viro [Mon, 25 Aug 2008 08:51:27 +0000 (04:51 -0400)]
x86, um: get rid of arch/um/Kconfig.arch

Teach scripts/kconfig/Makefile and top-level Makefile that arch/*/Makefile
is allowed to say Kconfig := <whatever I want instead of arch/blah/Kconfig>.
Rewrite arch/um/Kconfig and arch/um/Kconfig.<subarch> so that the latter
would be top-level one (and include the pieces of the former).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of arch/um/os symlink
Al Viro [Mon, 25 Aug 2008 08:14:29 +0000 (04:14 -0400)]
x86, um: get rid of arch/um/os symlink

we can get DEV_NULL defined for arch/um/drivers/null.c in less
convoluted ways, TYVM...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of excessive includes of uml-config.h
Al Viro [Mon, 25 Aug 2008 08:12:10 +0000 (04:12 -0400)]
x86, um: get rid of excessive includes of uml-config.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of header symlinks
Al Viro [Sat, 23 Aug 2008 21:28:20 +0000 (17:28 -0400)]
x86, um: get rid of header symlinks

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: merge Kconfig.i386 and Kconfig.x86_64
Al Viro [Sat, 23 Aug 2008 21:00:34 +0000 (17:00 -0400)]
x86, um: merge Kconfig.i386 and Kconfig.x86_64

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of sysdep symlink
Al Viro [Tue, 19 Aug 2008 01:44:32 +0000 (21:44 -0400)]
x86, um: get rid of sysdep symlink

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: trim the junk from uml ptrace-*.h
Al Viro [Mon, 18 Aug 2008 21:47:45 +0000 (17:47 -0400)]
x86, um: trim the junk from uml ptrace-*.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: take vm-flags.h to sysdep
Al Viro [Mon, 18 Aug 2008 14:20:37 +0000 (10:20 -0400)]
x86, um: take vm-flags.h to sysdep

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of uml asm/arch
Al Viro [Mon, 18 Aug 2008 08:54:36 +0000 (04:54 -0400)]
x86, um: get rid of uml asm/arch

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of uml highmem.h
Al Viro [Mon, 18 Aug 2008 08:15:12 +0000 (04:15 -0400)]
x86, um: get rid of uml highmem.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of uml unistd.h
Al Viro [Mon, 18 Aug 2008 08:01:47 +0000 (04:01 -0400)]
x86, um: get rid of uml unistd.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of system.h -> system.h include
Al Viro [Mon, 18 Aug 2008 07:25:24 +0000 (03:25 -0400)]
x86, um: get rid of system.h -> system.h include

Long-term we want to split system.h and include barriers part from
underlying target; for now copy that part to sysdep.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: uml atomic.h is not needed anymore
Al Viro [Mon, 18 Aug 2008 05:36:36 +0000 (01:36 -0400)]
x86, um: uml atomic.h is not needed anymore

Its only difference from underlying atomic.h used to be the include
of kernel.h; it's not needed there anymore.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: untangle uml ldt.h
Al Viro [Mon, 18 Aug 2008 05:26:38 +0000 (01:26 -0400)]
x86, um: untangle uml ldt.h

* turn asm/ldt.h into ldt.h; update the (very few) users
* take host_ldt.h into sysdep, kill symlink mess
* includes of asm/arch/ldt.h turn into asm/ldt.h now

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of more uml asm/arch uses
Al Viro [Mon, 18 Aug 2008 04:19:01 +0000 (00:19 -0400)]
x86, um: get rid of more uml asm/arch uses

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: remove dead header (uml module-generic.h; never used these days)
Al Viro [Mon, 18 Aug 2008 04:14:39 +0000 (00:14 -0400)]
x86, um: remove dead header (uml module-generic.h; never used these days)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: get rid of uml signal.h
Al Viro [Mon, 18 Aug 2008 04:12:41 +0000 (00:12 -0400)]
x86, um: get rid of uml signal.h

the only theoretical reason for it these days is ppc; aside of uml/ppc
being dead, do_signal() would be happier in arch/powerpc/kernel/signal.h
anyway.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: sanitize uml sigcontext.h uses
Al Viro [Mon, 18 Aug 2008 03:58:32 +0000 (23:58 -0400)]
x86, um: sanitize uml sigcontext.h uses

a) the only difference between sigcontext and sysdep/sigcontext
is that the former contains externs for two long-dead functions.
Removed, switched the only user to sysdep/sigcontext

b) asm/sigcontext.h is removable - that of underlying architecture
would get used.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: now we can get rid of trivial uml headers
Al Viro [Mon, 18 Aug 2008 02:54:55 +0000 (22:54 -0400)]
x86, um: now we can get rid of trivial uml headers

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: ... and asm-x86 move
Al Viro [Mon, 18 Aug 2008 01:05:42 +0000 (21:05 -0400)]
x86, um: ... and asm-x86 move

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: initial part of asm-um move
Al Viro [Sun, 17 Aug 2008 23:13:17 +0000 (19:13 -0400)]
x86, um: initial part of asm-um move

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agox86, um: take arch/um/include/* out of the way
Al Viro [Sun, 17 Aug 2008 17:48:37 +0000 (13:48 -0400)]
x86, um: take arch/um/include/* out of the way

We can't just plop asm/* into it - userland helpers are built with it
in search path and seeing asm/* show up there suddenly would be a bad
idea.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoACPI: fix ia64 build warning
Len Brown [Thu, 23 Oct 2008 05:47:29 +0000 (01:47 -0400)]
ACPI: fix ia64 build warning

arch/ia64/sn/kernel/io_acpi_init.c:361: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 3 has type ‘long long unsigned int’

Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoMerge branch 'bugzilla-11715' into test
Len Brown [Thu, 23 Oct 2008 05:28:19 +0000 (01:28 -0400)]
Merge branch 'bugzilla-11715' into test

15 years agomath-emu: Fix thinko in _FP_DIV
David S. Miller [Thu, 23 Oct 2008 05:09:59 +0000 (22:09 -0700)]
math-emu: Fix thinko in _FP_DIV

In commit 48d6c64311ddb6417b901639530ccbc47bdc7635 ("math-emu: Add
support for reporting exact invalid exception") code was added to
set the new FP_EX_INVALID_{IDI,ZDZ} exception flag bits.

However there is a missing break statement for the
_FP_CLS_COMBINE(FP_CLS_INF,FP_CLS_INF) switch case, the
code just falls into _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_ZERO)
which then proceeds to overwrite all of the settings.

Fix by adding the missing break.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocifs: handle the TCP_Server_Info->tsk field more carefully
Jeff Layton [Wed, 22 Oct 2008 17:57:07 +0000 (13:57 -0400)]
cifs: handle the TCP_Server_Info->tsk field more carefully

cifs: handle the TCP_Server_Info->tsk field more carefully

We currently handle the TCP_Server_Info->tsk field without any locking,
but with some half-measures to try and prevent races. These aren't
really sufficient though. When taking down cifsd, use xchg() to swap
the contents of the tsk field with NULL so we don't end up trying
to send it more than one signal. Also, don't allow cifsd to exit until
the signal is received if we expect one.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agomath-emu: Fix signalling of underflow and inexact while packing result.
Kumar Gala [Wed, 22 Oct 2008 05:19:00 +0000 (22:19 -0700)]
math-emu: Fix signalling of underflow and inexact while packing result.

I'm trying to move the powerpc math-emu code to use the include/math-emu bits.

In doing so I've been using TestFloat to see how good or bad we are
doing.  For the most part the current math-emu code that PPC uses has
a number of issues that the code in include/math-emu seems to solve
(plus bugs we've had for ever that no one every realized).

Anyways, I've come across a case that we are flagging underflow and
inexact because we think we have a denormalized result from a double
precision divide:

000.FFFFFFFFFFFFF / 3FE.FFFFFFFFFFFFE
soft: 001.0000000000000 .....  syst: 001.0000000000000 ...ux

What it looks like is the results out of FP_DIV_D are:

D:
sign:   0
mantissa: 01000000 00000000
exp:  -1023 (0)

The problem seems like we aren't normalizing the result and bumping the exp.

Now that I'm digging into this a bit I'm thinking my issue has to do with
the fix DaveM put in place from back in Aug 2007 (commit
405849610fd96b4f34cd1875c4c033228fea6c0f):

[MATH-EMU]: Fix underflow exception reporting.

    2) we ended up rounding back up to normal (this is the case where
       we set the exponent to 1 and set the fraction to zero), this
       should set inexact too
...

    Another example, "0x0.0000000000001p-1022 / 16.0", should signal both
    inexact and underflow.  The cpu implementations and ieee1754
    literature is very clear about this.  This is case #2 above.

Here is the distilled glibc test case from Jakub Jelinek which prompted that
commit:

--------------------
#include <float.h>
#include <fenv.h>
#include <stdio.h>

volatile double d = DBL_MIN;
volatile double e = 0x0.0000000000001p-1022;
volatile double f = 16.0;
int
main (void)
{
  printf ("%x\n", fetestexcept (FE_UNDERFLOW));
  d /= f;
  printf ("%x\n", fetestexcept (FE_UNDERFLOW));
  e /= f;
  printf ("%x\n", fetestexcept (FE_UNDERFLOW));
  return 0;
}
--------------------

It looks like the case I have we are exact before rounding, but think it
looks like the rounding case since it appears as if "overflow is set".

000.FFFFFFFFFFFFF / 3FE.FFFFFFFFFFFFE = 001.0000000000000

I think the following adds the check for my case and still works for the
issue your commit was trying to resolve.

Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: Add checkstack support
Martin Habets [Wed, 22 Oct 2008 04:58:29 +0000 (21:58 -0700)]
sparc: Add checkstack support

Add sparc support to checkstack.

Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: correct section of current_pc()
Frederic Weisbecker [Wed, 22 Oct 2008 04:56:42 +0000 (21:56 -0700)]
sparc: correct section of current_pc()

Latest mainline gives this section mismatch on sparc:

The function current_pc() references
the variable __init no_sun4u_here.
This is often because current_pc lacks a __init
annotation or the annotation of no_sun4u_here is wrong.

Since current_pc() is used only in early time, it is correct to
put it in .init section.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc: correct section of apc_no_idle
Frederic Weisbecker [Wed, 22 Oct 2008 04:55:33 +0000 (21:55 -0700)]
sparc: correct section of apc_no_idle

The latest mainline gives this section mismatch on sparc:

The function __devinit apc_probe() references
a variable __initdata apc_no_idle.
If apc_no_idle is only used by apc_probe then
annotate apc_no_idle with a matching annotation.

Since the commit 7e7e2f035663c5ceb029bfb9d91e75099b0a5625,
apc_probe() is on __devinit so we have to correct apc_no_idle
which is referenced by this function.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agosparc64: Fix race in arch/sparc64/kernel/trampoline.S
Andrea Shepard [Mon, 20 Oct 2008 06:33:03 +0000 (23:33 -0700)]
sparc64: Fix race in arch/sparc64/kernel/trampoline.S

Make arch/sparc64/kernel/trampoline.S in 2.6.27.1 lock prom_entry_lock
when calling the PROM.  This prevents a race condition that I observed
causing a hang on startup on a 12-CPU E4500.

I am not subscribed to this list, so please CC me on replies.

Signed-off-by: Andrea Shepard <andrea@persephoneslair.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agocifs: fix unlinking of rename target when server doesn't support open file renames
Jeff Layton [Wed, 22 Oct 2008 17:57:01 +0000 (13:57 -0400)]
cifs: fix unlinking of rename target when server doesn't support open file renames

cifs: fix unlinking of rename target when server doesn't support open file renames

The patch to make cifs_rename undoable broke renaming one file on top of
another when the server doesn't support busy file renames. Remove the
code that uses busy file renames to unlink the target file, and just
have it call cifs_unlink. If the rename of the source file fails, then
the unlink won't be undoable, but hopefully that's rare enough that it
won't be a problem.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoACPI: hack around sysfs warning with link order
Zhao Yakui [Fri, 17 Oct 2008 08:33:57 +0000 (16:33 +0800)]
ACPI: hack around sysfs warning with link order

    There exists the following warning message will appear after the
following commit is merged.
   >commit f2e969acd6d5981e6b1272810002558650d0736e
   >Author: Zhao Yakui <yakui.zhao@intel.com>
   >Date:   Mon Aug 11 14:57:50 2008 +0800
    >ACPI: Add "acpi.power_nocheck=1" to disable power state check in
power transition:

   >WARNING: at linux-2.6/fs/sysfs/dir.c:463  sysfs_add_one+0x33/0x39()
   >sysfs: duplicate filename 'acpi' can not be created
   >kobject_add_internal failed for acpi with -EEXIST, don't try to register
            things with the same name in the same directory

   In the above commit the "acpi.power_nocheck" module parameter is defined
in drivers/acpi/power.c file. As several module parameters using the same ACPI
prefix are defined in the different files(for example: power_nocheck is
defined in drivers/acpi/power.c,debug_layer/debug_level are defined in
drivers/acpi/debug.c) and there exists another module between them, the
warning message will be printed when using the current generic param code.
(In the function of param_sysfs_init).

   In fact when ACPI is selected, the drivers/acpi/power will also be compiled
as built-in kernel.So this issue can be fixed by the following approach.
   workaround it by adjusting the module link order in drivers/acpi/Makefile.
In such case the module parameter using the same prefix(ACPI) are put together
in the param data section.

   Of course the better solution is to fix it in generic param code related
with sysfs.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPI suspend: fix build warning when CONFIG_ACPI_SLEEP=n
Len Brown [Thu, 23 Oct 2008 04:45:18 +0000 (00:45 -0400)]
ACPI suspend: fix build warning when CONFIG_ACPI_SLEEP=n

drivers/acpi/sleep/main.c:27: warning: ‘acpi_target_sleep_state’ defined but not used

Signed-off-by: Len Brown <len.brown@intel.com>
15 years agointel_menlo: fix build warning
Len Brown [Thu, 23 Oct 2008 04:43:47 +0000 (00:43 -0400)]
intel_menlo: fix build warning

drivers/misc/intel_menlow.c:107: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘long long unsigned int’

Signed-off-by: Len Brown <len.brown@intel.com>
15 years ago[CIFS] improve setlease handling
Steve French [Thu, 23 Oct 2008 04:42:37 +0000 (04:42 +0000)]
[CIFS] improve setlease handling

fcntl(F_SETLEASE) currently is not exported by cifs (nor by local file
systems) so cifs grants leases based on how other local processes have
opened the file not by whether the file is cacheable (oplocked).  This
adds the check to make sure that the file is cacheable on the client
before checking whether we can grant the lease locally
(generic_setlease).  It also adds a mount option for cifs (locallease)
if the user wants to override this and try to grant leases even
if the server did not grant oplock.

Signed-off-by: Steve French <sfrench@us.ibm.com>
15 years agoMerge branch 'linus' into test
Len Brown [Thu, 23 Oct 2008 03:57:26 +0000 (23:57 -0400)]
Merge branch 'linus' into test

Conflicts:
MAINTAINERS
arch/x86/kernel/acpi/boot.c
arch/x86/kernel/acpi/sleep.c
drivers/acpi/Kconfig
drivers/pnp/Makefile
drivers/pnp/quirks.c

Signed-off-by: Len Brown <len.brown@intel.com>
15 years agodrm: Avoid oops in DRM_IOCTL_RM_DRAW if a bad handle is supplied.
Eric Anholt [Tue, 21 Oct 2008 18:53:01 +0000 (11:53 -0700)]
drm: Avoid oops in DRM_IOCTL_RM_DRAW if a bad handle is supplied.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Michel Dänzer <michel@tungstengraphics.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: Add 32-bit compatibility for DRM_IOCTL_UPDATE_DRAW.
Eric Anholt [Tue, 21 Oct 2008 18:38:50 +0000 (11:38 -0700)]
drm: Add 32-bit compatibility for DRM_IOCTL_UPDATE_DRAW.

This fixes vblank support for a 32-bit X Server on a 64-bit kernel.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/i915: use pipes, not planes to label vblank data
Keith Packard [Sun, 19 Oct 2008 02:39:29 +0000 (19:39 -0700)]
drm/i915: use pipes, not planes to label vblank data

vblank in the kernel is far simpler if it deals with pipes instead of
planes, so we're changing both user and kernel side.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/i915: hold dev->struct_mutex and DRM lock during vblank ring operations
Keith Packard [Fri, 17 Oct 2008 04:18:27 +0000 (21:18 -0700)]
drm/i915: hold dev->struct_mutex and DRM lock during vblank ring operations

To synchronize clip lists with the X server, the DRM lock must be held while
looking at drawable clip lists. To synchronize with other ring access, the
ring mutex must be held while inserting commands into the ring.  Failure to
do the first resulted in easy visual corruption when moving windows, and the
second could have corrupted the ring with DRI2.

Grabbing the DRM lock involves using the DRM tasklet mechanism, grabbing the
ring mutex means potentially sleeping. Deal with both of these by always
running the tasklet from a work handler.

Also, protect from clip list changes since the vblank request was queued by
making sure the window has at least one rectangle while looking inside,
preventing oopses .

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: Fix format string warnings on x86-64.
Linus Torvalds [Fri, 17 Oct 2008 22:43:02 +0000 (15:43 -0700)]
i915: Fix format string warnings on x86-64.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: Don't dereference HWS in /proc debug files when it isn't initialized.
Eric Anholt [Fri, 17 Oct 2008 21:41:03 +0000 (14:41 -0700)]
i915: Don't dereference HWS in /proc debug files when it isn't initialized.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: Enable IMR passthrough of vblank events before enabling it in pipestat.
Eric Anholt [Fri, 17 Oct 2008 22:41:26 +0000 (15:41 -0700)]
i915: Enable IMR passthrough of vblank events before enabling it in pipestat.

Otherwise, if we lost the race, the pipestat bit would be set without being
reflected in IIR, and we would never clear the pipestat bit so the pipe
event would never be generated again, and all vblank waits would time out.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: Remove two leaks of vblank reference count in error paths.
Eric Anholt [Fri, 17 Oct 2008 18:03:53 +0000 (11:03 -0700)]
drm: Remove two leaks of vblank reference count in error paths.

If the failing paths were hit, the vblank IRQ would never get turned off
again.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: fix leak of cliprects in drm_rmdraw()
Zhenyu Wang [Fri, 17 Oct 2008 07:48:44 +0000 (15:48 +0800)]
drm: fix leak of cliprects in drm_rmdraw()

Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: Disable MSI on GM965 (errata says it doesn't work)
Keith Packard [Fri, 17 Oct 2008 07:44:42 +0000 (00:44 -0700)]
i915: Disable MSI on GM965 (errata says it doesn't work)

Current Intel errata for the GM965 says that using MSI may cause interrupts
to be delayed or lost. The only workaround offered is to not use it.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: Set cliprects to NULL when changing drawable to having 0 cliprects.
Zhenyu Wang [Fri, 17 Oct 2008 05:15:48 +0000 (13:15 +0800)]
drm: Set cliprects to NULL when changing drawable to having 0 cliprects.

This avoids setting the cliprects pointer to a zero-sized allocation.

Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: Protect vblank IRQ reg access with spinlock
Keith Packard [Thu, 16 Oct 2008 18:31:38 +0000 (11:31 -0700)]
i915: Protect vblank IRQ reg access with spinlock

This uses the same spinlock as the user_irq code as it shares the same
register, ensuring that interrupt registers are updated atomically.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agopanasonic-laptop: fix build
Len Brown [Sat, 11 Oct 2008 06:30:14 +0000 (02:30 -0400)]
panasonic-laptop: fix build

sync with acpi_driver_data(device)
and acpi_evaluate_integer(..., long long)
changes that happened since this driver
was checked in.

Signed-off-by: Len Brown <len.brown@intel.com>
15 years agosh: asm/gpio.h needs linux/kernel.h for might_sleep()/WARN_ON().
Paul Mundt [Thu, 23 Oct 2008 03:37:20 +0000 (12:37 +0900)]
sh: asm/gpio.h needs linux/kernel.h for might_sleep()/WARN_ON().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoMerge branch 'panasonic' into test
Len Brown [Thu, 23 Oct 2008 03:36:06 +0000 (23:36 -0400)]
Merge branch 'panasonic' into test

15 years agoMerge branch 'yinghai' into test
Len Brown [Thu, 23 Oct 2008 03:35:56 +0000 (23:35 -0400)]
Merge branch 'yinghai' into test

15 years agosh: mach-highlander: Handle SCIF pinmuxing on R7785RP.
Paul Mundt [Thu, 23 Oct 2008 03:35:43 +0000 (12:35 +0900)]
sh: mach-highlander: Handle SCIF pinmuxing on R7785RP.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoMerge branch 'ull' into test
Len Brown [Thu, 23 Oct 2008 03:33:29 +0000 (23:33 -0400)]
Merge branch 'ull' into test

Conflicts:
drivers/acpi/bay.c
drivers/acpi/dock.c
drivers/ata/libata-acpi.c

Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoMerge branch 'thinkpad' into test
Len Brown [Thu, 23 Oct 2008 03:28:48 +0000 (23:28 -0400)]
Merge branch 'thinkpad' into test

15 years agoMerge branch 'suspend' into test
Len Brown [Thu, 23 Oct 2008 03:28:46 +0000 (23:28 -0400)]
Merge branch 'suspend' into test

15 years agoMerge branch 'pnp-debug' into test
Len Brown [Thu, 23 Oct 2008 03:28:43 +0000 (23:28 -0400)]
Merge branch 'pnp-debug' into test

15 years agoMerge branch 'misc' into test
Len Brown [Thu, 23 Oct 2008 03:28:38 +0000 (23:28 -0400)]
Merge branch 'misc' into test

15 years agoMerge branch 'i7300_idle' into test
Len Brown [Thu, 23 Oct 2008 03:28:36 +0000 (23:28 -0400)]
Merge branch 'i7300_idle' into test

15 years agoMerge branch 'fujitsu' into test
Len Brown [Thu, 23 Oct 2008 03:28:33 +0000 (23:28 -0400)]
Merge branch 'fujitsu' into test

15 years agoMerge branch 'fadt-test' into test
Len Brown [Thu, 23 Oct 2008 03:28:03 +0000 (23:28 -0400)]
Merge branch 'fadt-test' into test

15 years agoMerge branch 'eeepc' into test
Len Brown [Thu, 23 Oct 2008 03:28:01 +0000 (23:28 -0400)]
Merge branch 'eeepc' into test

15 years agoMerge branch 'ec' into test
Len Brown [Thu, 23 Oct 2008 03:27:59 +0000 (23:27 -0400)]
Merge branch 'ec' into test

15 years agoMerge branch 'dock' into test
Len Brown [Thu, 23 Oct 2008 03:25:26 +0000 (23:25 -0400)]
Merge branch 'dock' into test

Conflicts:
drivers/acpi/osl.c

Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoMerge branch 'cpuidle' into test
Len Brown [Thu, 23 Oct 2008 03:20:05 +0000 (23:20 -0400)]
Merge branch 'cpuidle' into test

15 years agoMerge branch 'bugzilla-11481' into test
Len Brown [Thu, 23 Oct 2008 03:20:02 +0000 (23:20 -0400)]
Merge branch 'bugzilla-11481' into test

15 years agoMerge branch 'bugzilla-10503' into test
Len Brown [Thu, 23 Oct 2008 03:20:01 +0000 (23:20 -0400)]
Merge branch 'bugzilla-10503' into test

15 years agoMerge branch 'bugzilla-10237' into test
Len Brown [Thu, 23 Oct 2008 03:19:59 +0000 (23:19 -0400)]
Merge branch 'bugzilla-10237' into test

15 years agoMerge branch 'asus-cleanup' into test
Len Brown [Thu, 23 Oct 2008 03:19:57 +0000 (23:19 -0400)]
Merge branch 'asus-cleanup' into test