GitHub/MotorolaMobilityLLC/kernel-slsi.git
17 years ago[HRTIMER] Fix cpu pointer arg to clockevents_notify()
David Miller [Tue, 17 Jul 2007 00:17:44 +0000 (17:17 -0700)]
[HRTIMER] Fix cpu pointer arg to clockevents_notify()

All of the clockevent notifiers expect a pointer to
an "unsigned int" cpu argument, but hrtimer_cpu_notify()
passes in a pointer to a long.

[ Discussed with and ok by Thomas Gleixner ]

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMake BLK_DEV_BSG depend strictly on SCSI=y
Linus Torvalds [Mon, 16 Jul 2007 23:52:44 +0000 (16:52 -0700)]
Make BLK_DEV_BSG depend strictly on SCSI=y

The SCSI code can be compiled modular, but BLK_DEV_BSG currently cannot,
and depends on the SCSI layer.  So make sure that it depends on the SCSI
layer being compiled in, not just available as a module.

Noticed by Jeff Garzik and S.Çağlar Onur.

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: S.Çağlar Onur <caglar@pardus.org.tr>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMake check_signature depend on CONFIG_HAS_IOMEM
Linus Torvalds [Mon, 16 Jul 2007 23:50:01 +0000 (16:50 -0700)]
Make check_signature depend on CONFIG_HAS_IOMEM

This should avoid build problems on architectures without a "readb()",
that got bitten by check_signature() being uninlined.

Noted by Heiko Carstens.

Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoRevert "[NET]: Fix races in net_rx_action vs netpoll."
Linus Torvalds [Mon, 16 Jul 2007 21:31:08 +0000 (14:31 -0700)]
Revert "[NET]: Fix races in net_rx_action vs netpoll."

This reverts commit 29578624e354f56143d92510fff33a8b2aaa2c03.

Ingo Molnar reports complete breakage with his e1000 card (no
networking, card reports transmit timeouts), and bisected it down to
this commit.  Let's figure out what went wrong, but not keep breaking
machines until we do.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Olaf Kirch <olaf.kirch@oracle.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'drm-patches' of ssh://master.kernel.org/pub/scm/linux/kernel/git/airlie...
Linus Torvalds [Mon, 16 Jul 2007 19:15:50 +0000 (12:15 -0700)]
Merge branch 'drm-patches' of ssh:///linux/kernel/git/airlied/drm-2.6

* 'drm-patches' of ssh://master.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm: remove core typedefs from the ioc32 wrappers
  drm: remove sarea typedefs
  drm: detypedef the hashtab and more of sman
  drm: de-typedef sman
  drm: detypedeffing continues...
  drm: detypef waitlist/freelist/buf_entry/device_dma/drm_queue structs
  drm: drop drm_vma_entry_t, drm_magic_entry_t
  drm: drop drm_buf_t typedef
  drm: fixup other drivers for typedef removals
  drm: remove drm_file_t, drm_device_t and drm_head_t typedefs
  drm: remove a bunch of typedefs on the userspace interface
  r300: updates register header
  radeon: add support for vblank on crtc2
  drm: cleanup list initialisation
  drm: fix typo on code drm getsarea
  drm: remove DRM_GETSAREA and replace with drm_getsarea function
  drm: cleanup use of Linux list handling macros

17 years agoutime(s): Honour CAP_FOWNER when times==NULL
Satyam Sharma [Mon, 16 Jul 2007 18:54:23 +0000 (00:24 +0530)]
utime(s): Honour CAP_FOWNER when times==NULL

do_utimes() does not honour CAP_FOWNER when times==NULL.
Trivial and obvious one-line fix.

Signed-off-by: Satyam Sharma <ssatyam@cse.iitk.ac.in>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix too few arguments to function `scsi_cmd_ioctl'
S.Çağlar Onur [Mon, 16 Jul 2007 18:56:51 +0000 (21:56 +0300)]
Fix too few arguments to function `scsi_cmd_ioctl'

