]> git.hungrycats.org Git - linux/log
linux
22 years ago[PATCH] inode time update funnies in ncpfs
Christoph Hellwig [Tue, 24 Aug 2004 04:45:25 +0000 (21:45 -0700)]
[PATCH] inode time update funnies in ncpfs

ncfpfs seems to update inode times by hand everywhere instead of using
the proper helpers.  This means:

 - the atime updates in mmap() and read() seems to miss various checks
   upodate_atime or one of the wrappers does.  Also it doesn't mark the
   inode dirty.
 - in write() you update mtime and _a_time instead of ctime as expected,
   also the usual checks and optimizations are missing.

In addition the fops contain some bogus checks like for a refular file (but
the fops are only used of ISREG files) and inode->i_sb although that is
guranteed to be non-zero.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] show Active/Inactive on per-node meminfo
Akinobu Mita [Tue, 24 Aug 2004 04:45:14 +0000 (21:45 -0700)]
[PATCH] show Active/Inactive on per-node meminfo

  The patch below enable to display the size of Active/Inactive pages on
  per-node meminfo (/sys/devices/system/node/node%d/meminfo) like
  /proc/meminfo.

  By a little change to procps, "vmstat -a" can show these statistics about
  particular node.

From: mita akinobu <amgta@yacht.ocn.ne.jp>

  get_zone_counts() is used by max_sane_readahead(), and
  max_sane_readahead() is often called in filemap_nopage().

Signed-off-by: Akinobu Mita <amgta@yacht.ocn.ne.jp>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Fix bad URL in BSD acct help entry
Tim Schmielau [Tue, 24 Aug 2004 04:45:02 +0000 (21:45 -0700)]
[PATCH] Fix bad URL in BSD acct help entry

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] /dev/random: Remove RNDGETPOOL ioctl
Theodore Y. Ts'o [Tue, 24 Aug 2004 04:44:50 +0000 (21:44 -0700)]
[PATCH] /dev/random: Remove RNDGETPOOL ioctl

Recently, someone has kvetched that RNDGETPOOL is a "security
vulnerability".  Never mind that it is superuser only, and with superuser
privs you could load a nasty kernel module, or read the entropy pool out of
/dev/mem directly, but they are nevertheless still spreading FUD.

In any case, no one is using it (it was there for debugging purposes only),
so we can remove it as dead code.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] /dev/random: Use separate entropy store for /dev/urandom
Theodore Y. Ts'o [Tue, 24 Aug 2004 04:44:39 +0000 (21:44 -0700)]
[PATCH] /dev/random: Use separate entropy store for /dev/urandom

This patch adds a separate pool for use with /dev/urandom.  This prevents a
/dev/urandom read from being able to completely drain the entropy in the
/dev/random pool, and also makes it much more difficult for an attacker to
carry out a state extension attack.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] /dev/random: Add pool name to entropy store
Theodore Y. Ts'o [Tue, 24 Aug 2004 04:44:27 +0000 (21:44 -0700)]
[PATCH] /dev/random: Add pool name to entropy store

This adds a pool name to the entropy_store data structure, which simplifies
the debugging code, and makes the code more generic for adding additional
entropy pools.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] dev/random: Fix latency in rekeying sequence number
Theodore Y. Ts'o [Tue, 24 Aug 2004 04:44:18 +0000 (21:44 -0700)]
[PATCH] dev/random: Fix latency in rekeying sequence number

Based on reports from Ingo's Latency Tracer that the TCP sequence number
rekey code is causing latency problems, I've moved the sequence number
rekey to be done out of a workqueue.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] file_ra_state_init speedup
Andrew Morton [Tue, 24 Aug 2004 04:44:06 +0000 (21:44 -0700)]
[PATCH] file_ra_state_init speedup

Marcelo points out that this function's main caller already memsets the
structure, so avoid doing it again.

Also, an earlier knfsd patch withdrew file_ra_state_init()'s other caller, so
unexport this function.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Firmware Loader is orphan
Ramón Rey Vicente [Tue, 24 Aug 2004 04:43:55 +0000 (21:43 -0700)]
[PATCH] Firmware Loader is orphan

The author and maintainer of the firmware loader died in May.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ad1816 sound driver web page and email address
Thorsten Knabe [Tue, 24 Aug 2004 04:43:44 +0000 (21:43 -0700)]
[PATCH] ad1816 sound driver web page and email address

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ext3 documentation
Diego Calleja García [Tue, 24 Aug 2004 04:43:32 +0000 (21:43 -0700)]
[PATCH] ext3 documentation

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] remove read-only/immutable checks from fat_truncate
Hirofumi Ogawa [Tue, 24 Aug 2004 04:43:21 +0000 (21:43 -0700)]
[PATCH] remove read-only/immutable checks from fat_truncate

From: Christoph Hellwig <hch@lst.de>

There's two callers:

 - the truncate path via notify_change, ->setattr, vmtruncate.  We
   already check for permissions here at the upper level
 - fat_delete_inode.  This one looks bogus to me - even if we delete
   an read-only or immutable inode we want to free the space allocated
   by it, else you leak disk blocks.

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>
22 years ago[PATCH] Update ACI MIXER DRIVER webpage
Ramón Rey Vicente [Tue, 24 Aug 2004 04:43:09 +0000 (21:43 -0700)]
[PATCH] Update ACI MIXER DRIVER webpage

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] /proc/PID/cmdline truncates arguments early
Olaf Kirch [Tue, 24 Aug 2004 04:42:57 +0000 (21:42 -0700)]
[PATCH] /proc/PID/cmdline truncates arguments early

We received a bug report that /proc/PID/cmdline only shows argv[0] if the
total length of all arguments exceeds PAGE_SIZE.  The problem is that
proc_pid_cmdline checks for the presence of a NUL byte at the end of the
args list, and assumes that the application did a setproctitle if there's
any other character.

OTOH proc_pid_cmdline will read just the first PAGE_SIZE worth of arguments
at most, and if you have more arguments, it's quite likely that there won't
be a NUL byte at offset PAGE_SIZE-1.

The attached patch fixes this.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] i386-unbusy-tss cleanup
Zachary Amsden [Tue, 24 Aug 2004 04:42:46 +0000 (21:42 -0700)]
[PATCH] i386-unbusy-tss cleanup

The TSS no longer needs to be unbusied before loading the task register, since
the set_tss_desc macros set the system gate type to Available IA-32 TSS.  This
obscure, uncommented legacy code can now be removed for better readability and
saves 20 bytes of code space.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] fix bio_uncopy_user() mem leak
Kurt Garloff [Tue, 24 Aug 2004 04:42:34 +0000 (21:42 -0700)]
[PATCH] fix bio_uncopy_user() mem leak

  When using bounce buffers for SG_IO commands with unaligned buffers in
  blk_rq_map_user(), we should free the pages from blk_rq_unmap_user() which
  calls bio_uncopy_user() for the non-BIO_USER_MAPPED case.  That function
  failed to free the pages for write requests.

  So we leaked pages and you machine would go OOM.  Rebooting helped ;-)

  This bug was triggered by writing audio CDs (but not on data CDs), as the
  audio frames are not aligned well (2352 bytes), so the user pages don't just
  get mapped.

  Bug was reported by Mathias Homan and debugged by Chris Mason + me.  (Jens
  is away.)

