]> err.no Git - linux-2.6/log
linux-2.6
18 years agoBUG_ON() Conversion in md/raid6main.c
Eric Sesterhenn [Sun, 2 Apr 2006 11:33:30 +0000 (13:33 +0200)]
BUG_ON() Conversion in md/raid6main.c

this changes if() BUG(); constructs to BUG_ON() which is
cleaner and can better optimized away

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoBUG_ON() Conversion in md/raid5.c
Eric Sesterhenn [Sun, 2 Apr 2006 11:31:42 +0000 (13:31 +0200)]
BUG_ON() Conversion in md/raid5.c

this changes if() BUG(); constructs to BUG_ON() which is
cleaner and can better optimized away

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoMerge with git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Adrian Bunk [Sun, 2 Apr 2006 08:37:38 +0000 (10:37 +0200)]
Merge with git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-serial
Linus Torvalds [Sat, 1 Apr 2006 05:36:51 +0000 (21:36 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-serial

* master.kernel.org:/home/rmk/linux-2.6-serial:
  [SERIAL] Allow 8250 PCI, PNP, GSC and HP300 support to be disabled

18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-mmc
Linus Torvalds [Sat, 1 Apr 2006 05:35:04 +0000 (21:35 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-mmc

* master.kernel.org:/home/rmk/linux-2.6-mmc:
  [MMC] Pass -DDEBUG on compiler command line if MMC_DEBUG selected
  [MMC] Add OMAP MMC host driver

18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Sat, 1 Apr 2006 05:33:07 +0000 (21:33 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 3424/2: ixp23xx: fix uncompress.h for recent CRLF decompressor change
  [ARM] 3434/1: pxa i2s amsl define
  [ARM] 3425/1: xsc3: need to include pgtable-hwdef.h
  [ARM] Allow un-muxed syscalls to be available for everyone
  [ARM] 3420/1: Missing clobber in example code
  [ARM] nommu: fixups for the exception vectors
  [ARM] nommu: add nommu specific Kconfig and MMUEXT variable in Makefile
  [ARM] nommu: start-up code
  [ARM] nommu: MPU support in boot/compressed/head.S

18 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Sat, 1 Apr 2006 05:31:40 +0000 (21:31 -0800)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] Avoid "u64 foo : 32;" for gcc3 vs. gcc4 compatibility
  [IA64] Export cpu cache info by sysfs

18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Sat, 1 Apr 2006 05:27:53 +0000 (21:27 -0800)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  [CIFS] Fix typo in earlier cifs_unlink change and protect one
  [CIFS] Incorrect signature sent on SMB Read
  [CIFS] Fix unlink oops when indirectly called in rename error path
  [CIFS] Fix two remaining coverity scan tool warnings.
  [CIFS] Set correct lock type on new posix unlock call
  [CIFS] Upate cifs change log
  [CIFS] Fix slow oplock break response when mounts to different
  [CIFS] Workaround various server bugs found in testing at connectathon
  [CIFS] Allow fallback for setting file size to Procom SMB server when
  [CIFS] Make POSIX CIFS Extensions SetFSInfo match exactly what we want
  [CIFS] Move noisy debug message (triggerred by some older servers) from
  [CIFS] Use correct pid on new cifs posix byte range lock call
  [CIFS] Add posix (advisory) byte range locking support to cifs client
  [CIFS] CIFS readdir perf optimizations part 1
  [CIFS] Free small buffers earlier so we exceed the cifs
  [CIFS] Fix large (ie over 64K for MaxCIFSBufSize) buffer case for wrapping
  [CIFS] Convert remaining places in fs/cifs from
  [CIFS] SessionSetup cleanup part 2
  [CIFS] fix compile error (typo) and warning in cifssmb.c
  [CIFS] Cleanup NTLMSSP session setup handling

18 years agoFix minor documentation typo
Michael Hayes [Fri, 31 Mar 2006 23:49:22 +0000 (01:49 +0200)]
Fix minor documentation typo

This patch fixes a minor typo in Documentation/acpi-hotkey.txt.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoBFP->BPF in Documentation/networking/tuntap.txt
Cal Peake [Fri, 31 Mar 2006 23:46:12 +0000 (01:46 +0200)]
BFP->BPF in Documentation/networking/tuntap.txt

BFP should be BPF (BSD Packet Filter)

Signed-off-by: Cal Peake <cp@absolutedigital.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoDoc/kernel-parameters.txt: slightly reword sentence about restrictions
Stefan Richter [Fri, 31 Mar 2006 23:44:30 +0000 (01:44 +0200)]
Doc/kernel-parameters.txt: slightly reword sentence about restrictions

The previous patch somewhat diverted the train of thought.
Here I am trying to bring the valued reader back on track.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoDoc/kernel-parameters.txt: mention modinfo and sysfs
Stefan Richter [Fri, 31 Mar 2006 23:43:18 +0000 (01:43 +0200)]
Doc/kernel-parameters.txt: mention modinfo and sysfs

Doc/kernel-parameters.txt: mention modinfo and sysfs

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoDoc/kernel-parameters.txt: delete false version information and history
Stefan Richter [Fri, 31 Mar 2006 23:42:29 +0000 (01:42 +0200)]
Doc/kernel-parameters.txt: delete false version information and history

Doc/kernel-parameters.txt: delete false version information and history

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoFix comments: s/granuality/granularity/
Kalin KOZHUHAROV [Fri, 31 Mar 2006 23:41:22 +0000 (01:41 +0200)]
Fix comments: s/granuality/granularity/

I was grepping through the code and some `grep ganularity -R .` didn't
catch what I thought. Then looking closer I saw the term "granuality"
used in only four places (in comments) and granularity in many more
places describing the same idea. Some other facts:

dictionary.com does not know such a word
define:granuality on google is not found (and pages for granuality are
mostly related to patches to the kernel)
it has not been discussed as a term on LKML, AFAICS (=Can Search)

To be consistent, I think granularity should be used everywhere.

Signed-off-by: Kalin KOZHUHAROV <kalin@thinrope.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agokexec: grammar fix for crash_save_this_cpu()
Horms [Fri, 31 Mar 2006 23:39:17 +0000 (01:39 +0200)]
kexec: grammar fix for crash_save_this_cpu()

kexec: grammar fix for crash_save_this_cpu()

Signed-Off-By: Horms <horms@verge.net.au>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoDocumentation: Make fujitsu/frv/kernel-ABI.txt 80 columns wide
Horms [Fri, 31 Mar 2006 23:38:15 +0000 (01:38 +0200)]
Documentation: Make fujitsu/frv/kernel-ABI.txt 80 columns wide

Documentation: Make kernel-ABI.txt 80 columns wide

Note that this only has line-wrapping and white-space changes.
No text was changed at all.

Signed-Off-By: Horms <horms@verge.net.au>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoDocumentation: Reorder documentation of nomca and nomce
Horms [Fri, 31 Mar 2006 23:36:09 +0000 (01:36 +0200)]
Documentation: Reorder documentation of nomca and nomce

My patch to add brief documentation of the nomca boot parameter
added it out of alphabetical order.

Signed-Off-By: Horms <horms@verge.net.au>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agofix typo "Suposse" -> "Suppose"
Uwe Zeisberger [Fri, 31 Mar 2006 23:29:43 +0000 (01:29 +0200)]
fix typo "Suposse" -> "Suppose"

Signed-off-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoBUG_ON() Conversion in drivers/s390/char/tape_block.c
Eric Sesterhenn [Fri, 31 Mar 2006 23:28:11 +0000 (01:28 +0200)]
BUG_ON() Conversion in drivers/s390/char/tape_block.c

this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoBUG_ON() Conversion in drivers/s390/block/dasd_erp.c
Eric Sesterhenn [Fri, 31 Mar 2006 23:27:08 +0000 (01:27 +0200)]
BUG_ON() Conversion in drivers/s390/block/dasd_erp.c

this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoBUG_ON() Conversion in mm/vmalloc.c
Eric Sesterhenn [Fri, 31 Mar 2006 23:26:09 +0000 (01:26 +0200)]
BUG_ON() Conversion in mm/vmalloc.c

this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoBUG_ON() Conversion in mm/swap_state.c
Eric Sesterhenn [Fri, 31 Mar 2006 23:25:12 +0000 (01:25 +0200)]
BUG_ON() Conversion in mm/swap_state.c

this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoBUG_ON() Conversion in mm/mmap.c
Eric Sesterhenn [Fri, 31 Mar 2006 23:23:29 +0000 (01:23 +0200)]
BUG_ON() Conversion in mm/mmap.c

this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoBUG_ON() Conversion in kernel/printk.c
Eric Sesterhenn [Fri, 31 Mar 2006 23:21:17 +0000 (01:21 +0200)]
BUG_ON() Conversion in kernel/printk.c

this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoBUG_ON() Conversion in ipc/util.c
Eric Sesterhenn [Fri, 31 Mar 2006 23:20:23 +0000 (01:20 +0200)]
BUG_ON() Conversion in ipc/util.c

this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoBUG_ON() Conversion in fs/sysfs/
Eric Sesterhenn [Fri, 31 Mar 2006 23:18:38 +0000 (01:18 +0200)]
BUG_ON() Conversion in fs/sysfs/

this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoBUG_ON() Conversion in fs/smbfs/
Eric Sesterhenn [Fri, 31 Mar 2006 23:16:26 +0000 (01:16 +0200)]
BUG_ON() Conversion in fs/smbfs/

this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoBUG_ON() Conversion in fs/jffs2/
Eric Sesterhenn [Fri, 31 Mar 2006 23:15:35 +0000 (01:15 +0200)]
BUG_ON() Conversion in fs/jffs2/

this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoBUG_ON() Conversion in fs/hfsplus/
Eric Sesterhenn [Fri, 31 Mar 2006 23:14:43 +0000 (01:14 +0200)]
BUG_ON() Conversion in fs/hfsplus/

this changes if() BUG(); constructs to BUG_ON() which is
cleaner, contains unlikely() and can better optimized away.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoBUG_ON() Conversion in fs/exec.c
Eric Sesterhenn [Fri, 31 Mar 2006 23:13:38 +0000 (01:13 +0200)]
BUG_ON() Conversion in fs/exec.c

this changes if() BUG(); constructs to BUG_ON() which is
cleaner and can better optimized away

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoBUG_ON() Conversion in fs/direct-io.c
Eric Sesterhenn [Fri, 31 Mar 2006 23:10:13 +0000 (01:10 +0200)]
BUG_ON() Conversion in fs/direct-io.c

this changes if() BUG(); constructs to BUG_ON() which is
cleaner and can better optimized away

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoBUG_ON() Conversion in md/raid1.c
Eric Sesterhenn [Fri, 31 Mar 2006 23:08:49 +0000 (01:08 +0200)]
BUG_ON() Conversion in md/raid1.c

this changes if() BUG(); constructs to BUG_ON() which is
cleaner and can better optimized away

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoBUG_ON() Conversion in md/dm-target.c
Eric Sesterhenn [Fri, 31 Mar 2006 23:08:12 +0000 (01:08 +0200)]
BUG_ON() Conversion in md/dm-target.c

this changes if() BUG(); constructs to BUG_ON() which is
cleaner and can better optimized away

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agotypos: s/ducument/document/
Adrian Bunk [Fri, 31 Mar 2006 23:04:59 +0000 (01:04 +0200)]
typos: s/ducument/document/

s/ducument/document/

Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agofix the email address of Wendy Xiong
Adrian Bunk [Fri, 31 Mar 2006 23:04:20 +0000 (01:04 +0200)]
fix the email address of Wendy Xiong

Replace a bouncing version of the email address of Wendy Xiong with a
working one.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agofix a typo in the AIC7XXX_DEBUG_MASK help text
Adrian Bunk [Fri, 31 Mar 2006 23:03:38 +0000 (01:03 +0200)]
fix a typo in the AIC7XXX_DEBUG_MASK help text

This patch fixes a typo in the AIC7XXX_DEBUG_MASK help text.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agohelp text: SOFTWARE_SUSPEND doesn't need ACPI
Adrian Bunk [Fri, 31 Mar 2006 23:03:08 +0000 (01:03 +0200)]
help text: SOFTWARE_SUSPEND doesn't need ACPI

The note that SOFTWARE_SUSPEND doesn't need APM is helpful, but nowadays
the information that it doesn't need ACPI, too, is even more helpful.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years agoMTD: remove obsolete Kconfig options
Anders Larsen [Fri, 31 Mar 2006 23:02:42 +0000 (01:02 +0200)]
MTD: remove obsolete Kconfig options

Remove the obsolete Kconfig options MTD_CFI_AMDSTD_RETRY
and MTD_CFI_AMDSTD_RETRY_MAX

The code that depended on these was removed in early 2004, but
Kconfig was not updated accordingly.

Signed-off-by: Anders Larsen <al@alarsen.net>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
18 years ago[CIFS] Fix typo in earlier cifs_unlink change and protect one
Steve French [Fri, 31 Mar 2006 22:43:50 +0000 (22:43 +0000)]
[CIFS] Fix typo in earlier cifs_unlink change and protect one
extra path.

Since cifs_unlink can also be called from rename path and there
was one report of oops am making the extra check for null inode.

Signed-off-by: Steve French <sfrench@us.ibm.com>
18 years ago[CIFS] Incorrect signature sent on SMB Read
Steve French [Fri, 31 Mar 2006 21:22:00 +0000 (21:22 +0000)]
[CIFS] Incorrect signature sent on SMB Read

Fixes Samba bug 3621 and kernel.org bug 6147

For servers which require SMB/CIFS packet signing, we were sending the
wrong signature (all zeros) on SMB Read request.  The new cifs routine
to do signatures across an iovec was not complete - and SMB Read, unlike
the new SMBWrite2, did not fall back to the older routine (ie use
SendReceive vs. the more efficient SendReceive2 ie used the older
cifs_sign_smb vs. the disabled  cifs_sign_smb2) for calculating signatures.

This finishes up cifs_sign_smb2/cifs_calc_signature2 so that the callers
of SendReceive2 can get SMB/CIFS packet signatures.

Now that cifs_sign_smb2 is supported, we could start using it in
the write path but this smaller fix does not include the change
to use SMBWrite2 when signatures are required (which when enabled
will make more Writes more efficient and alloc less memory).
Currently Write2 is only used when signatures are not
required at the moment but after more testing we will enable
that as well).

Thanks to James Slepicka and Sam Flory for initial investigation.

Signed-off-by: Steve French <sfrench@us.ibm.com>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 31 Mar 2006 20:52:30 +0000 (12:52 -0800)]
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NET]: Allow skb headroom to be overridden
  [TCP]: Kill unused extern decl for tcp_v4_hash_connecting()
  [NET]: add SO_RCVBUF comment
  [NET]: Deinline some larger functions from netdevice.h
  [DCCP]: Use NULL for pointers, comfort sparse.
  [DECNET]: Fix refcount

18 years ago[PATCH] avoid unaligned access when accessing poll stack
Jes Sorensen [Fri, 31 Mar 2006 16:18:57 +0000 (11:18 -0500)]
[PATCH] avoid unaligned access when accessing poll stack

Commit 70674f95c0a2ea694d5c39f4e514f538a09be36f:

  [PATCH] Optimize select/poll by putting small data sets on the stack

resulted in the poll stack being 4-byte aligned on 64-bit architectures,
causing misaligned accesses to elements in the array.

This patch fixes it by declaring the stack in terms of 'long' instead
of 'char'.

Force alignment of poll and select stacks to long to avoid unaligned
access on 64 bit architectures.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
Linus Torvalds [Fri, 31 Mar 2006 20:28:01 +0000 (12:28 -0800)]
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [PATCH] libata: fix ata_xfer_tbl termination
  [PATCH] libata: make ata_qc_issue complete failed qcs
  [PATCH] libata: fix ata_qc_issue failure path
  [PATCH] ata_piix: fix ich6/m_map_db
  [libata] ahci: add ATI SB600 PCI IDs

18 years ago[PATCH] Document Linux's memory barriers [try #7]
David Howells [Fri, 31 Mar 2006 15:00:29 +0000 (16:00 +0100)]
[PATCH] Document Linux's memory barriers [try #7]

The attached patch documents the Linux kernel's memory barriers.

I've updated it from the comments I've been given.

The per-arch notes sections are gone because it's clear that there are so many
exceptions, that it's not worth having them.

I've added a list of references to other documents.

I've tried to get rid of the concept of memory accesses appearing on the bus;
what matters is apparent behaviour with respect to other observers in the
system.

Interrupts barrier effects are now considered to be non-existent. They may be
there, but you may not rely on them.

I've added a couple of definition sections at the top of the document: one to
specify the minimum execution model that may be assumed, the other to specify
what this document refers to by the term "memory".

I've made greater mention of the use of mmiowb().

I've adjusted the way in which caches are described, and described the fun
that can be had with cache coherence maintenance being unordered and data
dependency not being necessarily implicit.

I've described (smp_)read_barrier_depends().

I've rearranged the order of the sections, so that memory barriers are
discussed in abstract first, and then described the memory barrier facilities
available on Linux, before going on to more real-world discussions and examples.

I've added information about the lack of memory barriering effects with atomic
ops and bitops.

I've added information about control dependencies.

I've added more diagrams to illustrate caching interactions between CPUs.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] wrong error path in dup_fd() leading to oopses in RCU
Kirill Korotaev [Fri, 31 Mar 2006 13:58:46 +0000 (17:58 +0400)]
[PATCH] wrong error path in dup_fd() leading to oopses in RCU

Wrong error path in dup_fd() - it should return NULL on error,
not an address of already freed memory :/

Triggered by OpenVZ stress test suite.

What is interesting is that it was causing different oopses in RCU like
below:
Call Trace:
   [<c013492c>] rcu_do_batch+0x2c/0x80
   [<c0134bdd>] rcu_process_callbacks+0x3d/0x70
   [<c0126cf3>] tasklet_action+0x73/0xe0
   [<c01269aa>] __do_softirq+0x10a/0x130
   [<c01058ff>] do_softirq+0x4f/0x60
   =======================
   [<c0113817>] smp_apic_timer_interrupt+0x77/0x110
   [<c0103b54>] apic_timer_interrupt+0x1c/0x24
  Code:  Bad EIP value.
   <0>Kernel panic - not syncing: Fatal exception in interrupt

Signed-Off-By: Pavel Emelianov <xemul@sw.ru>
Signed-Off-By: Dmitry Mishin <dim@openvz.org>
Signed-Off-By: Kirill Korotaev <dev@openvz.org>
Signed-Off-By: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] mutex: some cleanups
Nicolas Pitre [Fri, 31 Mar 2006 10:32:13 +0000 (02:32 -0800)]
[PATCH] mutex: some cleanups