This corrects the following compile error introduced by the merge of the
new bsg layer in commit e245befce7af0a1e1347079ed62695b059594bd4:

  caglar@zangetsu linux-2.6 $ make
    CHK     include/linux/version.h
    CHK     include/linux/utsrelease.h
    CALL    scripts/checksyscalls.sh
    CHK     include/linux/compile.h
    LD      drivers/block/built-in.o
    CC [M]  drivers/block/cciss.o
  drivers/block/cciss.c: In function `cciss_ioctl':
  drivers/block/cciss.c:1173: warning: passing arg 2 of `scsi_cmd_ioctl' from incompatible pointer type
  drivers/block/cciss.c:1173: warning: passing arg 3 of `scsi_cmd_ioctl' makes pointer from integer without a cast
  drivers/block/cciss.c:1173: warning: passing arg 4 of `scsi_cmd_ioctl' makes integer from pointer without a cast
  drivers/block/cciss.c:1173: error: too few arguments to function `scsi_cmd_ioctl'
  ...
  make[2]: *** [drivers/block/cciss.o] Hata 1
  make[1]: *** [drivers/block] Hata 2
  make: *** [drivers] Hata 2

Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix LDM for new field in the VOL5 VBLK.
Anton Altaparmakov [Mon, 16 Jul 2007 18:39:02 +0000 (19:39 +0100)]
Fix LDM for new field in the VOL5 VBLK.

Teach LDM about a new field encountered with Windows Vista.

This fixes LDM for people using Vista who have disabled drive letter
assignment from one or more volumes.  Doing this introduces a so far
unknown field in the LDM database in the VOL5 VBLK structure which
causes the LDM driver to fail to parse the VBLK structure and hence LDM
fails to parse the disk altogether.  This patch teaches the driver about
this field.

Thanks got to Ashton Mills <amills@iinet.com.au> for reporting the
problem and working with me on getting it fixed.  It is now working for
him.

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
CC: Richard Russon <ldm@flatcap.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoRemove duplicate comments from sysctl.c
Linus Torvalds [Mon, 16 Jul 2007 18:50:38 +0000 (11:50 -0700)]
Remove duplicate comments from sysctl.c

Randy Dunlap noticed that the recent comment clarifications from Andrew
had somehow gotten duplicated.  Quoth Andrew: "hm, that could have been
some late-night reject-fixing."

Fix it up.

Cc: From: Andrew Morton <akpm@linux-foundation.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix new generic block device SG compile
Linus Torvalds [Mon, 16 Jul 2007 18:18:23 +0000 (11:18 -0700)]
Fix new generic block device SG compile

We had a merge issue with the "dentry" field going away from the
kobject, and being replaced by a sysfs_dirent field (named "sd")
instead.  That broke the BSG compile.

Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
Linus Torvalds [Mon, 16 Jul 2007 18:02:49 +0000 (11:02 -0700)]
Merge git://git./linux/kernel/git/mingo/linux-2.6-sched

* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
  [PATCH] sched: fix up fs/proc/array.c whitespace problems
  [PATCH] sched: prettify prio_to_wmult[]
  [PATCH] sched: document prio_to_wmult[]
  [PATCH] sched: improve weight-array comments
  [PATCH] sched: remove dead code from task_stime()

Fixed up trivial conflict in fs/proc/array.c

17 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
Linus Torvalds [Mon, 16 Jul 2007 17:52:55 +0000 (10:52 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2: (32 commits)
  [PATCH] ocfs2: zero_user_page conversion
  ocfs2: Support xfs style space reservation ioctls
  ocfs2: support for removing file regions
  ocfs2: update truncate handling of partial clusters
  ocfs2: btree support for removal of arbirtrary extents
  ocfs2: Support creation of unwritten extents
  ocfs2: support writing of unwritten extents
  ocfs2: small cleanup of ocfs2_write_begin_nolock()
  ocfs2: btree changes for unwritten extents
  ocfs2: abstract btree growing calls
  ocfs2: use all extent block suballocators
  ocfs2: plug truncate into cached dealloc routines
  ocfs2: simplify deallocation locking
  ocfs2: harden buffer check during mapping of page blocks
  ocfs2: shared writeable mmap
  ocfs2: factor out write aops into nolock variants
  ocfs2: rework ocfs2_buffered_write_cluster()
  ocfs2: take ip_alloc_sem during entire truncate
  ocfs2: Add "preferred slot" mount option
  [KJ PATCH] Replacing memset(<addr>,0,PAGE_SIZE) with clear_page() in fs/ocfs2/dlm/dlmrecovery.c
  ...

17 years agoMerge branch 'bsg' of git://git.kernel.dk/data/git/linux-2.6-block
Linus Torvalds [Mon, 16 Jul 2007 17:50:19 +0000 (10:50 -0700)]
Merge branch 'bsg' of git://git.kernel.dk/data/git/linux-2.6-block

* 'bsg' of git://git.kernel.dk/data/git/linux-2.6-block: (25 commits)
  bsg: Kconfig updates
  bsg: add SCSI transport-level request support
  bsg: add bidi support
  add a struct request pointer to the request structure
  bsg: fix the deadlock on discarding done commands
  bsg: fix a blocking read bug
  bsg: minor bug fixes
  improve bsg device allocation
  bind bsg to all SCSI devices
  bsg: bind bsg to request_queue instead of gendisk
  bsg: add a request_queue argument to scsi_cmd_ioctl()
  bsg: simplify __bsg_alloc_command failpath
  bsg: add cheasy error checks for sysfs stuff
  Add queue resizing support
  Replace s32, u32 and u64 with __s32, __u32 and __u64 in bsg.h for userspace
  bsg: silence a bogus gcc warning
  bsg: style cleanup
  bsg: use u32 etc instead of uint32_t
  bsg: add SG_IO to SG v4
  bsg: replace SG v3 with SG v4
  ...

17 years agoMerge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block
Linus Torvalds [Mon, 16 Jul 2007 17:48:20 +0000 (10:48 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block

* 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block:
  splice: direct splicing updates ppos twice
  more ACSI removal
  umem: Fix match of pci_ids in umem driver
  umem: Remove references to dead CONFIG_MM_MAP_MEMORY variable
  remove the documentation for the legacy CDROM drivers

17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Mon, 16 Jul 2007 17:45:23 +0000 (10:45 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/sparc-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: (26 commits)
  [SPARC64]: Fix UP build.
  [SPARC64]: dr-cpu unconfigure support.
  [SERIAL]: Fix console write locking in sparc drivers.
  [SPARC64]: Give more accurate errors in dr_cpu_configure().
  [SPARC64]: Clear cpu_{core,sibling}_map[] in smp_fill_in_sib_core_maps()
  [SPARC64]: Fix leak when DR added cpu does not bootup.
  [SPARC64]: Add ->set_affinity IRQ handlers.
  [SPARC64]: Process dr-cpu events in a kthread instead of workqueue.
  [SPARC64]: More sensible udelay implementation.
  [SPARC64]: SMP build fixes.
  [SPARC64]: mdesc.c needs linux/mm.h
  [SPARC64]: Fix build regressions added by dr-cpu changes.
  [SPARC64]: Unconditionally register vio_bus_type.
  [SPARC64]: Initial LDOM cpu hotplug support.
  [SPARC64]: Fix setting of variables in LDOM guest.
  [SPARC64]: Fix MD property lifetime bugs.
  [SPARC64]: Abstract out mdesc accesses for better MD update handling.
  [SPARC64]: Use more mearningful names for IRQ registry.
  [SPARC64]: Initial domain-services driver.
  [SPARC64]: Export powerd facilities for external entities.
  ...

17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Mon, 16 Jul 2007 17:32:02 +0000 (10:32 -0700)]
Merge /pub/scm/linux/kernel/git/lethal/sh-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: (68 commits)
  sh: sh-rtc support for SH7709.
  sh: Revert __xdiv64_32 size change.
  sh: Update r7785rp defconfig.
  sh: Export div symbols for GCC 4.2 and ST GCC.
  sh: fix race in parallel out-of-tree build
  sh: Kill off dead mach.c for hp6xx.
  sh: hd64461.h cleanup and added comments.
  sh: Update the alignment when 4K stacks are used.
  sh: Add a .bss.page_aligned section for 4K stacks.
  sh: Don't let SH-4A clobber SH-4 CFLAGS.
  sh: Add parport stub for SuperIO ports.
  sh: Drop -Wa,-dsp for DSP tuning.
  sh: Update dreamcast defconfig.
  fb: pvr2fb: A few more __devinit annotations for PCI.
  fb: pvr2fb: Fix up section mismatch warnings.
  sh: Select IPR-IRQ for SH7091.
  sh: Correct __xdiv64_32/div64_32 return value size.
  sh: Fix timer-tmu build for SH-3.
  sh: Add cpu and mach links to CLEAN_FILES.
  sh: Preliminary support for the SH-X3 CPU.
  ...

17 years agofat: Fix the race of read/write the FAT12 entry
OGAWA Hirofumi [Mon, 16 Jul 2007 00:40:05 +0000 (09:40 +0900)]
fat: Fix the race of read/write the FAT12 entry

FAT12 entry is 12bits, so it needs 2 phase to update the value.  And
writer and reader access it without any lock, so reader can get the
half updated value.

This fixes the long standing race condition by adding a global
spinlock to only FAT12 for avoiding any impact against FAT16/32.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agocpwatchdog build fix
Andrew Morton [Mon, 16 Jul 2007 06:42:03 +0000 (23:42 -0700)]
cpwatchdog build fix

sparc64:

drivers/sbus/char/cpwatchdog.c: In function `wd_toggleintr':
drivers/sbus/char/cpwatchdog.c:523: error: implicit declaration of function `readb'
drivers/sbus/char/cpwatchdog.c:533: error: implicit declaration of function `writeb'
drivers/sbus/char/cpwatchdog.c: In function `wd_pingtimer':
drivers/sbus/char/cpwatchdog.c:545: error: implicit declaration of function `readw'
drivers/sbus/char/cpwatchdog.c: In function `wd_starttimer':
drivers/sbus/char/cpwatchdog.c:584: error: implicit declaration of function `writew'
drivers/sbus/char/cpwatchdog.c: In function `wd_init':
drivers/sbus/char/cpwatchdog.c:767: error: implicit declaration of function `ioremap'
drivers/sbus/char/cpwatchdog.c:767: warning: assignment makes pointer from integer without a cast
drivers/sbus/char/cpwatchdog.c: In function `wd_cleanup':
drivers/sbus/char/cpwatchdog.c:849: error: implicit declaration of function `iounmap'

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agosn_console section mismatch warning
Jes Sorensen [Mon, 16 Jul 2007 06:42:02 +0000 (23:42 -0700)]
sn_console section mismatch warning