From: Chris Mason <mason@suse.com>

  Fix the leak for real

Signed-off-by: Kurt Garloff <garloff@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] s390: zfcp host adapter
Martin Schwidefsky [Tue, 24 Aug 2004 04:42:22 +0000 (21:42 -0700)]
[PATCH] s390: zfcp host adapter

From: Heiko Carstens <heiko.carstens@de.ibm.com>
From: Andreas Herrmann <aherrman@de.ibm.com>
From: Maxim Shchetynin <maxim@de.ibm.com>

zfcp host adapter changes:
 - Use predefined macro to create in_recovery sysfs attributes.
 - Add function to check CT_IU response.
 - Fix handling of rejected ELS commands.
 - Change return value of zfcp_fsf_req_sbal_get to -ERESTARTSYS in some cases.
 - Return proper error code if control file upload/download failed.
 - Remove dead code.
 - Avoid sparse warnings.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] s390: core changes
Martin Schwidefsky [Tue, 24 Aug 2004 04:42:10 +0000 (21:42 -0700)]
[PATCH] s390: core changes

From: Jan Glauber <jan.glauber@de.ibm.com>
From: Martin Schwidefsky <schwidefsky@de.ibm.com>

s390 core changes:
 - Use copy_siginfo_from_user32 instead of copy_from_user to get the
   siginfo structure in sys32_rt_sigqueueinfo.
 - Remove prototype for non-existant stop_timers function.
 - Regenerate default configuration.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] fix permissions on the `tainted' sysctl
Rusty Russell [Tue, 24 Aug 2004 04:41:58 +0000 (21:41 -0700)]
[PATCH] fix permissions on the `tainted' sysctl

From: Arjan van de Ven <arjanv@redhat.com>

The patch below sets the tainted sysctl file to read only, otherwise
userspace can just overwrite/reset it.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] typo in laptop_mode.txt
Pavel Machek [Tue, 24 Aug 2004 04:41:47 +0000 (21:41 -0700)]
[PATCH] typo in laptop_mode.txt

This patch is thanks to pavouk.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Coding style: do_this(a,b) vs. do_this(a, b)
Pavel Machek [Tue, 24 Aug 2004 04:41:35 +0000 (21:41 -0700)]
[PATCH] Coding style: do_this(a,b) vs. do_this(a, b)

Coding style document is not consistent with itself on whether there
should be space after ","... This makes it standardize on ", " option.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] fix 4K ext2fs support in 2.6 initrd's
Eric W. Biederman [Tue, 24 Aug 2004 04:41:24 +0000 (21:41 -0700)]
[PATCH] fix 4K ext2fs support in 2.6 initrd's

The ramdisk_blocksize option has been broken for quite a while in 2.6.
Making an initrd with a 4K ext2 filesystem impossible to use.

After digging into this, the problem turned out to that rd.c was not
setting the hard sector size.  There were a few secondary problems like
i_blkbits was not being set, and the number KiB in uncompressed ext2 images
was not taking into account the block size.

I have also corrected the surrounding comments as they were not just
incorrect but misleading.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] compat_do_execve() fix
Olaf Hering [Tue, 24 Aug 2004 04:41:13 +0000 (21:41 -0700)]
[PATCH] compat_do_execve() fix

For some reasons ls -l /proc/$$/exe doesnt work all time for me,
with 2.6.8.1 on ppc64. Sometimes it does, sometimes not. No pattern.
A few printks show that this check in proc_pid_readlink() triggers
an -EACCES:

current->fsuid != inode->i_uid

proc_pid_readlink(755) error -13 ntptrace(11408) fsuid 100 i_uid 0 0
sys_readlink(281) ntptrace(11408) error -13 readlink

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Add pci dependencies to drivers/media/dvb/ttpci/Kconfig
Cornelia Huck [Tue, 24 Aug 2004 04:41:02 +0000 (21:41 -0700)]
[PATCH] Add pci dependencies to drivers/media/dvb/ttpci/Kconfig

The drivers under drivers/media/dvb/ttpci depend on pci (especially since
they select VIDEO_SAA7146, which depends on pci).

Signed-off-by: Cornelia Huck <kernel@cornelia-huck.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] remove last suser() call from drivers/char/rocket.c
Maximilian Attems [Tue, 24 Aug 2004 04:40:50 +0000 (21:40 -0700)]
[PATCH] remove last suser() call from drivers/char/rocket.c

Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Reduce SELinux kernel memory use on 64-bit systems
James Morris [Tue, 24 Aug 2004 04:40:38 +0000 (21:40 -0700)]
[PATCH] Reduce SELinux kernel memory use on 64-bit systems

The patch below reduces kernel memory used by SELinux policy rules by about
37% on 64-bit systems.  This is because the size of struct avtab_node is 40
bytes on 64-bit, and defaults to a size-64 slab.

Creating a slab cache specifically for these structs saves considerable
amounts of kernel memory on 64-bit systems with large rulesets.  'Strict'
policy has over 300k rules, while 'targeted' policy has around 3k rules.

Here's the slabtop output with 64 and 40 byte sized slabs to show the
memory savings, for strict policy:

303475 303447  99%    0.06K   4975       61     19900K avtab_node
303456 303447  99%    0.04K   3161       96     12644K avtab_node

Also, there are 57% more objects per slab.

Signed-off-by: James Morris <jmorris@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] SELinux: fix name_bind audit
Stephen D. Smalley [Tue, 24 Aug 2004 04:40:27 +0000 (21:40 -0700)]
[PATCH] SELinux: fix name_bind audit

This patch restores the proper auditing behavior for the name_bind check.

Author:  James Morris <jmorris@redhat.com>
Signed-off-by: Stephen Smalley <sds@epoch.ncsc.mil>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] SElinux; defer inode security initialization
Stephen D. Smalley [Tue, 24 Aug 2004 04:40:15 +0000 (21:40 -0700)]
[PATCH] SElinux; defer inode security initialization

This patch defers setting the inode security state for newly created inodes
until after policy has been loaded.

Signed-off-by: Stephen Smalley <sds@epoch.ncsc.mil>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] SELinux: revalidate access to controlling tty
Stephen D. Smalley [Tue, 24 Aug 2004 04:40:03 +0000 (21:40 -0700)]
[PATCH] SELinux: revalidate access to controlling tty

This patch changes the SELinux flush_unauthorized_files function to also
recheck access to the controlling tty and reset it if it is no longer
accessible under the new security context.  This patch is relative to the
selinuxfs devnull patch.

Signed-off-by: Stephen Smalley <sds@epoch.ncsc.mil>
Signed-off-by: James Morris <jmorris@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] SELinux: add null device node to selinuxfs, remove open_devnull
Stephen D. Smalley [Tue, 24 Aug 2004 04:39:52 +0000 (21:39 -0700)]
[PATCH] SELinux: add null device node to selinuxfs, remove open_devnull