Turn some macros into inline functions and add proper type checking as
well as being more readable.  Also a minor comment adjustment.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Decrease number of pointer derefs in jsm_tty.c
Jesper Juhl [Fri, 31 Mar 2006 10:32:12 +0000 (02:32 -0800)]
[PATCH] Decrease number of pointer derefs in jsm_tty.c

Decrease the number of pointer derefs in drivers/serial/jsm/jsm_tty.c

Benefits of the patch:
 - Fewer pointer dereferences should make the code slightly faster.
 - Size of generated code is smaller
 - Improved readability

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: "V. ANANDA KRISHNAN" <mansarov@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fs/namei.c: make lookup_hash() static
Adrian Bunk [Fri, 31 Mar 2006 10:32:11 +0000 (02:32 -0800)]
[PATCH] fs/namei.c: make lookup_hash() static

As announced, lookup_hash() can now become static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] unexport get_wchan
Adrian Bunk [Fri, 31 Mar 2006 10:32:07 +0000 (02:32 -0800)]
[PATCH] unexport get_wchan

The only user of get_wchan is the proc fs - and proc can't be built modular.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: Raid-6 did not create sysfs entries for stripe cache
NeilBrown [Fri, 31 Mar 2006 10:32:06 +0000 (02:32 -0800)]
[PATCH] md: Raid-6 did not create sysfs entries for stripe cache