Do not mark sn_sal_console_setup as __init since it's referenced from
non init data structures.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agocompat32: ignore the LOOP_CLR_FD ioctl
Geert Uytterhoeven [Mon, 16 Jul 2007 06:42:01 +0000 (23:42 -0700)]
compat32: ignore the LOOP_CLR_FD ioctl

compat32: Ignore the LOOP_CLR_FD ioctl for the loop block device, to kill an
annoying kernel message when e.g. busybox umount is used.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoNLS: Remove obsolete Makefile entries
Robert P. J. Day [Mon, 16 Jul 2007 06:42:01 +0000 (23:42 -0700)]
NLS: Remove obsolete Makefile entries

Since the corresponding source files no longer exist, remove the
irrelevant Makefile entries for them.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agopermit mempool_free(NULL)
Rusty Russell [Mon, 16 Jul 2007 06:42:00 +0000 (23:42 -0700)]
permit mempool_free(NULL)

Christian Borntraeger points out that mempool_free() doesn't noop when
handed NULL.  This is inconsistent with the other free-like functions
in the kernel.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoext4: statfs speed up
Badari Pulavarty [Mon, 16 Jul 2007 06:42:00 +0000 (23:42 -0700)]
ext4: statfs speed up

This is a patch that speeds up statfs.  It is very simple - the "overhead"
calculation, which takes a huge amount of time for large filesystems, never
changes unless the size of the filesystem itself changes.  That means we can
store it in memory and only recalculate if the filesystem has been resized
(almost never).

It also fixes a minor problem that we never update the on-disk superblock free
blocks/inodes counts until the filesystem is unmounted.  While not fatal, we
may as well update that on disk when we have the information, and it makes
things like debugfs and dumpe2fs report a bit more accurate info.

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoext3: statfs speed up
Badari Pulavarty [Mon, 16 Jul 2007 06:41:59 +0000 (23:41 -0700)]
ext3: statfs speed up

This is a patch that speeds up statfs.  It is very simple - the "overhead"
calculation, which takes a huge amount of time for large filesystems, never
changes unless the size of the filesystem itself changes.  That means we can
store it in memory and only recalculate if the filesystem has been resized
(almost never).

It also fixes a minor problem that we never update the on-disk superblock free
blocks/inodes counts until the filesystem is unmounted.  While not fatal, we
may as well update that on disk when we have the information, and it makes
things like debugfs and dumpe2fs report a bit more accurate info.

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoext2: statfs speed up
Badari Pulavarty [Mon, 16 Jul 2007 06:41:58 +0000 (23:41 -0700)]
ext2: statfs speed up

This is a patch that speeds up statfs.  It is very simple - the "overhead"
calculation, which takes a huge amount of time for large filesystems, never
changes unless the size of the filesystem itself changes.  That means we can
store it in memory and only recalculate if the filesystem has been resized
(almost never).

It also fixes a minor problem that we never update the on-disk superblock free
blocks/inodes counts until the filesystem is unmounted.  While not fatal, we
may as well update that on disk when we have the information, and it makes
things like debugfs and dumpe2fs report a bit more accurate info.

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agodrivers/char/ipmi/ipmi_si_intf.c: lower printk severity
Dan Aloni [Mon, 16 Jul 2007 06:41:57 +0000 (23:41 -0700)]
drivers/char/ipmi/ipmi_si_intf.c: lower printk severity

Signed-off-by: Dan Aloni <da-x@monatomic.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agodrivers/char/ipmi/ipmi_poweroff.c: lower printk severity
Dan Aloni [Mon, 16 Jul 2007 06:41:56 +0000 (23:41 -0700)]
drivers/char/ipmi/ipmi_poweroff.c: lower printk severity

Signed-off-by: Dan Aloni <da-x@monatomic.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agovsprintf.c: optimizing, part 2: base 10 conversion speedup, v2
Denis Vlasenko [Mon, 16 Jul 2007 06:41:56 +0000 (23:41 -0700)]
vsprintf.c: optimizing, part 2: base 10 conversion speedup, v2

Optimize integer-to-string conversion in vsprintf.c for base 10.  This is
by far the most used conversion, and in some use cases it impacts
performance.  For example, top reads /proc/$PID/stat for every process, and
with 4000 processes decimal conversion alone takes noticeable time.

Using code from

http://www.cs.uiowa.edu/~jones/bcd/decimal.html
(with permission from the author, Douglas W. Jones)

binary-to-decimal-string conversion is done in groups of five digits at
once, using only additions/subtractions/shifts (with -O2; -Os throws in
some multiply instructions).

On i386 arch gcc 4.1.2 -O2 generates ~500 bytes of code.

This patch is run tested. Userspace benchmark/test is also attached.
I tested it on PIII and AMD64 and new code is generally ~2.5 times
faster. On AMD64:

# ./vsprintf_verify-O2
Original decimal conv: .......... 151 ns per iteration
Patched decimal conv:  .......... 62 ns per iteration
Testing correctness
12895992590592 ok...        [Ctrl-C]
# ./vsprintf_verify-O2
Original decimal conv: .......... 151 ns per iteration
Patched decimal conv:  .......... 62 ns per iteration
Testing correctness
26025406464 ok...        [Ctrl-C]

More realistic test: top from busybox project was modified to
report how many us it took to scan /proc (this does not account
any processing done after that, like sorting process list),
and then I test it with 4000 processes:

#!/bin/sh
i=4000
while test $i != 0; do
    sleep 30 &
    let i--
done
busybox top -b -n3 >/dev/null

on unpatched kernel:

top: 4120 processes took 102864 microseconds to scan
top: 4120 processes took 91757 microseconds to scan
top: 4120 processes took 92517 microseconds to scan
top: 4120 processes took 92581 microseconds to scan

on patched kernel:

top: 4120 processes took 75460 microseconds to scan
top: 4120 processes took 66451 microseconds to scan
top: 4120 processes took 67267 microseconds to scan
top: 4120 processes took 67618 microseconds to scan

The speedup comes from much faster generation of /proc/PID/stat
by sprintf() calls inside the kernel.

Signed-off-by: Douglas W Jones <jones@cs.uiowa.edu>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agovsprintf.c: optimizing, part 1 (easy and obvious stuff)
Denis Vlasenko [Mon, 16 Jul 2007 06:41:54 +0000 (23:41 -0700)]
vsprintf.c: optimizing, part 1 (easy and obvious stuff)

* There is no point in having full "0...9a...z" constant vector,
  if we use only "0...9a...f" (and "x" for "0x").

* Post-decrement usually needs a few more instructions, so use
  pre decrement instead where makes sense:
-       while (i < precision--) {
+       while (i <= --precision) {

* if base != 10 (=> base 8 or 16), we can avoid using division
  in a loop and use mask/shift, obtaining much faster conversion.
  (More complex optimization for base 10 case is in the second patch).

Overall, size vsprintf.o shows ~80 bytes smaller text section
with this patch applied.

Signed-off-by: Douglas W Jones <jones@cs.uiowa.edu>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix trivial typos in anon_inodes.c comments
J. Bruce Fields [Mon, 16 Jul 2007 06:41:53 +0000 (23:41 -0700)]
Fix trivial typos in anon_inodes.c comments

Trivial typo and grammar fixes.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Cc: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoisapnp: remove pointless check of 'type' against 0 in isapnp_read_tag()
Jesper Juhl [Mon, 16 Jul 2007 06:41:53 +0000 (23:41 -0700)]
isapnp: remove pointless check of 'type' against 0 in isapnp_read_tag()

In drivers/pnp/isapnp/core.c::isapnp_read_tag() there is a test of 'type'
being == 0 a bit down in the function.  That test doesn't make any sense.
If 'type' could indeed be NULL, then the test happens way too late as we'd
already have tried to dereference the pointer earlier and looking at the
callers it also turns out that there is no way type can ever actually be
NULL.

So the test is completely pointless and should just be removed.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago.gitignore update
Alexey Dobriyan [Mon, 16 Jul 2007 06:41:52 +0000 (23:41 -0700)]
.gitignore update

headers_install by default puts headers into usr/include/ .
They're auto-generated, so should be ignored.

Same for *.orig, *.rej .

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoremove mm/backing-dev.c:congestion_wait_interruptible()
Adrian Bunk [Mon, 16 Jul 2007 06:41:52 +0000 (23:41 -0700)]
remove mm/backing-dev.c:congestion_wait_interruptible()

congestion_wait_interruptible() is no longer used.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agokernel/printk.c: document possible deadlock against scheduler
Jiri Kosina [Mon, 16 Jul 2007 06:41:51 +0000 (23:41 -0700)]
kernel/printk.c: document possible deadlock against scheduler

kernel/printk.c: document possible deadlock against scheduler

The printk's comment states that it can be called from every context,
which might lead to false illusion that it could be called from everywhere
without any restrictions.

This is however not true - a call to printk() could deadlock if called from
scheduler code (namely from schedule(), wake_up(), etc) on runqueue lock
when it tries to wake up klogd. Document this.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agodocs: static initialization of spinlocks is OK
Ed L. Cashin [Mon, 16 Jul 2007 06:41:50 +0000 (23:41 -0700)]
docs: static initialization of spinlocks is OK

Static initialization of spinlocks is preferable to dynamic initialization
when it is practical.  This patch updates documentation for consistency
with comments in spinlock_types.h.

Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoserial: remove termios checks from various old char serial drivers
Alan Cox [Mon, 16 Jul 2007 06:41:49 +0000 (23:41 -0700)]
serial: remove termios checks from various old char serial drivers

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago68360serial: remove broken optimisation
Alan Cox [Mon, 16 Jul 2007 06:41:49 +0000 (23:41 -0700)]
68360serial: remove broken optimisation

Remove the broken 'no termios change' optimisation for this driver.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Greg Ungerer <gerg@snapgear.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agosynclink: remove bogus 'no change' termios optimisation from synclink drivers
Alan Cox [Mon, 16 Jul 2007 06:41:48 +0000 (23:41 -0700)]
synclink: remove bogus 'no change' termios optimisation from synclink drivers

Again this check is wrong now, and un-needed

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agogenericserial: remove bogus optimisation check and dead code paths
Alan Cox [Mon, 16 Jul 2007 06:41:47 +0000 (23:41 -0700)]
genericserial: remove bogus optimisation check and dead code paths

We've been using the 'new locking' for a long time now so it seems
pointless keeping the old one around.  Remove it and undo the macros it
uses back into real code for readability.  Remove the bogus 'no termios
change' checks.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Morten Helgesen <morten@sourcepoet.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoamiserial: remove incorrect 'no termios change' check
Alan Cox [Mon, 16 Jul 2007 06:41:47 +0000 (23:41 -0700)]
amiserial: remove incorrect 'no termios change' check

Lots of serial drivers check and optimise for setting the termios values to
the ones they were before.  This is pointless and the check is wrong
anyway.  Remove the checks on the serial drivers.  If we ever do need such
a check put it back in the tty layer instead _once_!

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomodules: remove modlist_lock
Rusty Russell [Mon, 16 Jul 2007 06:41:46 +0000 (23:41 -0700)]
modules: remove modlist_lock

Now we always use stop_machine for module insertion or deletion, we no
longer need the modlist_lock: merely disabling preemption is sufficient to
block against list manipulation.  This avoids deadlock on OOPSen where we
can potentially grab the lock twice.

Bug: 8695
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Tobias Oed <tobiasoed@hotmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoext4: fix error handling in ext4_create_journal
Borislav Petkov [Mon, 16 Jul 2007 06:41:45 +0000 (23:41 -0700)]
ext4: fix error handling in ext4_create_journal

Fix error handling in ext4_create_journal according to kernel conventions.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoext3: fix error handling in ext3_create_journal()
Borislav Petkov [Mon, 16 Jul 2007 06:41:45 +0000 (23:41 -0700)]
ext3: fix error handling in ext3_create_journal()

Fix error handling in ext3_create_journal according to kernel conventions.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomake cancel_xxx_work_sync() return a boolean
Oleg Nesterov [Mon, 16 Jul 2007 06:41:44 +0000 (23:41 -0700)]
make cancel_xxx_work_sync() return a boolean

Change cancel_work_sync() and cancel_delayed_work_sync() to return a boolean
indicating whether the work was actually cancelled.  A zero return value means
that the work was not pending/queued.

Without that kind of change it is not possible to avoid flush_workqueue()
sometimes, see the next patch as an example.

Also, this patch unifies both functions and kills the (unlikely) busy-wait
loop.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Jarek Poplawski <jarkao2@o2.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agorename cancel_rearming_delayed_work() to cancel_delayed_work_sync()
Oleg Nesterov [Mon, 16 Jul 2007 06:41:44 +0000 (23:41 -0700)]
rename cancel_rearming_delayed_work() to cancel_delayed_work_sync()

Imho, the current naming of cancel_xxx workqueue functions is very confusing.

cancel_delayed_work()
cancel_rearming_delayed_work()
cancel_rearming_delayed_workqueue() // obsolete

cancel_work_sync()

This looks as if the first 2 functions differ in "type" of their argument
which is not true any longer, nowadays the difference is the behaviour.

The semantics of cancel_rearming_delayed_work(dwork) was changed
significantly, it doesn't require that dwork rearms itself, and cancels dwork
synchronously.

Rename it to cancel_delayed_work_sync().  This matches cancel_delayed_work()
and cancel_work_sync().  Re-create cancel_rearming_delayed_work() as a simple
inline obsolete wrapper, like cancel_rearming_delayed_workqueue().

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Jarek Poplawski <jarkao2@o2.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoupdate Documentation/filesystems/vfs.txt
Borislav Petkov [Mon, 16 Jul 2007 06:41:43 +0000 (23:41 -0700)]
update Documentation/filesystems/vfs.txt

Update Documentation/filesystems/vfs.txt

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoRemove the last few UMSDOS leftovers
Jesper Juhl [Mon, 16 Jul 2007 06:41:42 +0000 (23:41 -0700)]
Remove the last few UMSDOS leftovers

The UMSDOS filesystem was removed back in 2.6.11, but some tiny bits stuck
around.  This patch removes the few remaining leftovers.  The only things
left behind after this are the entries in the CREDITS file and the ioctl
number in Documentation/ioctl-number.txt as documentation.

This third (hopefully final) version of the patch doesn't edit the
arch/um/config.release file, since Jeff Dike pointed out to me that it
should die completely, and asked me to remove it from my patch as he'll
send in a seperate patch removing the file completely.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoAdd missing files and dirs to 00-INDEX in Documentation/
Jesper Juhl [Mon, 16 Jul 2007 06:41:41 +0000 (23:41 -0700)]
Add missing files and dirs to 00-INDEX in Documentation/

Add descriptions for a number of missing files and directories to the
Documentation/00-INDEX file.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Rob Landley <rob@landley.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agodma: make dma pool to use kmalloc_node
Yinghai Lu [Mon, 16 Jul 2007 06:41:41 +0000 (23:41 -0700)]
dma: make dma pool to use kmalloc_node

Using dev_to_node(&dev->dev) to get node, and kmalloc_node to dma buffer on
corresponding node dma pool

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoUDF: fix function name from udf_crc16 to udf_crc
Cyrill Gorcunov [Mon, 16 Jul 2007 06:41:40 +0000 (23:41 -0700)]
UDF: fix function name from udf_crc16 to udf_crc

We have to change udf_crc16() name to udf_crc() to be able to play with CRC
test.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Jan Kara <jack@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agogeneric bug: use show_regs() instead of dump_stack()
Heiko Carstens [Mon, 16 Jul 2007 06:41:39 +0000 (23:41 -0700)]
generic bug: use show_regs() instead of dump_stack()

The current generic bug implementation has a call to dump_stack() in case a
WARN_ON(whatever) gets hit.  Since report_bug(), which calls dump_stack(),
gets called from an exception handler we can do better: just pass the
pt_regs structure to report_bug() and pass it to show_regs() in case of a
warning.  This will give more debug informations like register contents,
etc...  In addition this avoids some pointless lines that dump_stack()
emits, since it includes a stack backtrace of the exception handler which
is of no interest in case of a warning.  E.g.  on s390 the following lines
are currently always present in a stack backtrace if dump_stack() gets
called from report_bug():

 [<000000000001517a>] show_trace+0x92/0xe8)
 [<0000000000015270>] show_stack+0xa0/0xd0
 [<00000000000152ce>] dump_stack+0x2e/0x3c
 [<0000000000195450>] report_bug+0x98/0xf8
 [<0000000000016cc8>] illegal_op+0x1fc/0x21c
 [<00000000000227d6>] sysc_return+0x0/0x10

Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Kyle McMartin <kyle@parisc-linux.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoAdd -Werror-implicit-function-declaration
Dave Jones [Mon, 16 Jul 2007 06:41:38 +0000 (23:41 -0700)]
Add -Werror-implicit-function-declaration

Add -Werror-implicit-function-declaration
This makes builds fail sooner if something is implicitly defined instead
of having to wait half an hour for it to fail at the linking stage.

Signed-off-by: Dave Jones <davej@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouninline check_signature()
Andrew Morton [Mon, 16 Jul 2007 06:41:38 +0000 (23:41 -0700)]
uninline check_signature()

This is a rather bizarre thing to have inlined in io.h.  Stick it in lib/
instead.

While we're there, despaghetti it a bit, and fix its off-by-one behaviour when
passed a zero length.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoCodingStyle: add information about editor modelines
Josh Triplett [Mon, 16 Jul 2007 06:41:37 +0000 (23:41 -0700)]
CodingStyle: add information about editor modelines

I recently received a patch including a file that had a vim modeline,
and I realized that nothing specifically proscribed that practice.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoCodingStyle: add information about trailing whitespace
Josh Triplett [Mon, 16 Jul 2007 06:41:37 +0000 (23:41 -0700)]
CodingStyle: add information about trailing whitespace

Signed-off-by: Josh Triplett <josh@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agois_power_of_2: ufs/super.c
vignesh babu [Mon, 16 Jul 2007 06:41:36 +0000 (23:41 -0700)]
is_power_of_2: ufs/super.c

Replace (n & (n-1)) with is_power_of_2

Signed-off-by: vignesh babu <vignesh.babu@wipro.com>
Acked-by: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoparport_pc: it887x fix
Niels de Vos [Mon, 16 Jul 2007 06:41:35 +0000 (23:41 -0700)]
parport_pc: it887x fix

The IO port range requested by parport_pc.c:sio_ite_8872_probe is too small.
The IO-ports of ttyS1 (0x2f8) will be missconfigured by the ITE-chip.  The ITE
starts looking for the chip a 0x2a0.  An IO-portrange of 32 will not overwrite
the ports of ttyS1.  Therefore register 0x60 should be written with
0xe5000000, enabling the ITE and setting IO-portsize to 32 bytes.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agois_power_of_2: kernel/kfifo.c
vignesh babu [Mon, 16 Jul 2007 06:41:34 +0000 (23:41 -0700)]
is_power_of_2: kernel/kfifo.c

Replace (n & (n-1)) with is_power_of_2()

Signed-off-by: vignesh babu <vignesh.babu@wipro.com>
Acked-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomake seccomp zerocost in schedule
Andrea Arcangeli [Mon, 16 Jul 2007 06:41:33 +0000 (23:41 -0700)]
make seccomp zerocost in schedule

This follows a suggestion from Chuck Ebbert on how to make seccomp
absolutely zerocost in schedule too.  The only remaining footprint of
seccomp is in terms of the bzImage size that becomes a few bytes (perhaps
even a few kbytes) larger, measure it if you care in the embedded.

Signed-off-by: Andrea Arcangeli <andrea@cpushare.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomove seccomp from /proc to a prctl
Andrea Arcangeli [Mon, 16 Jul 2007 06:41:32 +0000 (23:41 -0700)]
move seccomp from /proc to a prctl

This reduces the memory footprint and it enforces that only the current
task can enable seccomp on itself (this is a requirement for a
strightforward [modulo preempt ;) ] TIF_NOTSC implementation).