This patch adds a null device node to selinuxfs and replaces the SELinux
open_devnull() code by simply acquiring a reference to this node each time,
based on a comment by Al Viro on lkml (see
http://marc.theaimsgroup.com/?l=linux-kernel&m=108664922032035&w=2).

Signed-off-by: Stephen Smalley <sds@epoch.ncsc.mil>
Signed-off-by: James Morris <jmorris@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Fix access of files up to 4 GB support for ISO9660 filesystems
Jeff Mahoney [Tue, 24 Aug 2004 04:39:40 +0000 (21:39 -0700)]
[PATCH] Fix access of files up to 4 GB support for ISO9660 filesystems

Since the filesystem doesn't explicitly set s->s_maxbytes, seeks will fail
beyond 2^32-1, due to s->s_maxbytes being set to the default of
MAX_NON_LFS.

Attached is the quick one liner fix.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] reiserfs: xattr/acl fixes
Jeff Mahoney [Tue, 24 Aug 2004 04:39:28 +0000 (21:39 -0700)]
[PATCH] reiserfs: xattr/acl fixes

Here are a few fixes for bugs noticed on reiserfs-list or our own bugzilla.

Attached is a patch that fixes several problems with xattrs/acls:
[SECURITY] Fixes the inode not getting dirtied when mode is set
           via setxattr()
[CORRECTNESS] Fixes the inode not getting ctime updated when an xattr is
              removed
[DATA] Fixes an issue with dcache hash colliding names in the filesystem
       root caused by the d_compare to hide .reiserfs_priv. The bug
       can only occur in the filesystem root, which is why we haven't
       seen many (any, outside of the suse bugzilla, afaik) reports on
       this. The results are that dcache operations on colliding entries
       in the fs root will choose the first match rather than the
       correct entry.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] synclink_cs.c: replace syncppp with genhdlc
Paul Fulghum [Tue, 24 Aug 2004 04:39:17 +0000 (21:39 -0700)]
[PATCH] synclink_cs.c: replace syncppp with genhdlc

Replace syncppp interface with generic HDLC interface.  Generic HDLC
provides superset of syncppp function.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] synclinkmp.c: replace syncppp with genhdlc
Paul Fulghum [Tue, 24 Aug 2004 04:39:05 +0000 (21:39 -0700)]
[PATCH] synclinkmp.c: replace syncppp with genhdlc

Replace syncppp interface with generic HDLC interface.  Generic HDLC
provides superset of syncppp function.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] synclink.c: replace syncppp with genhdlc
Paul Fulghum [Tue, 24 Aug 2004 04:38:55 +0000 (21:38 -0700)]
[PATCH] synclink.c: replace syncppp with genhdlc

Replace syncppp interface with generic HDLC interface.  Generic HDLC
provides superset of syncppp function.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Move param section out of init area, for export of built-in module params
Rusty Russell [Tue, 24 Aug 2004 04:38:43 +0000 (21:38 -0700)]
[PATCH] Move param section out of init area, for export of built-in module params

When exporting the module parameters of built-in modules, we need to access
the respective struct kernel_parameters.  Currently, they're freed at init
time, and obviously this can't continue to be done.  So, move them out of
__init_begin and __init_end and into RODATA in asm-generic/vmlinux.lds.h.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (modified)
Signed-off-by: Dominik Brodowski <linux@brodo.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Fix Permissions on module_param Usage
Rusty Russell [Tue, 24 Aug 2004 04:38:29 +0000 (21:38 -0700)]
[PATCH] Fix Permissions on module_param Usage

module_param() and family take a "perms" argument; several people have
incorrectly used "644" instead of "0644".

(I have a patch which checks for sane perms at compile time, but it bloats
modules, so I haven't included it.)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (authored)
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Centralize i386 Constants
Rusty Russell [Tue, 24 Aug 2004 04:38:17 +0000 (21:38 -0700)]
[PATCH] Centralize i386 Constants

__FIXADDR_TOP and PAGE_OFFSET are hardcoded in various places.  I had to
change it to run the kernel under qemu-fast, so I wanted to centralize
them.

To do this, we rename vsyscall.lds to vsyscall.lds.s, and generate it from
vsyscall.lds.S.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (created)
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Read cpumasks every time when exporting through sysfs
Rusty Russell [Tue, 24 Aug 2004 04:34:21 +0000 (21:34 -0700)]
[PATCH] Read cpumasks every time when exporting through sysfs

Paul Jackson points out that the sysfs code saves a node's cpumask in the
sysfs node, although it can change with CPU hotplug.  Don't do this.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] remove cacheline alignment from inode slabs
Anton Blanchard [Tue, 24 Aug 2004 04:34:08 +0000 (21:34 -0700)]
[PATCH] remove cacheline alignment from inode slabs

Most of the inode slabs are cacheline aligned.  This can waste a fair
amount of memory, especially on architectures with large cacheline sizes
(eg 128 bytes).

Alignment has a few advantages.  It prevents 2 cpus from accessing 2 data
structures in the same cacheline.  Since struct inodes are well over a
cacheline and there are so many of them, there is little chance we will hit
this problem if we remove the alignment.

Alignment also ensures the maximum amount of the data structure is in the
same cacheline (instead of straddling 2 for example).  The large size of
struct inode reduces this advantage.

With this patch the inode_cache slab goes from 640 bytes to 544 bytes, and
the number that fits in a 4kB slab goes from 6 to 7 on ppc64.  A number of
other inode slabs also see improvements.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] reduce size of struct dentry on 64bit
Anton Blanchard [Tue, 24 Aug 2004 04:33:55 +0000 (21:33 -0700)]
[PATCH] reduce size of struct dentry on 64bit

Reduce size of struct dentry from 248 to 232 bytes on 64bit.

- Reduce size of qstr by 8 bytes, placing int hash and int len together.
  We gain a further 4 byte saving when qstr is used in struct dentry
  since qstr goes from 24 to 16 bytes and the next member (d_lru)
  requires 8 byte alignment (which means 4 bytes of padding).

- Move d_mounted to the end, since char d_iname[] only requires 1 byte
  alignment. This reduces struct dentry by another 4 bytes.

With these changes the number of objects we can fit into a 4kB slab
goes from 16 to 17 on ppc64.

Note the above assumes the architecture naturally aligns types.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] reduce size of struct buffer_head on 64bit
Anton Blanchard [Tue, 24 Aug 2004 04:33:43 +0000 (21:33 -0700)]
[PATCH] reduce size of struct buffer_head on 64bit

Reduce size of buffer_head from 96 to 88 bytes on 64bit architectures by
putting b_count and b_size together.  b_count will still be in the first 16
bytes on 32bit architectures, so 16 byte cacheline machines shouldnt be
affected.

With this change the number of objects per 4kB slab goes up from 40 to 44
on ppc64.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Fix ttyS0 vs. ttyS00 confusion
Pavel Machek [Tue, 24 Aug 2004 04:33:32 +0000 (21:33 -0700)]
[PATCH] Fix ttyS0 vs. ttyS00 confusion

According to devices.txt, serial ports are reffered as ttyS0 (and not
ttyS00).  It would be nice to use that convention in printks, too.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] use simple_read_from_buffer in proc_info_read and proc_pid_attr_read
Chris Wright [Tue, 24 Aug 2004 04:33:20 +0000 (21:33 -0700)]
[PATCH] use simple_read_from_buffer in proc_info_read and proc_pid_attr_read