Signed-off-by: Brad Campbell <brad@wasp.net.au>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: Remove some code that can sleep from under a spinlock
NeilBrown [Fri, 31 Mar 2006 10:32:02 +0000 (02:32 -0800)]
[PATCH] md: Remove some code that can sleep from under a spinlock

And remove the comments that were put in inplace of a fix too....

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: Don't clear bits in bitmap when writing to one device fails during recovery
NeilBrown [Fri, 31 Mar 2006 10:31:57 +0000 (02:31 -0800)]
[PATCH] md: Don't clear bits in bitmap when writing to one device fails during recovery

Currently a device failure during recovery leaves bits set in the bitmap.
This normally isn't a problem as the offending device will be rejected because
of errors.  However if device re-adding is being used with non-persistent
bitmaps, this can be a problem.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fbdev: Remove old radeon driver
Michael Hanselmann [Fri, 31 Mar 2006 10:31:55 +0000 (02:31 -0800)]
[PATCH] fbdev: Remove old radeon driver

This patch removes the old radeon driver which has been replaced by a
newer one.

Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fbcon: Fix big-endian bogosity in slow_imageblit()
Antonino A. Daplas [Fri, 31 Mar 2006 10:31:54 +0000 (02:31 -0800)]
[PATCH] fbcon: Fix big-endian bogosity in slow_imageblit()