Signed-off-by: Andrea Arcangeli <andrea@cpushare.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agonbd.c: sock_xmit: cleanup signal related code
Oleg Nesterov [Mon, 16 Jul 2007 06:41:32 +0000 (23:41 -0700)]
nbd.c: sock_xmit: cleanup signal related code

sock_xmit() re-implements sigprocmask() and dequeue_signal_lock().

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Paul Clements <paul.clements@steeleye.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agokcdrwd: remove unneeded flush_signals() call
Oleg Nesterov [Mon, 16 Jul 2007 06:41:29 +0000 (23:41 -0700)]
kcdrwd: remove unneeded flush_signals() call

kcdrwd() is a kernel thread, all signals are ignored.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Peter Osterlund <petero2@telia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoadb_probe_task: remove unneeded flush_signals() call
Oleg Nesterov [Mon, 16 Jul 2007 06:41:29 +0000 (23:41 -0700)]
adb_probe_task: remove unneeded flush_signals() call

adb_probe_task() is forked by "events" thread, all signals are ignored, no
need to play with signal blocking/flushing.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agobd_claim_by_disk: fix warning
Andrew Morton [Mon, 16 Jul 2007 06:41:28 +0000 (23:41 -0700)]
bd_claim_by_disk: fix warning

Fix this:

fs/block_dev.c: In function 'bd_claim_by_disk':
fs/block_dev.c:970: warning: 'found' may be used uninitialized in this function

and given that free_bd_holder() now needs free(NULL)-is-legal behaviour, we
can simplify bd_release_from_kobject().

Cc: Bjorn Steinbrink <B.Steinbrink@gmx.de>
Cc: Johannes Weiner <hannes-kernel@saeurebad.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoReplace obscure constructs in fs/block_dev.c
Johannes Weiner [Mon, 16 Jul 2007 06:41:25 +0000 (23:41 -0700)]
Replace obscure constructs in fs/block_dev.c

Replace some funky codepaths in fs/block_dev.c with cleaner versions of the
affected places.

[akpm@linux-foundation.org: fix return value]
Signed-off-by: Johannes Weiner <hannes-kernel@saeurebad.de>
Cc: Bjorn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofs/namespace.c should #include "internal.h"
Adrian Bunk [Mon, 16 Jul 2007 06:41:25 +0000 (23:41 -0700)]
fs/namespace.c should #include "internal.h"

Every file should include the headers containing the prototypes for
its global functions.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agosprint_symbol() cleanup
Andrew Morton [Mon, 16 Jul 2007 06:41:24 +0000 (23:41 -0700)]
sprint_symbol() cleanup