Use simple_read_from_buffer in proc_info_read and proc_pid_attr_read.  Viro
had ack'd this earlier.

Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Stephen Smalley <sds@epoch.ncsc.mil>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] use simple_read_from_buffer in selinuxfs
Chris Wright [Tue, 24 Aug 2004 04:33:08 +0000 (21:33 -0700)]
[PATCH] use simple_read_from_buffer in selinuxfs

Use simple_read_from_buffer.  This also eliminates page allocation for the
sprintf buffer.  Switch to get_zeroed_page instead of open-coding it.  Viro
had ack'd this earlier.  Still applies w/ the transaction update.

Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Stephen Smalley <sds@epoch.ncsc.mil>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Fix typos in security/security.c
Chris Wright [Tue, 24 Aug 2004 04:32:57 +0000 (21:32 -0700)]
[PATCH] Fix typos in security/security.c

Fix typos in security/security.c.

From: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] configurable SELinux bootparam value
Chris Wright [Tue, 24 Aug 2004 04:32:45 +0000 (21:32 -0700)]
[PATCH] configurable SELinux bootparam value

Add configure option for setting default SELinux bootparam value.  Ack'd by
James Morris.

Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] small simplification for two SECURITY dependencies
Chris Wright [Tue, 24 Aug 2004 04:32:33 +0000 (21:32 -0700)]
[PATCH] small simplification for two SECURITY dependencies

I'd suggest the patch below to let the SECURITY_CAPABILITIES and
SECURITY_ROOTPLUG dependencies look a bit more simple.

Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] fix some comments about epoch in arch/alpha/kernel/time.c
Christoph Hellwig [Tue, 24 Aug 2004 04:32:21 +0000 (21:32 -0700)]
[PATCH] fix some comments about epoch in arch/alpha/kernel/time.c

(from the Debian kernel package)

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ppc32: remove dead CONFIG_KERNEL_ELF Kconfig entry
Christoph Hellwig [Tue, 24 Aug 2004 04:32:10 +0000 (21:32 -0700)]
[PATCH] ppc32: remove dead CONFIG_KERNEL_ELF Kconfig entry

We don't allow non-ELF kernels since 2.0 days, and surprisingly this is not
actually checked anywhere.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] BUG() on inconsistant dcache tree in may_delete
Christoph Hellwig [Tue, 24 Aug 2004 04:31:58 +0000 (21:31 -0700)]
[PATCH] BUG() on inconsistant dcache tree in may_delete

This can't happen with a sane filesystem (but is triggered by the buggy
clearcase bin only kernel module), so let's better BUG_ON early.

Adopted from Al's patch in the RH tree.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] reduce pty.c ifdef clutter
Christoph Hellwig [Tue, 24 Aug 2004 04:31:47 +0000 (21:31 -0700)]
[PATCH] reduce pty.c ifdef clutter

- build only if either CONFIG_LEGACY_PTYS or CONFIG_UNIX98_PTYS are set
  instead of testing in the file

- try to keep big CONFIG_LEGACY_PTYS and CONFIG_UNIX98_PTYS ifdef blocks
  at the end of the file instead of cluttering all over

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] fix sn_console for CONFIG_SMP=n
Jesse Barnes [Tue, 24 Aug 2004 04:31:37 +0000 (21:31 -0700)]
[PATCH] fix sn_console for CONFIG_SMP=n

I found that sn_console was missing an include and a fix if CONFIG_SMP=n.
This patch fixes up the two small problems I found.

Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] don't print per-cpu delay loop calibration
Jesse Barnes [Tue, 24 Aug 2004 04:31:25 +0000 (21:31 -0700)]
[PATCH] don't print per-cpu delay loop calibration

People are mainly concerned with showing off their total bogomips, not
per-cpu bogomips, so turn it into a KERN_DEBUG message for the benefit of
systems with lots of CPUs.

Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] libfs: move transaction file ops into libfs
James Morris [Tue, 24 Aug 2004 04:31:13 +0000 (21:31 -0700)]
[PATCH] libfs: move transaction file ops into libfs

Below is an updated version of the patch which moves duplicated
transaction-based file operation code into libfs.  Since the last post, the
patch has been through a couple of iterations with Al, who suggested a
number of cleanups including locking and interface simplification.

For filesystem writers, the interface is now much simpler.  The
simple_transaction_get() helper should be part of the file op write method.
 This safely obtains the transaction request data during write(), allocates
a page for it and stores it there.  The data is returned to the caller for
potential further processing, which then makes it available for the next
read() call via simple_transaction_set().  See the selinuxfs and nfsctl
code for examples of use.

Signed-off-by: James Morris <jmorris@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ix86,x86_64 cpu features
Pawel Sikora [Tue, 24 Aug 2004 04:31:02 +0000 (21:31 -0700)]
[PATCH] ix86,x86_64 cpu features

Attached patch fix/add several cpu features.

refs:

[1] Intel Processor Identification and the CPUID instruction
    Application Note 485.
    http://developer.intel.ru/download/design/Xeon/applnots/24161826.pdf

[2] http://www.sandpile.org/ia32/cpuid.htm

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] x86: quieten the "ESR value" printks
Dave Jones [Tue, 24 Aug 2004 04:30:50 +0000 (21:30 -0700)]
[PATCH] x86: quieten the "ESR value" printks

Only print out the ESR value if it changes after enabling vector.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Use posix headers in sumversion.c
Ben Leslie [Tue, 24 Aug 2004 04:30:39 +0000 (21:30 -0700)]
[PATCH] Use posix headers in sumversion.c

When compiling Linux on Mac OSX I had trouble with scripts/sumversion.c.
It includes <netinet/in.h> to obtain to definitions of htonl and ntohl.

On Mac OSX these are found in <arpa/inet.h>.  After checking the POSIX
specification it appears that this is the correct place to get the
definitons for these functions.

(http://www.opengroup.org/onlinepubs/009695399/functions/htonl.html)

Using this header also appears to work on Linux (at least with
Glibc-2.3.2).

It seems clearer to me to go with the POSIX standard than implementing
#if __APPLE__ style macros, but if such an approach is preferred I can
supply patches for that instead.

A patch against 2.6.7 which change <netinet/in.h> -> <arpa/inet.h> is
attached.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Fix get_nodes() mask miscalculation
Brent Casavant [Tue, 24 Aug 2004 04:30:27 +0000 (21:30 -0700)]
[PATCH] Fix get_nodes() mask miscalculation

It appears there is a nodemask miscalculation in the get_nodes() function
in mm/mempolicy.c.  This bug has two effects:

1. It is impossible to specify a length 1 nodemask.
2. It is impossible to specify a nodemask containing the last node.

The following patch has been confirmed to solve both problems.

Signed-off-by: Brent Casavant <bcasavan@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] New cpu_has_ flags
Michal Ludvig [Tue, 24 Aug 2004 04:30:15 +0000 (21:30 -0700)]
[PATCH] New cpu_has_ flags

Add a couple more accessors for xstore features.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] hige2lowuid warning fixes
Paul Jackson [Tue, 24 Aug 2004 04:30:04 +0000 (21:30 -0700)]
[PATCH] hige2lowuid warning fixes