The monochrome->color expansion routine that handles bitmaps which have
(widths % 8) != 0 (slow_imageblit) produces corrupt characters in big-endian.
This is caused by a bogus bit test in slow_imageblit().

Fix.

This patch may deserve to go to the stable tree.  The code has already been
well tested in little-endian machines.  It's only in big-endian where there is
uncertainty and Herbert confirmed that this is the correct way to go.

It should not introduce regressions.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Acked-by: Herbert Poetzl <herbert@13thfloor.at>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] pxafb: Minor driver fixes
Richard Purdie [Fri, 31 Mar 2006 10:31:53 +0000 (02:31 -0800)]
[PATCH] pxafb: Minor driver fixes

Fixes for the pxafb driver:

* Return -EINVAL for resolutions that are too large as per framebuffer
  driver policy.

* Increase the error timeout for disabling the LCD controller.  The current
  timeout is sometimes too short on the Sharp Zaurus Cxx00 hardware and an
  extra delay in an error path shouldn't pose any problems.

* Fix a dev reference which causes a compile error when DEBUG is defined.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] backlight: corgi_bl: Generalise to support other Sharp SL hardware
Richard Purdie [Fri, 31 Mar 2006 10:31:51 +0000 (02:31 -0800)]
[PATCH] backlight: corgi_bl: Generalise to support other Sharp SL hardware

Generalise the Corgi backlight driver by moving the default intensity and
limit mask settings into the platform specific data structure.  This enables
the driver to support other Zaurus hardware, specifically the SL-6000x (Tosa)
model.

Also change the spinlock to a mutex (the spinlock is overkill).

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] backlight: HP Jornada 680 Backlight driver updates/fixes
Richard Purdie [Fri, 31 Mar 2006 10:31:50 +0000 (02:31 -0800)]
[PATCH] backlight: HP Jornada 680 Backlight driver updates/fixes

Updates to the HP Jornada 680 Backlight driver:

- Correct the suspend/resume functions so the driver compiles
  (SUSPEND_POWER_DOWN/RESUME_POWER_ON no longer exist).

- Convert the driver to match the recent platform device changes.

- Replace the unsafe static struct platform_device with dynamic allocation.

- Convert the driver to the new backlight code.

This has not been tested on a device due to lack of hardware but wouldn't
compile beforehand.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] backlight: Backlight Class Improvements
Richard Purdie [Fri, 31 Mar 2006 10:31:49 +0000 (02:31 -0800)]
[PATCH] backlight: Backlight Class Improvements

Backlight class attributes are currently easy to implement incorrectly.
Moving certain handling into the backlight core prevents this whilst at the
same time makes the drivers simpler and consistent.  The following changes are
included:

The brightness attribute only sets and reads the brightness variable in the
backlight_properties structure.

The power attribute only sets and reads the power variable in the
backlight_properties structure.

Any framebuffer blanking events change a variable fb_blank in the
backlight_properties structure.

The backlight driver has only two functions to implement.  One function is
called when any of the above properties change (to update the backlight
brightness), the second is called to return the current backlight brightness
value.  A new attribute "actual_brightness" is added to return this brightness
as determined by the driver having combined all the above factors (and any
driver/device specific factors).

Additionally, the backlight core takes care of checking the maximum brightness
is not exceeded and of turning off the backlight before device removal.

The corgi backlight driver is updated to reflect these changes.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] w100fb: Add acceleration support to ATI Imageon
Alberto Mardegan [Fri, 31 Mar 2006 10:31:46 +0000 (02:31 -0800)]
[PATCH] w100fb: Add acceleration support to ATI Imageon

Add acceleration support in w100fb.c (i.e.  ATI Imageons) for the copyarea and
fillrect operations.

Signed-off-by: Alberto Mardegan <mardy@users.sourceforge.net>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fbcon: Save current display during initialization
Antonino A. Daplas [Fri, 31 Mar 2006 10:31:45 +0000 (02:31 -0800)]
[PATCH] fbcon: Save current display during initialization