Remove pointless `else'.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoHFS+: add custom dentry hash and comparison operations
Duane Griffin [Mon, 16 Jul 2007 06:41:23 +0000 (23:41 -0700)]
HFS+: add custom dentry hash and comparison operations

Add custom dentry hash and comparison operations for HFS+ filesystems that are
case-insensitive and/or do automatic unicode decomposition.  The new
operations reuse the existing HFS+ ASCII to unicode conversion, unicode
decomposition and case folding functionality.

Signed-off-by: Duane Griffin <duaneg@dghda.com>
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoHFS+: refactor ASCII to unicode conversion routine for later reuse
Duane Griffin [Mon, 16 Jul 2007 06:41:22 +0000 (23:41 -0700)]
HFS+: refactor ASCII to unicode conversion routine for later reuse

The HFS+ filesystem is case-insensitive and does automatic unicode
decomposition by default, but does not provide custom dentry operations.  This
can lead to multiple dentries being cached for lookups on a filename with
varying case and/or character (de)composition.

These patches add custom dentry hash and comparison operations for
case-sensitive and/or automatically decomposing HFS+ filesystems.  Unicode
decomposition and case-folding are performed as required to ensure equivalent
filenames are hashed to the same values and compare as equal.

This patch:

Refactor existing HFS+ ASCII to unicode string conversion routine to split out
character conversion functionality.  This will be reused by the custom dentry
hash and comparison routines.  This approach avoids unnecessary memory
allocation compared to using the string conversion routine directly in the new
functions.

[akpm@linux-foundation.org: avoid use-of-uninitialised]
Signed-off-by: Duane Griffin <duaneg@dghda.com>
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomistaken ext4_inode_bitmap for ext4_block_bitmap
Toshiyuki Okajima [Mon, 16 Jul 2007 06:41:22 +0000 (23:41 -0700)]
mistaken ext4_inode_bitmap for ext4_block_bitmap

In ext4_new_blocks(), one of two ext4_block_bitmap() calls should be
ext4_inode_bitmap() call.  It is not harmful in normal processing, but it
should be fixed.

Signed-off-by: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agosysctl.c: add text telling people to use CTL_UNNUMBERED
Andrew Morton [Mon, 16 Jul 2007 06:41:21 +0000 (23:41 -0700)]
sysctl.c: add text telling people to use CTL_UNNUMBERED

Hopefully this will help people to understand the new regime.

Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoAdd Documentation/sysctl/ctl_unnumbered.txt
Andrew Morton [Mon, 16 Jul 2007 06:41:20 +0000 (23:41 -0700)]
Add Documentation/sysctl/ctl_unnumbered.txt

Poeple keep on adding new numbered sysctls, when they're supposed not to.

Add a documentation file which explain why new sysctls should use
CTL_UNNUMBERED.  The next patch will sprinkle pointers to this throughout
sysctl.c.

Eric provided the text (thanks)

Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFUTEX: Tidy up the code
Thomas Gleixner [Mon, 16 Jul 2007 06:41:20 +0000 (23:41 -0700)]
FUTEX: Tidy up the code

The recent PRIVATE and REQUEUE_PI changes to the futex code made it hard to
read.  Tidy it up.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoupdate description in Documentation/filesystems/vfs.txt
Borislav Petkov [Mon, 16 Jul 2007 06:41:19 +0000 (23:41 -0700)]
update description in Documentation/filesystems/vfs.txt

Update the description of struct file_system_type and get_sb() in
Documentation/filesystems/vfs.txt to match the current code.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agocdrom: replace hard-coded constants by kernel.h macro.
Robert P. J. Day [Mon, 16 Jul 2007 06:41:19 +0000 (23:41 -0700)]
cdrom: replace hard-coded constants by kernel.h macro.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agosys_time() speedup
Ingo Molnar [Mon, 16 Jul 2007 06:41:18 +0000 (23:41 -0700)]
sys_time() speedup

Improve performance of sys_time().  sys_time() returns time in seconds, but
it does so by calling do_gettimeofday() and then returning the tv_sec
portion of the GTOD time.  But the data structure "xtime", which is updated
by every timer/scheduler tick, already offers HZ granularity time.

The patch improves the sysbench OLTP macrobenchmark significantly:

2.6.22-rc6:

#threads
   1:        transactions:                        3733   (373.21 per sec.)
   2:        transactions:                        6676   (667.46 per sec.)
   3:        transactions:                        6957   (695.50 per sec.)
   4:        transactions:                        7055   (705.48 per sec.)
   5:        transactions:                        6596   (659.33 per sec.)

2.6.22-rc6 + sys_time.patch:

   1:        transactions:                        4005   (400.47 per sec.)
   2:        transactions:                        7379   (737.77 per sec.)
   3:        transactions:                        7347   (734.49 per sec.)
   4:        transactions:                        7468   (746.65 per sec.)
   5:        transactions:                        7428   (742.47 per sec.)

Mixed API uses of gettimeofday() and time() are guaranteed to be coherent
via the use of a at-most-once-per-second slowpath that updates xtime.

[akpm@linux-foundation.org: build fixes]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: John Stultz <johnstul@us.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agois_power_of_2(): jbd
vignesh babu [Mon, 16 Jul 2007 06:41:17 +0000 (23:41 -0700)]
is_power_of_2(): jbd

Replace (n & (n-1)) in the context of power of 2 checks with
is_power_of_2().

Signed-off-by: vignesh babu <vignesh.babu@wipro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agois_power_of_2: ext3/super.c
vignesh babu [Mon, 16 Jul 2007 06:41:17 +0000 (23:41 -0700)]
is_power_of_2: ext3/super.c

Replace (n & (n-1)) in the context of power of 2 checks with is_power_of_2()

Signed-off-by: vignesh babu <vignesh.babu@wipro.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agodrop obsolete sys_ioctl export
Christoph Hellwig [Mon, 16 Jul 2007 06:41:16 +0000 (23:41 -0700)]
drop obsolete sys_ioctl export

sys_ioctl() was only exported for our first version of compat ioctl
handling.  Now that the whole compat ioctl handling mess is more or less
sorted out there are no more modular users left and we can kill it.

There's one exception and that's sparc64's solaris compat module, but
sparc64 has it's own export predating the generic one by years for that
which this patch leaves untouched.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agodoc/oops-tracing: add Code: decode info
Randy Dunlap [Mon, 16 Jul 2007 06:41:15 +0000 (23:41 -0700)]
doc/oops-tracing: add Code: decode info

Add info that the Code: bytes line contains <xy> or (wxyz) in some
architecture oops reports and what that means.

Add a script by Andi Kleen that reads the Code: line from an Oops report
file and generates assembly code from the hex bytes.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agonamespace: ensure clone_flags are always stored in an unsigned long
Eric W. Biederman [Mon, 16 Jul 2007 06:41:15 +0000 (23:41 -0700)]
namespace: ensure clone_flags are always stored in an unsigned long

While working on unshare support for the network namespace I noticed we
were putting clone flags in an int.  Which is weird because the syscall
uses unsigned long and we at least need an unsigned to properly hold all of
the unshare flags.

So to make the code consistent, this patch updates the code to use
unsigned long instead of int for the clone flags in those places
where we get it wrong today.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoext3: remove extra IS_RDONLY() check
Dave Hansen [Mon, 16 Jul 2007 06:41:14 +0000 (23:41 -0700)]
ext3: remove extra IS_RDONLY() check

ext3_change_inode_journal_flag() is only called from one location:
ext3_ioctl(EXT3_IOC_SETFLAGS).  That ioctl case already has a IS_RDONLY()
call in it so this one is superfluous.

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoupdate procfs-guide doc of read_func
C. Scott Ananian [Mon, 16 Jul 2007 06:41:13 +0000 (23:41 -0700)]
update procfs-guide doc of read_func

The procfs-guide claims that 'the parameter start doesn't seem to be used
anywhere in the kernel'.  This is out of date.  In linux/fs/proc/generic.c
we find a very nice description of the parameters to read_func.  The
appended patch replaces the bogus description with this (as far as I know)
accurate one.

Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoRemove final two references to "__obsolete_setup" macro
Robert P. J. Day [Mon, 16 Jul 2007 06:41:13 +0000 (23:41 -0700)]
Remove final two references to "__obsolete_setup" macro

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agodiskquota: 32bit quota tools on 64bit architectures
Vasily Tarasov [Mon, 16 Jul 2007 06:41:12 +0000 (23:41 -0700)]
diskquota: 32bit quota tools on 64bit architectures

OpenVZ Linux kernel team has discovered the problem with 32bit quota tools
working on 64bit architectures.  In 2.6.10 kernel sys32_quotactl() function
was replaced by sys_quotactl() with the comment "sys_quotactl seems to be
32/64bit clean, enable it for 32bit" However this isn't right.  Look at
if_dqblk structure:

struct if_dqblk {
        __u64 dqb_bhardlimit;
        __u64 dqb_bsoftlimit;
        __u64 dqb_curspace;
        __u64 dqb_ihardlimit;
        __u64 dqb_isoftlimit;
        __u64 dqb_curinodes;
        __u64 dqb_btime;
        __u64 dqb_itime;
        __u32 dqb_valid;
};

For 32 bit quota tools sizeof(if_dqblk) == 0x44.
But for 64 bit kernel its size is 0x48, 'cause of alignment!
Thus we got a problem. Attached patch reintroduce sys32_quotactl() function,
that handles this and related situations.

[michal.k.k.piotrowski@gmail.com: build fix]
[akpm@linux-foundation.org: Make it link with CONFIG_QUOTA=n]
Signed-off-by: Vasily Tarasov <vtaras@openvz.org>
Cc: Andi Kleen <ak@suse.de>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Jan Kara <jack@ucw.cz>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoIntroduce compat_u64 and compat_s64 types
Arnd Bergmann [Mon, 16 Jul 2007 06:41:11 +0000 (23:41 -0700)]
Introduce compat_u64 and compat_s64 types

One common problem with 32 bit system call and ioctl emulation is the
different alignment rules between i386 and 64 bit machines.  A number of
drivers work around this by marking the compat structures as
'attribute((packed))', which is not the right solution because it breaks
all the non-x86 architectures that want to use the same compat code.

Hopefully, this patch improves the situation, it introduces two new types,
compat_u64 and compat_s64.  These are defined on all architectures to have
the same size and alignment as the 32 bit version of u64 and s64.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Andi Kleen <ak@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Vasily Tarasov <vtaras@openvz.org>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agokerneldoc fix in audit_core_dumps
Henrik Kretzschmar [Mon, 16 Jul 2007 06:41:10 +0000 (23:41 -0700)]
kerneldoc fix in audit_core_dumps

Fix parameter name in audit_core_dumps for kerneldoc.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoremove unused lock_cpu_hotplug_interruptible definition
Nathan Lynch [Mon, 16 Jul 2007 06:41:09 +0000 (23:41 -0700)]
remove unused lock_cpu_hotplug_interruptible definition

aa95387774039096c11803c04011f1aa42d85758 removed the implementation of
lock_cpu_hotplug_interruptible and all users of it.  This stub definition
for !CONFIG_HOTPLUG_CPU was left over -- kill it now.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoext4: fix deadlock in ext4_remount() and orphan list handling
Jan Kara [Mon, 16 Jul 2007 06:41:09 +0000 (23:41 -0700)]
ext4: fix deadlock in ext4_remount() and orphan list handling

ext4_orphan_add() and ext4_orphan_del() functions lock sb->s_lock with a
transaction started with ext4_mark_recovery_complete() waits for a transaction
holding sb->s_lock, thus leading to a possible deadlock.  At the moment we
call ext4_mark_recovery_complete() from ext4_remount() we have done all the
work needed for remounting and thus we are safe to drop sb->s_lock before we
wait for transactions to commit.  Note that at this moment we are still
guarded by s_umount lock against other remounts/umounts.

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Eric Sandeen <sandeen@sandeen.net>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoext3: fix deadlock in ext3_remount() and orphan list handling
Jan Kara [Mon, 16 Jul 2007 06:41:08 +0000 (23:41 -0700)]
ext3: fix deadlock in ext3_remount() and orphan list handling

ext3_orphan_add() and ext3_orphan_del() functions lock sb->s_lock with a
transaction started with ext3_mark_recovery_complete() waits for a transaction
holding sb->s_lock, thus leading to a possible deadlock.  At the moment we
call ext3_mark_recovery_complete() from ext3_remount() we have done all the
work needed for remounting and thus we are safe to drop sb->s_lock before we
wait for transactions to commit.  Note that at this moment we are still
guarded by s_umount lock against other remounts/umounts.

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Eric Sandeen <sandeen@sandeen.net>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoadjust nosmp handling
Jan Beulich [Mon, 16 Jul 2007 06:41:07 +0000 (23:41 -0700)]
adjust nosmp handling

Especially when !CONFIG_HOTPLUG_CPU, avoid needlessy allocating resources for
CPUs that can never become available.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoadd a kmem_cache for nsproxy objects
Cedric Le Goater [Mon, 16 Jul 2007 06:41:07 +0000 (23:41 -0700)]
add a kmem_cache for nsproxy objects

It should improve performance in some scenarii where a lot of
these nsproxy objects are created by unsharing namespaces. This is
a typical use of virtual servers that are being created or entered.

This is also a good tool to find leaks and gather statistics on
namespace usage.

Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Pavel Emelianov <xemul@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofix create_new_namespaces() return value
Cedric Le Goater [Mon, 16 Jul 2007 06:41:06 +0000 (23:41 -0700)]
fix create_new_namespaces() return value

dup_mnt_ns() and clone_uts_ns() return NULL on failure.  This is wrong,
create_new_namespaces() uses ERR_PTR() to catch an error.  This means that the
subsequent create_new_namespaces() will hit BUG_ON() in copy_mnt_ns() or
copy_utsname().

Modify create_new_namespaces() to also use the errors returned by the
copy_*_ns routines and not to systematically return ENOMEM.

[oleg@tv-sign.ru: better changelog]
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Cc: Serge E. Hallyn <serue@us.ibm.com>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Pavel Emelianov <xemul@openvz.org>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agodirty_writeback_centisecs_handler() cleanup
Andrew Morton [Mon, 16 Jul 2007 06:41:05 +0000 (23:41 -0700)]
dirty_writeback_centisecs_handler() cleanup

Repair indenting bustage.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoAllow softlockup to be runtime disabled
Dave Jones [Mon, 16 Jul 2007 06:41:05 +0000 (23:41 -0700)]
Allow softlockup to be runtime disabled

It's useful sometimes to disable the softlockup checker at boottime.
Especially if it triggers during a distro install.

Signed-off-by: Dave Jones <davej@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoCOBALT: remove all references to Cobalt NVRAM
Robert P. J. Day [Mon, 16 Jul 2007 06:41:04 +0000 (23:41 -0700)]
COBALT: remove all references to Cobalt NVRAM

Remove not only the references to Cobalt NVRAM, but the header file as
well.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Tim Hockin <thockin@hockin.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoDocument the fact that RCU callbacks can run in parallel
Paul E. McKenney [Mon, 16 Jul 2007 06:41:03 +0000 (23:41 -0700)]
Document the fact that RCU callbacks can run in parallel

Add an item to the RCU documentation checklist noting that RCU callbacks
can run in parallel.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agobinfmt_elf warning fix
Andrew Morton [Mon, 16 Jul 2007 06:41:03 +0000 (23:41 -0700)]
binfmt_elf warning fix

fs/binfmt_elf.c: In function 'load_elf_binary':
fs/binfmt_elf.c:1002: warning: 'interp_map_addr' may be used uninitialized in this function

The compiler (gcc-4.1.0) is correct, but it failed to notice that we didn't
use the resulting value.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agorevert "vanishing ioctl handler debugging"
Andrew Morton [Mon, 16 Jul 2007 06:41:02 +0000 (23:41 -0700)]
revert "vanishing ioctl handler debugging"

Revert my do_ioctl() debugging patch: Paul fixed the bug.

Cc: Paul Fulghum <paulkf@microgate.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agouser namespace: add unshare
Serge E. Hallyn [Mon, 16 Jul 2007 06:41:01 +0000 (23:41 -0700)]
user namespace: add unshare

This patch enables the unshare of user namespaces.

It adds a new clone flag CLONE_NEWUSER and implements copy_user_ns() which
resets the current user_struct and adds a new root user (uid == 0)

For now, unsharing the user namespace allows a process to reset its
user_struct accounting and uid 0 in the new user namespace should be contained
using appropriate means, for instance selinux

The plan, when the full support is complete (all uid checks covered), is to
keep the original user's rights in the original namespace, and let a process
become uid 0 in the new namespace, with full capabilities to the new
namespace.

Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Acked-by: Pavel Emelianov <xemul@openvz.org>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Kirill Korotaev <dev@sw.ru>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: James Morris <jmorris@namei.org>
Cc: Andrew Morgan <agm@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>