fs/smbfs/inode.c: In function `smb_fill_super':
fs/smbfs/inode.c:563: warning: comparison is always false due to limited range of data type

Unfortunately, this patch uses the notorious "gcc warning suppression by
obfuscation" technique.

What seems to be going on is that the uid and gid convert macros in
include/linux/highuid.h:

#define __convert_uid(size, uid) \
        (size >= sizeof(uid) ? (uid) : high2lowuid(uid))

only call high2lowuid in the case of trying to put a bigger (32 bit, say)
uid/gid in a smaller (16 bit, in this case) word.  Gcc is smart enough to see
that the comparison in high2lowuid() macro is silly if called with a 16 bit
source uid, but not smart enough to understand from the __convert_uid() logic
that this is exactly the case that high2lowuid() won't be called.

So replace the logical "<" operator with the bit op "&~".  This obfuscates
things enough to shut gcc up.

Only build the half-dozen files that use SET_UID/SET_GID, on arch i386 and
ia64.  Only the file fs/smbfs/inode.c showed the warning, both arch's, and
this patch fixed both.  Untested further, past staring at the code long enough
to convince myself the change has no actual affect on the code's results.

Signed-off-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] fix inlining failures
Dave Jones [Tue, 24 Aug 2004 04:29:52 +0000 (21:29 -0700)]
[PATCH] fix inlining failures

arch/i386/mach-generic/summit.c: In function `send_IPI_all':
include/asm/mach-summit/mach_ipi.h:4: sorry, unimplemented: inlining failed in call to 'send_IPI_mask_sequence': function body not available
arch/i386/mach-generic/summit.c:8: sorry, unimplemented: called from here
make[1]: *** [arch/i386/mach-generic/summit.o] Error 1
make: *** [arch/i386/mach-generic] Error 2

arch/i386/mach-generic/bigsmp.c: In function `send_IPI_all':
include/asm/mach-bigsmp/mach_ipi.h:4: sorry, unimplemented: inlining failed in call to 'send_IPI_mask_sequence': function body not available
arch/i386/mach-generic/bigsmp.c:8: sorry, unimplemented: called from here
make[1]: *** [arch/i386/mach-generic/bigsmp.o] Error 1
make: *** [arch/i386/mach-generic] Error 2

arch/i386/mach-generic/es7000.c: In function `send_IPI_all':
include/asm/mach-es7000/mach_ipi.h:4: sorry, unimplemented: inlining failed in call to 'send_IPI_mask_sequence': function body not available
arch/i386/mach-generic/es7000.c:8: sorry, unimplemented: called from here
make[1]: *** [arch/i386/mach-generic/es7000.o] Error 1
make: *** [arch/i386/mach-generic] Error 2

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] apm_info.disabled fix
Pawel Sikora [Tue, 24 Aug 2004 04:29:41 +0000 (21:29 -0700)]
[PATCH] apm_info.disabled fix

This minor fix is required to proper init "APM emulation" on HP-OmniBooks.
(An external patch).  "APM emulation" is very useful if you want to use a tool
which looks into /proc/apm for getting informations about battery charging.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Reduce bkl usage in do_coredump
Josh Aas [Tue, 24 Aug 2004 04:29:29 +0000 (21:29 -0700)]
[PATCH] Reduce bkl usage in do_coredump

A patch that reduces bkl usage in do_coredump.  I don't see anywhere that
it is necessary except for the call to format_corename, which is controlled
via sysctl (sys_sysctl holds the bkl).

Also make format_corename() static.

Signed-off-by: Josh Aas <josha@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Fix warnings in es7000
Andi Kleen [Tue, 24 Aug 2004 04:29:18 +0000 (21:29 -0700)]
[PATCH] Fix warnings in es7000

Fix warnings in es7000.

Otherwise gcc 3.3 complains about too large integer values.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] md: RAID10 module
Neil Brown [Tue, 24 Aug 2004 04:29:06 +0000 (21:29 -0700)]
[PATCH] md: RAID10 module

This patch adds a 'raid10' module which provides features similar to both
raid0 and raid1 in the one array.  Various combinations of layout are
supported.

This code is still "experimental", but appears to work.

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] md: remove most calls to __bdevname from md.c
Neil Brown [Tue, 24 Aug 2004 04:28:54 +0000 (21:28 -0700)]
[PATCH] md: remove most calls to __bdevname from md.c

__bdevname now only prints major/minor number which isn't much help.  So
remove most calls to it from md.c, replacing those that are useful by calls
to bdevname (often printing the message when the error is first detected
rather than higher up the call tree).

Also discard hot_generate_error which doesn't do anything useful and never
has.

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] md: assorted minor md/raid1 fixes
Neil Brown [Tue, 24 Aug 2004 04:28:42 +0000 (21:28 -0700)]
[PATCH] md: assorted minor md/raid1 fixes

1/ rationalise read_balance and "map" in raid1.  Discard map and
   tidyup the interface to read_balance so it can be used instead.

2/ use offsetof rather than a caclulation to find the size of an
   structure with a var-length array at the end.

3/ remove some meaningless #defines

4/ use printk_ratelimit to limit reports of failed sectors being redirected.

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] md: assorted fixes/improvemnet to generic md resync code.
Neil Brown [Tue, 24 Aug 2004 04:28:31 +0000 (21:28 -0700)]
[PATCH] md: assorted fixes/improvemnet to generic md resync code.

1/ Introduce "mddev->resync_max_sectors" so that an md personality
can ask for resync to cover a different address range than that of a
single drive.  raid10 will use this.

2/ fix is_mddev_idle so that if there seem to be a negative number
 of events, it doesn't immediately assume activity.

3/ make "sync_io" (the count of IO sectors used for array resync)
 an atomic_t to avoid SMP races.

4/ Pass md_sync_acct a "block_device" rather than the containing "rdev",
  as the whole rdev isn't needed. Also make this an inline function.

5/ Make sure recovery gets interrupted on any error.

Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] hugetlb: permit executable mappings
William Lee Irwin III [Tue, 24 Aug 2004 04:28:18 +0000 (21:28 -0700)]
[PATCH] hugetlb: permit executable mappings

During the kernel summit, some discussion was had about the support
requirements for a userspace program loader that loads executables into
hugetlb on behalf of a major application (Oracle).  In order to support
this in a robust fashion, the cleanup of the hugetlb must be robust in the
presence of disorderly termination of the programs (e.g.  kill -9).  Hence,
the cleanup semantics are those of System V shared memory, but Linux'
System V shared memory needs one critical extension for this use:
executability.

The following microscopic patch enables this major application to provide
robust hugetlb cleanup.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] x86 PAE swapspace expansion
William Lee Irwin III [Tue, 24 Aug 2004 04:28:07 +0000 (21:28 -0700)]
[PATCH] x86 PAE swapspace expansion

PAE is artificially limited in terms of swapspace to the same bitsplit as
ordinary i386, a 5/24 split (32 swapfiles, 64GB max swapfile size), when a
5/27 split (32 swapfiles, 512GB max swapfile size) is feasible.  This patch
transparently removes that limitation by using more of the space available
in PAE's wider ptes for swap ptes.

While this is obviously not likely to be used directly, it is important
from the standpoint of strict non-overcommit, where the swapspace must be
potentially usable in order to be reserved for non-overcommit.  There are
workloads with Committed_AS of over 256GB on ia32 PAE wanting strict
non-overcommit to prevent being OOM killed.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] fix i386/x86_64 idle routine selection
Zwane Mwaikambo [Tue, 24 Aug 2004 04:27:55 +0000 (21:27 -0700)]
[PATCH] fix i386/x86_64 idle routine selection