The current display was not saved during initialization.  This leads to hard
to track console corruption, such as a misplaced cursor, which is correctible
by switching consoles.  Fix this minor bug.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] dcache: Add helper d_hash_and_lookup
Eric W. Biederman [Fri, 31 Mar 2006 10:31:43 +0000 (02:31 -0800)]
[PATCH] dcache: Add helper d_hash_and_lookup

It is very common to hash a dentry and then to call lookup.  If we take fs
specific hash functions into account the full hash logic can get ugly.
Further full_name_hash as an inline function is almost 100 bytes on x86 so
having a non-inline choice in some cases can measurably decrease code size.

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>
18 years ago[PATCH] pidhash: Refactor the pid hash table
Eric W. Biederman [Fri, 31 Mar 2006 10:31:42 +0000 (02:31 -0800)]
[PATCH] pidhash: Refactor the pid hash table

Simplifies the code, reduces the need for 4 pid hash tables, and makes the
code more capable.

In the discussions I had with Oleg it was felt that to a large extent the
cleanup itself justified the work.  With struct pid being dynamically
allocated meant we could create the hash table entry when the pid was
allocated and free the hash table entry when the pid was freed.  Instead of
playing with the hash lists when ever a process would attach or detach to a
process.

For myself the fact that it gave what my previous task_ref patch gave for free
with simpler code was a big win.  The problem is that if you hold a reference
to struct task_struct you lock in 10K of low memory.  If you do that in a user
controllable way like /proc does, with an unprivileged but hostile user space
application with typical resource limits of 1000 fds and 100 processes I can
trigger the OOM killer by consuming all of low memory with task structs, on a
machine wight 1GB of low memory.

If I instead hold a reference to struct pid which holds a pointer to my
task_struct, I don't suffer from that problem because struct pid is 2 orders
of magnitude smaller.  In fact struct pid is small enough that most other
kernel data structures dwarf it, so simply limiting the number of referring
data structures is enough to prevent exhaustion of low memory.

This splits the current struct pid into two structures, struct pid and struct
pid_link, and reduces our number of hash tables from PIDTYPE_MAX to just one.
struct pid_link is the per process linkage into the hash tables and lives in
struct task_struct.  struct pid is given an indepedent lifetime, and holds
pointers to each of the pid types.

The independent life of struct pid simplifies attach_pid, and detach_pid,
because we are always manipulating the list of pids and not the hash table.
In addition in giving struct pid an indpendent life it makes the concept much
more powerful.

Kernel data structures can now embed a struct pid * instead of a pid_t and
not suffer from pid wrap around problems or from keeping unnecessarily
large amounts of memory allocated.

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>
18 years ago[PATCH] task: RCU protect task->usage
Eric W. Biederman [Fri, 31 Mar 2006 10:31:37 +0000 (02:31 -0800)]
[PATCH] task: RCU protect task->usage

A big problem with rcu protected data structures that are also reference
counted is that you must jump through several hoops to increase the reference
count.  I think someone finally implemented atomic_inc_not_zero(&count) to
automate the common case.  Unfortunately this means you must special case the
rcu access case.

When data structures are only visible via rcu in a manner that is not
determined by the reference count on the object (i.e.  tasks are visible until
their zombies are reaped) there is a much simpler technique we can employ.
Simply delaying the decrement of the reference count until the rcu interval is
over.

What that means is that the proc code that looks up a task and later
wants to sleep can now do:

rcu_read_lock();
task = find_task_by_pid(some_pid);
if (task) {
get_task_struct(task);
}
rcu_read_unlock();

The effect on the rest of the kernel is that put_task_struct becomes cheaper
and immediate, and in the case where the task has been reaped it frees the
task immediate instead of unnecessarily waiting an until the rcu interval is
over.

Cleanup of task_struct does not happen when its reference count drops to
zero, instead cleanup happens when release_task is called.  Tasks can only
be looked up via rcu before release_task is called.  All rcu protected
members of task_struct are freed by release_task.

Therefore we can move call_rcu from put_task_struct into release_task.  And
we can modify release_task to not immediately release the reference count
but instead have it call put_task_struct from the function it gives to
call_rcu.

The end result:

- get_task_struct is safe in an rcu context where we have just looked
  up the task.

- put_task_struct() simplifies into its old pre rcu self.

This reorganization also makes put_task_struct uncallable from modules as
it is not exported but it does not appear to be called from any modules so
this should not be an issue, and is trivially fixed.

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>
18 years ago[PATCH] cleanup in proc_check_chroot()
Herbert Poetzl [Fri, 31 Mar 2006 10:31:35 +0000 (02:31 -0800)]
[PATCH] cleanup in proc_check_chroot()

proc_check_chroot() does the check in a very unintuitive way (keeping a
copy of the argument, then modifying the argument), and has uncommented
sideeffects.

Signed-off-by: Herbert Poetzl <herbert@13thfloor.at>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] resurrect __put_task_struct
Andrew Morton [Fri, 31 Mar 2006 10:31:34 +0000 (02:31 -0800)]
[PATCH] resurrect __put_task_struct

This just got nuked in mainline.  Bring it back because Eric's patches use it.

Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Make setsid() more robust
Eric W. Biederman [Fri, 31 Mar 2006 10:31:33 +0000 (02:31 -0800)]
[PATCH] Make setsid() more robust

The core problem: setsid fails if it is called by init.  The effect in 2.6.16
and the earlier kernels that have this problem is that if you do a "ps -j 1 or
ps -ej 1" you will see that init and several of it's children have process
group and session == 0.  Instead of process group == session == 1.  Despite
init calling setsid.

The reason it fails is that daemonize calls set_special_pids(1,1) on kernel
threads that are launched before /sbin/init is called.

The only remaining effect in that current->signal->leader == 0 for init
instead of 1.  And the setsid call fails.  No one has noticed because
/sbin/init does not check the return value of setsid.

In 2.4 where we don't have the pidhash table, and daemonize doesn't exist
setsid actually works for init.

I care a lot about pid == 1 not being a special case that we leave broken,
because of the container/jail work that I am doing.

- Carefully allow init (pid == 1) to call setsid despite the kernel using
  its session.

- Use find_task_by_pid instead of find_pid because find_pid taking a
  pidtype is going away.

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>
18 years ago[PATCH] futex: check and validate timevals
Thomas Gleixner [Fri, 31 Mar 2006 10:31:32 +0000 (02:31 -0800)]
[PATCH] futex: check and validate timevals

