1. 25 Mar, 2006 10 commits
    • Pekka Enberg's avatar
      [PATCH] mm: use kmem_cache_zalloc · c5e3b83e
      Pekka Enberg authored
      Convert mm/ to use the new kmem_cache_zalloc allocator.
      Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      c5e3b83e
    • Pekka Enberg's avatar
      [PATCH] slab: optimize constant-size kzalloc calls · 40c07ae8
      Pekka Enberg authored
      As suggested by Eric Dumazet, optimize kzalloc() calls that pass a
      compile-time constant size.  Please note that the patch increases kernel
      text slightly (~200 bytes for defconfig on x86).
      Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      40c07ae8
    • Pekka Enberg's avatar
      [PATCH] slab: introduce kmem_cache_zalloc allocator · a8c0f9a4
      Pekka Enberg authored
      Introduce a memory-zeroing variant of kmem_cache_alloc.  The allocator
      already exits in XFS and there are potential users for it so this patch
      makes the allocator available for the general public.
      Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      a8c0f9a4
    • Al Viro's avatar
      [PATCH] slab: implement /proc/slab_allocators · 871751e2
      Al Viro authored
      Implement /proc/slab_allocators.   It produces output like:
      
      idr_layer_cache: 80 idr_pre_get+0x33/0x4e
      buffer_head: 2555 alloc_buffer_head+0x20/0x75
      mm_struct: 9 mm_alloc+0x1e/0x42
      mm_struct: 20 dup_mm+0x36/0x370
      vm_area_struct: 384 dup_mm+0x18f/0x370
      vm_area_struct: 151 do_mmap_pgoff+0x2e0/0x7c3
      vm_area_struct: 1 split_vma+0x5a/0x10e
      vm_area_struct: 11 do_brk+0x206/0x2e2
      vm_area_struct: 2 copy_vma+0xda/0x142
      vm_area_struct: 9 setup_arg_pages+0x99/0x214
      fs_cache: 8 copy_fs_struct+0x21/0x133
      fs_cache: 29 copy_process+0xf38/0x10e3
      files_cache: 30 alloc_files+0x1b/0xcf
      signal_cache: 81 copy_process+0xbaa/0x10e3
      sighand_cache: 77 copy_process+0xe65/0x10e3
      sighand_cache: 1 de_thread+0x4d/0x5f8
      anon_vma: 241 anon_vma_prepare+0xd9/0xf3
      size-2048: 1 add_sect_attrs+0x5f/0x145
      size-2048: 2 journal_init_revoke+0x99/0x302
      size-2048: 2 journal_init_revoke+0x137/0x302
      size-2048: 2 journal_init_inode+0xf9/0x1c4
      
      Cc: Manfred Spraul <manfred@colorfullife.com>
      Cc: Alexander Nyberg <alexn@telia.com>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Cc: Christoph Lameter <clameter@engr.sgi.com>
      Cc: Ravikiran Thirumalai <kiran@scalex86.org>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      DESC
      slab-leaks3-locking-fix
      EDESC
      From: Andrew Morton <akpm@osdl.org>
      
      Update for slab-remove-cachep-spinlock.patch
      
      Cc: Al Viro <viro@ftp.linux.org.uk>
      Cc: Manfred Spraul <manfred@colorfullife.com>
      Cc: Alexander Nyberg <alexn@telia.com>
      Cc: Pekka Enberg <penberg@cs.helsinki.fi>
      Cc: Christoph Lameter <clameter@engr.sgi.com>
      Cc: Ravikiran Thirumalai <kiran@scalex86.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      871751e2
    • Alessandro Zummo's avatar
      [PATCH] cirrus ep93xx watchdog driver · f52ac8fe
      Alessandro Zummo authored
      Add a driver for the on-chip watchdog on the cirrus ep93xx series of ARM
      CPUs.
      Signed-off-by: default avatarLennert Buytenhek <buytenh@wantstofly.org>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: default avatarAlessandro Zummo <a.zummo@towertech.it>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      f52ac8fe
    • David Howells's avatar
      [PATCH] Optimise d_find_alias() · 214fda1f
      David Howells authored
      The attached patch optimises d_find_alias() to only take the spinlock if
      there's anything in the the inode's alias list.  If there isn't, it returns
      NULL immediately.
      
      With respect to the superblock sharing patch, this should reduce by one the
      number of times the dcache_lock is taken by nfs_lookup() for ordinary
      directory lookups.
      
      Only in the case where there's already a dentry for particular directory inode
      (such as might happen when another mountpoint is rooted at that dentry) will
      the lock then be taken the extra time.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      214fda1f
    • Thomas Gleixner's avatar
      [PATCH] Validate and sanitze itimer timeval from userspace · 7d99b7d6
      Thomas Gleixner authored
      According to the specification the timevals must be validated and an
      errorcode -EINVAL returned in case the timevals are not in canonical form.
      This check was never done in Linux.
      
      The pre 2.6.16 code converted invalid timevals silently.  Negative timeouts
      were converted by the timeval_to_jiffies conversion to the maximum timeout.
      
      hrtimers and the ktime_t operations expect timevals in canonical form.
      Otherwise random results might happen on 32 bits machines due to the
      optimized ktime_add/sub operations.  Negative timeouts are treated as
      already expired.  This might break applications which work on pre 2.6.16.
      
      To prevent random behaviour and API breakage the timevals are checked and
      invalid timevals sanitized in a simliar way as the pre 2.6.16 code did.
      
      Invalid timevals are reported with a per boot limited number of kernel
      messages so applications which use this misfeature can be corrected.
      
      After a grace period of one year the sanitizing should be replaced by a
      correct validation check.  This is also documented in
      Documentation/feature-removal-schedule.txt
      
      The validation and sanitizing is done inside do_setitimer so all callers
      (sys_setitimer, compat_sys_setitimer, osf_setitimer) are catched.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      7d99b7d6
    • Thomas Gleixner's avatar
      [PATCH] sys_alarm() unsigned signed conversion fixup · c08b8a49
      Thomas Gleixner authored
      alarm() calls the kernel with an unsigend int timeout in seconds.  The
      value is stored in the tv_sec field of a struct timeval to setup the
      itimer.  The tv_sec field of struct timeval is of type long, which causes
      the tv_sec value to be negative on 32 bit machines if seconds > INT_MAX.
      
      Before the hrtimer merge (pre 2.6.16) such a negative value was converted
      to the maximum jiffies timeout by the timeval_to_jiffies conversion.  It's
      not clear whether this was intended or just happened to be done by the
      timeval_to_jiffies code.
      
      hrtimers expect a timeval in canonical form and treat a negative timeout as
      already expired.  This breaks the legitimate usage of alarm() with a
      timeout value > INT_MAX seconds.
      
      For 32 bit machines it is therefor necessary to limit the internal seconds
      value to avoid API breakage.  Instead of doing this in all implementations
      of sys_alarm the duplicated sys_alarm code is moved into a common function
      in itimer.c
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      c08b8a49
    • Andrew Morton's avatar
      [PATCH] timer irq driven soft watchdog fix · 185ae6d7
      Andrew Morton authored
      I seem to have lost this hunk in yesterday's patch.  It brings the
      coming-online CPU's softlockup timer up to date so we don't get false-positive
      tripups during CPU hot-add.
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      185ae6d7
    • Andrey Panin's avatar
      [PATCH] fix DMI onboard device discovery · bc83455b
      Andrey Panin authored
      Attached patch fixes invalid pointer arithmetic in DMI code to make onboard
      device discovery working again.
      
      akpm: bug has been present since dmi_find_device() was added in 2.6.14.
      Affects ipmi only (I think) - the symptoms weren't described.
      
      akpm: changed to use pointer arithmetic rather than open-coded sizeof.
      Signed-off-by: default avatarAndrey Panin <pazke@donpac.ru>
      Cc: Corey Minyard <minyard@acm.org>
      Cc: <stable@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      bc83455b
  2. 24 Mar, 2006 30 commits