This was broken when the mwait stuff went in since it executes after the
initial idle_setup() has already selected an idle routine and overrides it
with default_idle.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Zwane Mwaikambo <zwane@linuxpower.ca>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] remove magic +1 from shm segment count
Manfred Spraul [Tue, 24 Aug 2004 04:27:43 +0000 (21:27 -0700)]
[PATCH] remove magic +1 from shm segment count

Michael Kerrisk found a bug in the shm accounting code: sysv shm allows to
create SHMMNI+1 shared memory segments, instead of SHMMNI segments.  The +1
is probably from the first shared anonymous mapping implementation that
used the sysv code to implement shared anon mappings.

The implementation got replaced, it's now the other way around (sysv uses
the shared anon code), but the +1 remained.

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] OProfile/XScale fixes for PXA270/XScale2
Zwane Mwaikambo [Tue, 24 Aug 2004 04:27:32 +0000 (21:27 -0700)]
[PATCH] OProfile/XScale fixes for PXA270/XScale2

The incorrect mask was being used when writing back to PMNC write-only-zero
bits as well as only ticking the CCNT every 64 processor cycles.  Tested on
IOP331 and PXA270, i'm still looking for XScale1 users...

Signed-off-by: Luca Rossato <l.rossato@tiscali.it>
Signed-off-by: Zwane Mwaikambo <zwane@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] kill CLONE_IDLETASK
William Lee Irwin III [Tue, 24 Aug 2004 04:27:20 +0000 (21:27 -0700)]
[PATCH] kill CLONE_IDLETASK

  The sole remaining usage of CLONE_IDLETASK is to determine whether pid
  allocation should be performed in copy_process().  This patch eliminates
  that last branch on CLONE_IDLETASK in the normal process creation path,
  removes the masking of CLONE_IDLETASK from clone_flags as it's now ignored
  under all circumstances, and furthermore eliminates the symbol
  CLONE_IDLETASK entirely.

From: William Lee Irwin III <wli@holomorphy.com>

  Fix the fork-idle consolidation.  During that consolidation, the generic
  code was made to pass a pointer to on-stack pt_regs that had been memset()
  to 0.  ia64, however, requires a NULL pt_regs pointer argument and
  dispatches on that in its copy_thread() function to do SMP
  trampoline-specific RSE -related setup.  Passing pointers to zeroed pt_regs
  resulted in SMP wakeup -time deadlocks and exceptions.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] sched: consolidate CLONE_IDLETASK masking
William Lee Irwin III [Tue, 24 Aug 2004 04:27:07 +0000 (21:27 -0700)]
[PATCH] sched: consolidate CLONE_IDLETASK masking

Every arch now bears the burden of sanitizing CLONE_IDLETASK out of the
clone_flags passed to do_fork() by userspace.  This patch hoists the
masking of CLONE_IDLETASK out of the system call entrypoints into
do_fork(), and thereby removes some small overheads from do_fork(), as
do_fork() may now assume that CLONE_IDLETASK has been cleared.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] improve speed of freeing bootmem
Josh Aas [Tue, 24 Aug 2004 04:26:54 +0000 (21:26 -0700)]
[PATCH] improve speed of freeing bootmem

Attached is a patch that greatly improves the speed of freeing boot memory.
 On ia64 machines with 2GB or more memory (I didn't test with less, but I
can't imagine there being a problem), the speed improvement is about 75%
for the function free_all_bootmem_core.  This translates to savings on the
order of 1 minute / TB of memory during boot time.  That number comes from
testing on a machine with 512GB, and extrapolating based on profiling of an
unpatched 4TB machine.  For 4 and 8 TB machines, the time spent in this
function is about 1 minutes/TB, which is painful especially given that
there is no indication of what is going on put to the console (this issue
to possibly be addressed later).

The basic idea is to free higher order pages instead of going through every
single one.  Also, some unnecessary atomic operations are done away with
and replaced with non-atomic equivalents, and prefetching is done where it
helps the most.  For a more in-depth discusion of this patch, please see
the linux-ia64 archives (topic is "free bootmem feedback patch").

The patch is originally Tony Luck's, and I added some further optimizations
(non-atomic ops improvements and prefetching).

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Josh Aas <josha@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Fix mpage_readpage() for big requests
Badari Pulavarty [Tue, 24 Aug 2004 04:26:42 +0000 (21:26 -0700)]
[PATCH] Fix mpage_readpage() for big requests

The problem is, if we increase our readhead size arbitrarily (say 2M), we
call mpage_readpages() with 2M and when it tries to allocated a bio enough to
fit 2M it fails, then we kick it back to "confused" code - which does 4K at
a time.

The fix is to ask for the maxium the driver can handle.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] x86: remove hard-coded numbers from ptr_ok()
Roland Dreier [Tue, 24 Aug 2004 04:26:31 +0000 (21:26 -0700)]
[PATCH] x86: remove hard-coded numbers from ptr_ok()

Looks like arch/i386/kernel/doublefault.c is one place in the code that
hardcodes the assumption that PAGE_OFFSET == 0xC0000000.  Here's a patch
that fixes that.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] emu10k1 maintainer update
James Courtier-Dutton [Tue, 24 Aug 2004 04:26:19 +0000 (21:26 -0700)]
[PATCH] emu10k1 maintainer update

Rui Sousa has been unreachable for a long time now, so I have taken over
the emu10k1 project on sf.net.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Correctly handle d_path error returns
Andrea Arcangeli [Tue, 24 Aug 2004 04:26:07 +0000 (21:26 -0700)]
[PATCH] Correctly handle d_path error returns

There's some minor bug in the d_path handling (the nfsd one may not the the
correct fix, there's no failure path for it, so I just terminate the
string, and the last one in the audit subsystem is just a robustness
cleanup if somebody will extend d_path in the future, right now it's a
noop).

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] alloc_pages priority tuning
Andrew Morton [Tue, 24 Aug 2004 04:25:56 +0000 (21:25 -0700)]
[PATCH] alloc_pages priority tuning

Fix up the logic which decides when the caller can dip into page reserves.

- If the caller has realtime scheduling policy, or if the caller cannot run
  direct reclaim, then allow the caller to use up to a quarter of the page
  reserves.

- If the caller has __GFP_HIGH then allow the caller to use up to half of
  the page reserves.

- If the caller has PF_MEMALLOC then the caller can use 100% of the page
  reserves.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] vm: alloc_pages watermark fixes
Nick Piggin [Tue, 24 Aug 2004 04:25:44 +0000 (21:25 -0700)]
[PATCH] vm: alloc_pages watermark fixes

Previously the ->protection[] logic was broken.  It was difficult to follow
and basically didn't use the asynch reclaim watermarks (pages_min,
pages_low, pages_high) properly.

Now use ->protection *only* for lower-zone protection.  So the allocator
now explicitly uses the ->pages_low, ->pages_min watermarks and adds
->protection on top of that, instead of trying to use ->protection for
everything.