The futex timeval is not checked for correctness.  The change does not
break existing applications as the timeval is supplied by glibc (and glibc
always passes a correct value), but the glibc-internal tests for this
functionality fail.

Signed-off-by: Thomas Gleixner <tglx@tglx.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sched: activate SCHED BATCH expired
Con Kolivas [Fri, 31 Mar 2006 10:31:29 +0000 (02:31 -0800)]
[PATCH] sched: activate SCHED BATCH expired

To increase the strength of SCHED_BATCH as a scheduling hint we can
activate batch tasks on the expired array since by definition they are
latency insensitive tasks.

Signed-off-by: Con Kolivas <kernel@kolivas.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sched: remove on runqueue requeueing
Con Kolivas [Fri, 31 Mar 2006 10:31:29 +0000 (02:31 -0800)]
[PATCH] sched: remove on runqueue requeueing

On runqueue time is used to elevate priority in schedule().

In the code it currently requeues tasks even if their priority is not
elevated, which would end up placing them at the end of their runqueue
array effectively delaying them instead of improving their priority.

Bug spotted by Mike Galbraith <efault@gmx.de>

This patch removes this requeueing.

Signed-off-by: Con Kolivas <kernel@kolivas.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sched: include noninteractive sleep in idle detect
Con Kolivas [Fri, 31 Mar 2006 10:31:27 +0000 (02:31 -0800)]
[PATCH] sched: include noninteractive sleep in idle detect

Tasks waiting in SLEEP_NONINTERACTIVE state can now get to best priority so
they need to be included in the idle detection code.

Signed-off-by: Con Kolivas <kernel@kolivas.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sched: dont decrease idle sleep avg
Con Kolivas [Fri, 31 Mar 2006 10:31:26 +0000 (02:31 -0800)]
[PATCH] sched: dont decrease idle sleep avg

We watch for tasks that sleep extended periods and don't allow one single
prolonged sleep period from elevating priority to maximum bonus to prevent cpu
bound tasks from getting high priority with single long sleeps.  There is a
bug in the current code that also penalises tasks that already have high
priority.  Correct that bug.

Signed-off-by: Con Kolivas <kernel@kolivas.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sched: make task_noninteractive use sleep_type
Con Kolivas [Fri, 31 Mar 2006 10:31:25 +0000 (02:31 -0800)]
[PATCH] sched: make task_noninteractive use sleep_type

Alterations to the pipe code in the kernel made it possible for relative
starvation to occur with tasks that slept waiting on a pipe getting unfair
priority bonuses even if they were otherwise fully cpu bound so the
TASK_NONINTERACTIVE flag was introduced which prevented any change to
sleep_avg while sleeping waiting on a pipe.  This change also leads to the
converse though, preventing any priority boost from occurring in truly
interactive tasks that wait on pipes.

Convert the TASK_NONINTERACTIVE flag to set sleep_type to SLEEP_NONINTERACTIVE
which will allow a linear bonus to priority based on sleep time thus allowing
interactive tasks to get high priority if they sleep enough.

Signed-off-by: Con Kolivas <kernel@kolivas.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sched: cleanup task_activated()
Con Kolivas [Fri, 31 Mar 2006 10:31:23 +0000 (02:31 -0800)]
[PATCH] sched: cleanup task_activated()

The activated flag in task_struct is used to track different sleep types and
its usage is somewhat obfuscated.  Convert the variable to an enum with more
descriptive names without altering the function.

Signed-off-by: Con Kolivas <kernel@kolivas.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sched: reduce overhead of calc_load
Jack Steiner [Fri, 31 Mar 2006 10:31:21 +0000 (02:31 -0800)]
[PATCH] sched: reduce overhead of calc_load

Currently, count_active_tasks() calls both nr_running() &
nr_interruptible().  Each of these functions does a "for_each_cpu" & reads
values from the runqueue of each cpu.  Although this is not a lot of
instructions, each runqueue may be located on different node.  Depending on
the architecture, a unique TLB entry may be required to access each
runqueue.

Since there may be more runqueues than cpu TLB entries, a scan of all
runqueues can trash the TLB.  Each memory reference incurs a TLB miss &
refill.

In addition, the runqueue cacheline that contains nr_running &
nr_uninterruptible may be evicted from the cache between the two passes.
This causes unnecessary cache misses.

Combining nr_running() & nr_interruptible() into a single function
substantially reduces the TLB & cache misses on large systems.  This should
have no measureable effect on smaller systems.

On a 128p IA64 system running a memory stress workload, the new function
reduced the overhead of calc_load() from 605 usec/call to 324 usec/call.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] hrtimer: call get_softirq_time() only when necessary in run_hrtimer_queue()
Dimitri Sivanich [Fri, 31 Mar 2006 10:31:20 +0000 (02:31 -0800)]
[PATCH] hrtimer: call get_softirq_time() only when necessary in run_hrtimer_queue()

It seems that run_hrtimer_queue() is calling get_softirq_time() more
often than it needs to.

With this patch, it only calls get_softirq_time() if there's a
pending timer.

Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] hrtimer: use generic sleeper for nanosleep
Thomas Gleixner [Fri, 31 Mar 2006 10:31:19 +0000 (02:31 -0800)]
[PATCH] hrtimer: use generic sleeper for nanosleep

Replace the nanosleep private sleeper functionality by the generic hrtimer
sleeper.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] hrtimer: create generic sleeper
Thomas Gleixner [Fri, 31 Mar 2006 10:31:17 +0000 (02:31 -0800)]
[PATCH] hrtimer: create generic sleeper

The removal of the data field in the hrtimer structure enforces the
embedding of the timer into another data structure.  nanosleep now uses a
private implementation of the most common used timer callback function
(simple task wakeup).

In order to avoid the reimplentation of such functionality all over the
place a generic hrtimer_sleeper functionality is created.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] LED: Add IDE disk activity LED trigger
Richard Purdie [Fri, 31 Mar 2006 10:31:16 +0000 (02:31 -0800)]
[PATCH] LED: Add IDE disk activity LED trigger

Add an LED trigger for IDE disk activity to the ide-disk driver.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Ensure ide-taskfile calls any driver specific end_request function
Richard Purdie [Fri, 31 Mar 2006 10:31:15 +0000 (02:31 -0800)]
[PATCH] Ensure ide-taskfile calls any driver specific end_request function

Ensure ide-taskfile.c calls any driver specific end_request function if
present.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] LED: add NAND MTD activity LED trigger
Richard Purdie [Fri, 31 Mar 2006 10:31:14 +0000 (02:31 -0800)]
[PATCH] LED: add NAND MTD activity LED trigger

Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] LED: add device support for tosa
Dirk Opfer [Fri, 31 Mar 2006 10:31:12 +0000 (02:31 -0800)]
[PATCH] LED: add device support for tosa

Adds LED drivers for LEDs found on the Sharp Zaurus c6000 model (tosa).

Signed-off-by: Dirk Opfer <dirk@opfer-online.de>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] LED: add LED device support for ixp4xx devices
John Bowler [Fri, 31 Mar 2006 10:31:11 +0000 (02:31 -0800)]
[PATCH] LED: add LED device support for ixp4xx devices

NEW_LEDS support for ixp4xx boards where LEDs are connected to the GPIO lines.

This includes a new generic ixp4xx driver (leds-ixp4xx-gpio.c name
"IXP4XX-GPIO-LED")

Signed-off-by: John Bowler <jbowler@acm.org>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] LED: add LED device support for locomo devices
Richard Purdie [Fri, 31 Mar 2006 10:31:10 +0000 (02:31 -0800)]
[PATCH] LED: add LED device support for locomo devices

Adds an LED driver for LEDs exported by the Sharp LOCOMO chip as found on some
models of Sharp Zaurus.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] LED: add LED device support for the zaurus corgi and spitz models
Richard Purdie [Fri, 31 Mar 2006 10:31:09 +0000 (02:31 -0800)]
[PATCH] LED: add LED device support for the zaurus corgi and spitz models

Adds LED drivers for LEDs found on the Sharp Zaurus c7x0 (corgi, shepherd,
husky) and cxx00 (akita, spitz, borzoi) models.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] LED: add sharp charger status LED trigger
Richard Purdie [Fri, 31 Mar 2006 10:31:08 +0000 (02:31 -0800)]
[PATCH] LED: add sharp charger status LED trigger

Add an LED trigger for the charger status as found on the Sharp Zaurus series
of devices.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Pavel Machek <pavel@suse.cz>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] LED: add LED timer trigger
Richard Purdie [Fri, 31 Mar 2006 10:31:07 +0000 (02:31 -0800)]
[PATCH] LED: add LED timer trigger

Add an example of a complex LED trigger in the form of a generic timer which
triggers the LED its attached to at a user specified frequency and duty cycle.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] LED: add LED trigger tupport
Richard Purdie [Fri, 31 Mar 2006 10:31:05 +0000 (02:31 -0800)]
[PATCH] LED: add LED trigger tupport

Add support for LED triggers to the LED subsystem.  "Triggers" are events
which change the state of an LED.  Two kinds of trigger are available, simple
ones which can be added to exising code with minimum disruption and complex
ones for implementing new or more complex functionality.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] LED: add LED class
Richard Purdie [Fri, 31 Mar 2006 10:31:04 +0000 (02:31 -0800)]
[PATCH] LED: add LED class

Add the foundations of a new LEDs subsystem.  This patch adds a class which
presents LED devices within sysfs and allows their brightness to be
controlled.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] LED: class documentation
Richard Purdie [Fri, 31 Mar 2006 10:31:03 +0000 (02:31 -0800)]
[PATCH] LED: class documentation

The LED class/subsystem takes John Lenz's work and extends and alters it to
give what I think should be a fairly universal LED implementation.

The series consists of several logical units:

* LED Core + Class implementation
* LED Trigger Core implementation
* LED timer trigger (example of a complex trigger)
* LED device drivers for corgi, spitz and tosa Zaurus models
* LED device driver for locomo LEDs
* LED device driver for ARM ixp4xx LEDs
* Zaurus charging LED trigger
* IDE disk activity LED trigger
* NAND MTD activity LED trigger

Why?
====

LEDs are really simple devices usually amounting to a GPIO that can be turned
on and off so why do we need all this code?  On handheld or embedded devices
they're an important part of an often limited user interface.  Both users and
developers want to be able to control and configure what the LED does and the
number of different things they'd potentially want the LED to show is large.

A subsystem is needed to try and provide all this different functionality in
an architecture independent, simple but complete, generic and scalable manner.

The alternative is for everyone to implement just what they need hidden away
in different corners of the kernel source tree and to provide an inconsistent
interface to userspace.

Other Implementations
=====================

I'm aware of the existing arm led implementation.  Currently the new subsystem
and the arm code can coexist quite happily.  Its up to the arm community to
decide whether this new interface is acceptable to them.  As far as I can see,
the new interface can do everything the existing arm implementation can with
the advantage that the new code is architecture independent and much more
generic, configurable and scalable.

I'm prepared to make the conversion to the LED subsystem (or assist with it)
if appropriate.

Implementation Details
======================

I've stripped a lot of code out of John's original LED class.  Colours were
removed as LED colour is now part of the device name.  Multiple colours are to
be handled as multiple led devices.  This means you get full control over each
colour.  I also removed the LED hardware timer code as the generic timer isn't
going to add much overhead and is just as useful.  I also decided to have the
LED core track the current LED status (to ease suspend/resume handling)
removing the need for brightness_get implementations in the LED drivers.

An underlying design philosophy is simplicity.  The aim is to keep a small
amount of code giving as much functionality as possible.

The major new idea is the led "trigger".  A trigger is a source of led events.
 Triggers can either be simple or complex.  A simple trigger isn't
configurable and is designed to slot into existing subsystems with minimal
additional code.  Examples are the ide-disk, nand-disk and zaurus-charging
triggers.  With leds disabled, the code optimises away.  Examples are
nand-disk and ide-disk.

Complex triggers whilst available to all LEDs have LED specific parameters and
work on a per LED basis.  The timer trigger is an example.

You can change triggers in a similar manner to the way an IO scheduler is
chosen (via /sys/class/leds/somedevice/trigger).

So far there are only a handful of examples but it should easy to add further
LED triggers without too much interference into other subsystems.

Known Issues
============

The LED Trigger core cannot be a module as the simple trigger functions would
cause nightmare dependency issues.  I see this as a minor issue compared to
the benefits the simple trigger functionality brings.  The rest of the LED
subsystem can be modular.