Pages are allocated down to (->pages_low + ->protection), once this is
reached, kswapd the background reclaim is started; after this, we can
allocate down to (->pages_min + ->protection) without blocking; the memory
below pages_min is reserved for __GFP_HIGH and PF_MEMALLOC allocations.
kswapd attempts to reclaim memory until ->pages_high is reached.

Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] vm: writeout watermark tuning
Nick Piggin [Tue, 24 Aug 2004 04:25:33 +0000 (21:25 -0700)]
[PATCH] vm: writeout watermark tuning

Slightly change the writeout watermark calculations so we keep background
and synchronous writeout watermarks in the same ratios after adjusting them
for the amout of mapped memory.  This ensures we should always attempt to
start background writeout before synchronous writeout and preserves the
admin's desired background-versus-forground ratios after we've
auto-adjusted one of them.

Signed-off-by: Nick Piggin <nickpiggin@cyberone.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] simple fs stop -ve dentries
Hugh Dickins [Tue, 24 Aug 2004 04:25:21 +0000 (21:25 -0700)]
[PATCH] simple fs stop -ve dentries

A tmpfs user reported increasingly slow directory reads when repeatedly
creating and unlinking in a mkstemp-like way.  The negative dentries
accumulate alarmingly (until memory pressure finally frees them), and are
just a hindrance to any in-memory filesystem.  simple_lookup set d_op to
arrange for negative dentries to be deleted immediately.

(But I failed to discover how it is that on-disk filesystems seem to keep
their negative dentries within manageable bounds: this effect was gross
with tmpfs or ramfs, but no problem at all with extN or reiser.)

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] clarify get_task_mm (mmgrab)
Hugh Dickins [Tue, 24 Aug 2004 04:25:09 +0000 (21:25 -0700)]
[PATCH] clarify get_task_mm (mmgrab)

Clarify mmgrab by collapsing it into get_task_mm (in fork.c not inline),
and commenting on the special case it is guarding against: when use_mm in
an AIO daemon temporarily adopts the mm while it's on its way out.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] x86 bitops.h commentary on instruction reordering
Marcelo Tosatti [Tue, 24 Aug 2004 04:24:57 +0000 (21:24 -0700)]
[PATCH] x86 bitops.h commentary on instruction reordering

Back when we were discussing the need for a memory barrier in sync_page(),
it came to me (thanks Andrea!) that the bit operations can be perfectly
reordered on architectures other than x86.

I think the commentary on i386 bitops.h is misleading, its worth to note
that that these operations are not guaranteed not to be reordered on
different architectures.

clear_bit() already does that:

 * clear_bit() is atomic and may not be reordered.  However, it does
 * not contain a memory barrier, so if it is used for locking purposes,
 * you should call smp_mb__before_clear_bit() and/or smp_mb__after_clear_bit()
 * in order to ensure changes are visible on other processors.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] rmaplock: swapoff use anon_vma
Hugh Dickins [Tue, 24 Aug 2004 04:24:46 +0000 (21:24 -0700)]
[PATCH] rmaplock: swapoff use anon_vma

Swapoff can make good use of a page's anon_vma and index, while it's still
left in swapcache, or once it's brought back in and the first pte mapped back:
unuse_vma go directly to just one page of only those vmas with the same
anon_vma.  And unuse_process can skip any vmas without an anon_vma (extending
the hugetlb check: hugetlb vmas have no anon_vma).

This just hacks in on top of the existing procedure, still going through all
the vmas of all the mms in mmlist.  A more elegant procedure might replace
mmlist by a list of anon_vmas: but that would be more work to implement, with
apparently more overhead in the common paths.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] rmaplock: mm lock ordering
Hugh Dickins [Tue, 24 Aug 2004 04:24:34 +0000 (21:24 -0700)]
[PATCH] rmaplock: mm lock ordering

With page_map_lock out of the way, there's no need for page_referenced and
try_to_unmap to use trylocks - provided we switch anon_vma->lock and
mm->page_table_lock around in anon_vma_prepare.  Though I suppose it's
possible that we'll find that vmscan makes better progress with trylocks than
spinning - we're free to choose trylocks again if so.

Try to update the mm lock ordering documentation in filemap.c.  But I still
find it confusing, and I've no idea of where to stop.  So add an mm lock
ordering list I can understand to rmap.c.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] rmaplock: SLAB_DESTROY_BY_RCU
Hugh Dickins [Tue, 24 Aug 2004 04:24:22 +0000 (21:24 -0700)]
[PATCH] rmaplock: SLAB_DESTROY_BY_RCU

With page_map_lock gone, how to stabilize page->mapping's anon_vma while
acquiring anon_vma->lock in page_referenced_anon and try_to_unmap_anon?

The page cannot actually be freed (vmscan holds reference), but however much
we check page_mapped (which guarantees that anon_vma is in use - or would
guarantee that if we added suitable barriers), there's no locking against page
becoming unmapped the instant after, then anon_vma freed.

It's okay to take anon_vma->lock after it's freed, so long as it remains a
struct anon_vma (its list would become empty, or perhaps reused for an
unrelated anon_vma: but no problem since we always check that the page located
is the right one); but corruption if that memory gets reused for some other
purpose.

This is not unique: it's liable to be problem whenever the kernel tries to
approach a structure obliquely.  It's generally solved with an atomic
reference count; but one advantage of anon_vma over anonmm is that it does not
have such a count, and it would be a backward step to add one.

Therefore...  implement SLAB_DESTROY_BY_RCU flag, to guarantee that such a
kmem_cache_alloc'ed structure cannot get freed to other use while the
rcu_read_lock is held i.e.  preempt disabled; and use that for anon_vma.

Fix concerns raised by Manfred: this flag is incompatible with poisoning and
destructor, and kmem_cache_destroy needs to synchronize_kernel.

I hope SLAB_DESTROY_BY_RCU may be useful elsewhere; but though it's safe for
little anon_vma, I'd be reluctant to use it on any caches whose immediate
shrinkage under pressure is important to the system.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] rmaplock: kill page_map_lock
Hugh Dickins [Tue, 24 Aug 2004 04:24:11 +0000 (21:24 -0700)]
[PATCH] rmaplock: kill page_map_lock

The pte_chains rmap used pte_chain_lock (bit_spin_lock on PG_chainlock) to
lock its pte_chains.  We kept this (as page_map_lock: bit_spin_lock on
PG_maplock) when we moved to objrmap.  But the file objrmap locks its vma tree
with mapping->i_mmap_lock, and the anon objrmap locks its vma list with
anon_vma->lock: so isn't the page_map_lock superfluous?

Pretty much, yes.  The mapcount was protected by it, and needs to become an
atomic: starting at -1 like page _count, so nr_mapped can be tracked precisely
up and down.  The last page_remove_rmap can't clear anon page mapping any
more, because of races with page_add_rmap; from which some BUG_ONs must go for
the same reason, but they've served their purpose.

vmscan decisions are naturally racy, little change there beyond removing
page_map_lock/unlock.  But to stabilize the file-backed page->mapping against
truncation while acquiring i_mmap_lock, page_referenced_file now needs page
lock to be held even for refill_inactive_zone.  There's a similar issue in
acquiring anon_vma->lock, where page lock doesn't help: which this patch
pretends to handle, but actually it needs the next.

Roughly 10% cut off lmbench fork numbers on my 2*HT*P4.  Must confess my
testing failed to show the races even while they were knowingly exposed: would
benefit from testing on racier equipment.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] rmaplock: PageAnon in mapping
Hugh Dickins [Tue, 24 Aug 2004 04:23:59 +0000 (21:23 -0700)]
[PATCH] rmaplock: PageAnon in mapping