Some leds can be programmed to flash in hardware.  As this isn't a generic LED
device property, I think this should be exported as a device specific sysfs
attribute rather than part of the class if this functionality is required (eg.
 to keep the led flashing whilst the device is suspended).

Future Development
==================

At the moment, a trigger can't be created specifically for a single LED.
There are a number of cases where a trigger might only be mappable to a
particular LED.  The addition of triggers provided by the LED driver should
cover this option and be possible to add without breaking the current
interface.

A CPU activity trigger similar to that found in the arm led implementation
should be trivial to add.

This patch:

Add some brief documentation of the design decisions behind the LED class and
how it appears to users.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] modules: permit Dual-MIT/GPL licenses
Andrew Morton [Fri, 31 Mar 2006 10:30:59 +0000 (02:30 -0800)]
[PATCH] modules: permit Dual-MIT/GPL licenses

One of the LEDs driver files wants to use this.

Probably drivers/mtd/maps/ipaq-flash.c wants to convert as well - right now
it'll be tainting the kernel.

Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Bowler <jbowler@acm.org>
Cc: "'Richard Purdie'" <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] vt: add TIOCL_GETKMSGREDIRECT
Rafael J. Wysocki [Fri, 31 Mar 2006 10:30:58 +0000 (02:30 -0800)]
[PATCH] vt: add TIOCL_GETKMSGREDIRECT

Add TIOCL_GETKMSGREDIRECT needed by the userland suspend tool to get the
current value of kmsg_redirect from the kernel so that it can save it and
restore it after resume.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] ISDN: fix a few memory leaks in sc_ioctl()
Jesper Juhl [Fri, 31 Mar 2006 10:30:57 +0000 (02:30 -0800)]
[PATCH] ISDN: fix a few memory leaks in sc_ioctl()

Fix a few memory leaks in drivers/isdn/sc/ioctl.c::sc_ioctl()

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] drivers/char/[i]stallion: Clean up kmalloc usage
Tobias Klauser [Fri, 31 Mar 2006 10:30:56 +0000 (02:30 -0800)]
[PATCH] drivers/char/[i]stallion: Clean up kmalloc usage

Delete two useless kmalloc wrappers and use kmalloc/kzalloc.  Some weird
NULL checks are also simplified.

Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fs/locks.c: Fix sys_flock() race
Trond Myklebust [Fri, 31 Mar 2006 10:30:55 +0000 (02:30 -0800)]
[PATCH] fs/locks.c: Fix sys_flock() race

sys_flock() currently has a race which can result in a double free in the
multi-thread case.

Thread 1 Thread 2

sys_flock(file, LOCK_EX)
sys_flock(file, LOCK_UN)

If Thread 2 removes the lock from inode->i_lock before Thread 1 tests for
list_empty(&lock->fl_link) at the end of sys_flock, then both threads will
end up calling locks_free_lock for the same lock.

Fix is to make flock_lock_file() do the same as posix_lock_file(), namely
to make a copy of the request, so that the caller can always free the lock.

This also has the side-effect of fixing up a reference problem in the
lockd handling of flock.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] inotify: IN_DELETE events missing
Amy Griffis [Fri, 31 Mar 2006 10:30:54 +0000 (02:30 -0800)]
[PATCH] inotify: IN_DELETE events missing

IN_DELETE events are no longer generated for the removal of a file from a
watched directory.

This seems to be a result of clearing DCACHE_INOTIFY_PARENT_WATCHED in
d_delete() directly before calling fsnotify_nameremove().

Assuming the flag doesn't need to be cleared before dentry_iput(), this
should do the trick.

Signed-off-by: Amy Griffis <amy.griffis@hp.com>
Cc: John McCutchan <ttb@tentacle.dhs.org>
Acked-by: Robert Love <rml@novell.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] fat: kill reserved names
OGAWA Hirofumi [Fri, 31 Mar 2006 10:30:53 +0000 (02:30 -0800)]
[PATCH] fat: kill reserved names

Since these names on old MSDOS is used as device, so, current fat driver
doesn't allow a user to create those names.  But many OSes and even Windows
can create those names actually, now.

This patch removes the reserved name check.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] cpuset: memory migration interaction fix
Paul Jackson [Fri, 31 Mar 2006 10:30:52 +0000 (02:30 -0800)]
[PATCH] cpuset: memory migration interaction fix

Fix memory migration so that it works regardless of what cpuset the invoking
task is in.

If a task invoked a memory migration, by doing one of:

       1) writing a different nodemask to a cpuset 'mems' file, or

       2) writing a tasks pid to a different cpuset's 'tasks' file,
          where the cpuset had its 'memory_migrate' option turned on, then the
          allocation of the new pages for the migrated task(s) was constrained
          by the invoking tasks cpuset.

If this task wasn't in a cpuset that allowed the requested memory nodes, the
memory migration would happen to some other nodes that were in that invoking
tasks cpuset.  This was usually surprising and puzzling behaviour: Why didn't
the pages move?  Why did the pages move -there-?

To fix this, temporarilly change the invoking tasks 'mems_allowed' task_struct
field to the nodes the migrating tasks is moving to, so that new pages can be
allocated there.

Signed-off-by: Paul Jackson <pj@sgi.com>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] cpuset: unsafe mm reference fix
Paul Jackson [Fri, 31 Mar 2006 10:30:51 +0000 (02:30 -0800)]
[PATCH] cpuset: unsafe mm reference fix

Fix unsafe reference to a tasks mm struct, by moving the reference inside of a
convenient nearby properly guarded code block.

Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] cpuset: task_lock comment fix
Paul Jackson [Fri, 31 Mar 2006 10:30:50 +0000 (02:30 -0800)]
[PATCH] cpuset: task_lock comment fix

Fix cpuset comment involving case of a tasks cpuset pointer being NULL.
Thanks to "the_top_cpuset_hack", this code no longer sees NULL task->cpuset
pointers.

Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] make local_t signed
Andrew Morton [Fri, 31 Mar 2006 10:30:49 +0000 (02:30 -0800)]
[PATCH] make local_t signed

local_t's were defined to be unsigned.  This increases confusion because
atomic_t's are signed.  The patch goes through and changes all implementations
to use signed longs throughout.

Also, x86-64 was using 32-bit quantities for the value passed into local_add()
and local_sub().  Fixed.

All (actually, both) existing users have been audited.

(Also s/__inline__/inline/ in x86_64/local.h)

Cc: Andi Kleen <ak@muc.de>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Cc: Kyle McMartin <kyle@parisc-linux.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>