First of a batch of five patches to eliminate rmap's page_map_lock, replace
its trylocking by spinlocking, and use anon_vma to speed up swapoff.

Patches updated from the originals against 2.6.7-mm7: nothing new so I won't
spam the list, but including Manfred's SLAB_DESTROY_BY_RCU fixes, and omitting
the unuse_process mmap_sem fix already in 2.6.8-rc3.

This patch:

Replace the PG_anon page->flags bit by setting the lower bit of the pointer in
page->mapping when it's anon_vma: PAGE_MAPPING_ANON bit.

We're about to eliminate the locking which kept the flags and mapping in
synch: it's much easier to work on a local copy of page->mapping, than worry
about whether flags and mapping are in synch (though I imagine it could be
done, at greater cost, with some barriers).

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Fix /proc/pid/statm documentation
Roger Luethi [Tue, 24 Aug 2004 04:23:48 +0000 (21:23 -0700)]
[PATCH] Fix /proc/pid/statm documentation

I really wanted /proc/pid/statm to die and I still believe the
reasoning is valid.  As it doesn't look like that is going to happen,
though, I offer this fix for the respective documentation.  Note: lrs/drs
fields are switched.

Signed-off-by: Roger Luethi <rl@hellgate.ch>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Automatically enable bigsmp on big HP machines
Arjan van de Ven [Tue, 24 Aug 2004 04:23:35 +0000 (21:23 -0700)]
[PATCH] Automatically enable bigsmp on big HP machines

This enables apic=bigsmp automatically on some big HP machines that need
it.  This makes them boot without kernel parameters on a generic arch
kernel.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] ia64: dma_mapping fix
William Lee Irwin III [Tue, 24 Aug 2004 04:23:25 +0000 (21:23 -0700)]
[PATCH] ia64: dma_mapping fix

We need to be able to dereference struct device in
include/asm-ia64/dma-mapping.h.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] md: make MD no device warning KERN_WARNING
Andi Kleen [Tue, 24 Aug 2004 04:23:14 +0000 (21:23 -0700)]
[PATCH] md: make MD no device warning KERN_WARNING

Prevents some noise during boot up when no MD volumes are found.

I think I picked it up from someone else, but I cannot remember from whom
(sorry)

Cc: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] Make MAX_INIT_ARGS 32
Pete Zaitcev [Tue, 24 Aug 2004 04:23:04 +0000 (21:23 -0700)]
[PATCH] Make MAX_INIT_ARGS 32

We at Red Hat shipped a larger number of arguments for quite some time, it
was required for installations on IBM mainframe (s390), which doesn't have
a good way to pass arguments.

There are a number of reasonable situations that go past the current limits
of 8.  One that comes to mind is when you want to perform a manual vnc
install on a headless machine using anaconda.  This requires passing in a
number of parameters to get anaconda past the initial (no-gui) loader
screens.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] AIO: workqueue context switch reduction
Suparna Bhattacharya [Tue, 24 Aug 2004 04:22:52 +0000 (21:22 -0700)]
[PATCH] AIO: workqueue context switch reduction

From: Chris Mason

I compared the 2.6 pipetest results with the 2.4 suse kernel, and 2.6 was
roughly 40% slower.  During the pipetest run, 2.6 generates ~600,000
context switches per second while 2.4 generates 30 or so.

aio-context-switch (attached) has a few changes that reduces our context
switch rate, and bring performance back up to 2.4 levels.  These have only
really been tested against pipetest, they might make other workloads worse.

The basic theory behind the patch is that it is better for the userland
process to call run_iocbs than it is to schedule away and let the worker
thread do it.

1) on io_submit, use run_iocbs instead of run_iocb
2) on io_getevents, call run_iocbs if no events were available.

3) don't let two procs call run_iocbs for the same context at the same
   time.  They just end up bouncing on spinlocks.

The first three optimizations got me down to 360,000 context switches per
second, and they help build a little structure to allow optimization #4,
which uses queue_delayed_work(HZ/10) instead of queue_work.

That brings down the number of context switches to 2.4 levels.

Adds aio_run_all_iocbs so that normal processes can run all the pending
retries on the run list.  This allows worker threads to keep using list
splicing, but regular procs get to run the list until it stays empty.  The
end result should be less work for the worker threads.

I was able to trigger short stalls (1sec) with aio-stress, and with the
current patch they are gone.  Could be wishful thinking on my part though,
please let me know how this works for you.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] AIO: Splice runlist for fairness across io contexts
Suparna Bhattacharya [Tue, 24 Aug 2004 04:22:40 +0000 (21:22 -0700)]
[PATCH] AIO: Splice runlist for fairness across io contexts

This patch tries be a little fairer across multiple io contexts in handling
retries, helping make sure progress happens uniformly across different io
contexts (especially if they are acting on independent queues).

It splices the ioctx runlist before processing it in __aio_run_iocbs.  If
new iocbs get added to the ctx in meantime, it queues a fresh workqueue
entry instead of handling them righaway, so that other ioctxs' retries get
a chance to be processed before the newer entries in the queue.

This might make a difference in a situation where retries are getting
queued very fast on one ioctx, while the workqueue entry for another ioctx
is stuck behind it.  I've only seen this occasionally earlier and can't
recreate it consistently, but may be worth including anyway.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
22 years ago[PATCH] AIO: retry infrastructure fixes and enhancements
Suparna Bhattacharya [Tue, 24 Aug 2004 04:22:28 +0000 (21:22 -0700)]
[PATCH] AIO: retry infrastructure fixes and enhancements

From: Daniel McNeil <daniel@osdl.org>
From: Chris Mason <mason@suse.com>

 AIO: retry infrastructure fixes and enhancements

 Reorganises, comments and fixes the AIO retry logic. Fixes
 and enhancements include:

   - Split iocb setup and execution in io_submit
        (also fixes io_submit error reporting)
   - Use aio workqueue instead of keventd for retries
   - Default high level retry methods
   - Subtle use_mm/unuse_mm fix
   - Code commenting
   - Fix aio process hang on EINVAL (Daniel McNeil)
   - Hold the context lock across unuse_mm
   - Acquire task_lock in use_mm()
   - Allow fops to override the retry method with their own
   - Elevated ref count for AIO retries (Daniel McNeil)
   - set_fs needed when calling use_mm
   - Flush workqueue on __put_ioctx (Chris Mason)
   - Fix io_cancel to work with retries (Chris Mason)
   - Read-immediate option for socket/pipe retry support

 Note on default high-level retry methods support
 ================================================

 High-level retry methods allows an AIO request to be executed as a series of
 non-blocking iterations, where each iteration retries the remaining part of
 the request from where the last iteration left off, by reissuing the
 corresponding AIO fop routine with modified arguments representing the
 remaining I/O.  The retries are "kicked" via the AIO waitqueue callback
 aio_wake_function() which replaces the default wait queue entry used for
 blocking waits.

 The high level retry infrastructure is responsible for running the
 iterations in the mm context (address space) of the caller, and ensures that
 only one retry instance is active at a given time, thus relieving the fops
 themselves from having to deal with potential races of that sort.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>