1. 29 11月, 2005 14 次提交
    • H
      [PATCH] m32r: Introduce atomic_cmpxchg and atomic_inc_not_zero operations · 0332db5a
      Hirokazu Takata 提交于
      Introduce atomic_cmpxchg and atomic_inc_not_zero operations for m32r.
      Signed-off-by: NHayato Fujiwara <fujiwara@linux-m32r.org>
      Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0332db5a
    • H
      [PATCH] m32r: Fix sys_tas() syscall · 91f4ab05
      Hirokazu Takata 提交于
      This patch fixes a deadlock problem of the m32r SMP kernel.
      
      In the m32r kernel, sys_tas() system call is provided as a test-and-set
      function for userspace, for backward compatibility.
      
      In some multi-threading application program, deadlocks were rarely caused
      at sys_tas() funcion.  Such a deadlock was caused due to a collision of
      __pthread_lock() and __pthread_unlock() operations.
      
      The "tas" syscall is repeatedly called by pthread_mutex_lock() to get a
      lock, while a lock variable's value is not 0.  On the other hand,
      pthead_mutex_unlock() sets the lock variable to 0 for unlocking.
      
      In the previous implementation of sys_tas() routine, there was a
      possibility that a unlock operation was ignored in the following case:
      
      - Assume a lock variable (*addr) was equal to 1 before sys_tas() execution.
      - __pthread_unlock() operation is executed by the other processor
        and the lock variable (*addr) is set to 0, between a read operation
        ("oldval = *addr;") and the following write operation ("*addr = 1;")
        during a execution of sys_tas().
      
      In this case, the following write operation ("*addr = 1;") overwrites the
      __pthread_unlock() result, and sys_tas() fails to get a lock in the next
      turn and after that.
      
      According to the attatched patch, sys_tas() returns 0 value in the next
      turn and deadlocks never happen.
      Signed-off-by: NHitoshi Yamamoto <Yamamoto.Hitoshi@ap.MitsubishiElectric.co.jp>
      Signed-off-by: NHirokazu Takata <takata@linux-m32r.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      91f4ab05
    • B
      [PATCH] Fix hardcoded cpu=0 in workqueue for per_cpu_ptr() calls · bce61dd4
      Ben Collins 提交于
      Tracked this down on an Ultra Enterprise 3000.  It's a 6-way machine.  Odd
      thing about this machine (and it's good for finding bugs like this) is that
      the CPU id's are not 0 based.  For instance, on my machine the CPU's are
      6/7/10/11/14/15.
      
      This caused some NULL pointer dereference in kernel/workqueue.c because for
      single_threaded workqueue's, it hardcoded the cpu to 0.
      
      I changed the 0's to any_online_cpu(cpu_online_mask), which cpumask.h
      claims is "First cpu in mask".  So this fits the same usage.
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      bce61dd4
    • O
      [PATCH] fix 32bit overflow in timespec_to_sample() · ee500f27
      Oleg Nesterov 提交于
      fix 32bit overflow in timespec_to_sample()
      Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ee500f27
    • C
      [PATCH] fix broken lib/genalloc.c · 46596338
      Chris Humbert 提交于
      genalloc improperly stores the sizes of freed chunks, allocates overlapping
      memory regions, and oopses after its in-band data is overwritten.
      Signed-off-by: NChris Humbert <mahadri-kernel@drigon.com>
      Cc: Jes Sorensen <jes@trained-monkey.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      46596338
    • O
      [PATCH] reiserfs: fix 32-bit overflow in map_block_for_writepage() · 7729ac5e
      Oleg Drokin 提交于
      I now see another overflow in reiserfs that should lead to data corruptions
      with files that are bigger than 4G under certain circumstances when using
      mmap.
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7729ac5e
    • B
      [PATCH] Console rotation fixes · 1a9c3f78
      Benjamin Herrenschmidt 提交于
      Remove bogus usage of test/set_bit() from fbcon rotation code and just
      manipulate the bits directly.  This fixes an oops on powerpc among others
      and should be faster.  Seems to work fine on the G5 here.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NAntonino Daplas <adaplas@pol.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      1a9c3f78
    • D
      [PATCH] FRV: Make the FRV arch work again · 8080f231
      David Howells 提交于
      The attached patch implements a bunch of small changes to the FRV arch to
      make it work again.
      
      It deals with the following problems:
      
       (1) SEM_DEBUG should be SEMAPHORE_DEBUG.
      
       (2) The argument list to pcibios_penalize_isa_irq() has changed.
      
       (3) CONFIG_HIGHMEM can't be used directly in #if as it may not be defined.
      
       (4) page->private is no longer directly accessible.
      
       (5) linux/hardirq.h assumes asm/hardirq.h will include linux/irq.h
      
       (6) The IDE MMIO access functions are given pointers, not integers, and so
           get type casting errors.
      
       (7) __pa() is passed an explicit u64 type in drivers/char/mem.c, but that
           can't be cast directly to a pointer on a 32-bit platform.
      
       (8) SEMAPHORE_DEBUG should not be contingent on WAITQUEUE_DEBUG as that no
           longer exists.
      
       (9) PREEMPT_ACTIVE is too low a value.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8080f231
    • A
      [PATCH] fork.c: proc_fork_connector() called under write_lock() · c13cf856
      Andrew Morton 提交于
      Don't do that - it does GFP_KERNEL allocations, for a start.
      
      (Reported by Guillaume Thouvenin <guillaume.thouvenin@bull.net>)
      Acked-by: NMatt Helsley <matthltc@us.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c13cf856
    • A
      [PATCH] memory_sysdev_class is static · ff88a3b2
      Andrew Morton 提交于
      So don't define it as extern in the header file.
      
      drivers/base/memory.c:28: error: static declaration of 'memory_sysdev_class' follows non-static declaration
      include/linux/memory.h:88: error: previous declaration of 'memory_sysdev_class' was here
      
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ff88a3b2
    • A
      [PATCH] clean up lock_cpu_hotplug() in cpufreq · a9d9baa1
      Ashok Raj 提交于
      There are some callers in cpufreq hotplug notify path that the lowest
      function calls lock_cpu_hotplug().  The lock is already held during
      cpu_up() and cpu_down() calls when the notify calls are broadcast to
      registered clients.
      
      Ideally if possible, we could disable_preempt() at the highest caller and
      make sure we dont sleep in the path down in cpufreq->driver_target() calls
      but the calls are so intertwined and cumbersome to cleanup.
      
      Hence we consistently use lock_cpu_hotplug() and unlock_cpu_hotplug() in
      all places.
      
       - Removed export of cpucontrol semaphore and made it static.
       - removed explicit uses of up/down with lock_cpu_hotplug()
         so we can keep track of the the callers in same thread context and
         just keep refcounts without calling a down() that causes a deadlock.
       - Removed current_in_hotplug() uses
       - Removed PF_HOTPLUG_CPU in sched.h introduced for the current_in_hotplug()
         temporary workaround.
      
      Tested with insmod of cpufreq_stat.ko, and logical online/offline
      to make sure we dont have any hang situations.
      Signed-off-by: NAshok Raj <ashok.raj@intel.com>
      Cc: Zwane Mwaikambo <zwane@linuxpower.ca>
      Cc: Shaohua Li <shaohua.li@intel.com>
      Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a9d9baa1
    • A
      [PATCH] Workaround for gcc 2.96 (undefined references) · e0f39591
      Alan Stern 提交于
        LD      .tmp_vmlinux1
      mm/built-in.o(.text+0x100d6): In function `copy_page_range':
      : undefined reference to `__pud_alloc'
      mm/built-in.o(.text+0x1010b): In function `copy_page_range':
      : undefined reference to `__pmd_alloc'
      mm/built-in.o(.text+0x11ef4): In function `__handle_mm_fault':
      : undefined reference to `__pud_alloc'
      fs/built-in.o(.text+0xc930): In function `install_arg_page':
      : undefined reference to `__pud_alloc'
      make: *** [.tmp_vmlinux1] Error 1
      
      Those missing references in mm/memory.c arise from this code in
      include/linux/mm.h, combined with the fact that __PGTABLE_PMD_FOLDED and
      __PGTABLE_PUD_FOLDED are both set and __ARCH_HAS_4LEVEL_HACK is not:
      
      /*
       * The following ifdef needed to get the 4level-fixup.h header to work.
       * Remove it when 4level-fixup.h has been removed.
       */
      #if defined(CONFIG_MMU) && !defined(__ARCH_HAS_4LEVEL_HACK)
      static inline pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
      {
              return (unlikely(pgd_none(*pgd)) && __pud_alloc(mm, pgd, address))?
                      NULL: pud_offset(pgd, address);
      }
      
      static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
      {
              return (unlikely(pud_none(*pud)) && __pmd_alloc(mm, pud, address))?
                      NULL: pmd_offset(pud, address);
      }
      #endif /* CONFIG_MMU && !__ARCH_HAS_4LEVEL_HACK */
      
      With my configuration the pgd_none and pud_none routines are inlines
      returning a constant 0.  Apparently the old compiler avoids generating
      calls to __pud_alloc and __pmd_alloc but still lists them as undefined
      references in the module's symbol table.
      
      I don't know which change caused this problem.  I think it was added
      somewhere between 2.6.14 and 2.6.15-rc1, because I remember building
      several 2.6.14-rc kernels without difficulty.  However I can't point to an
      individual culprit.
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e0f39591
    • D
      [PATCH] sparc: convert IO remapping to VM_PFNMAP · 5cd9194a
      David S. Miller 提交于
      Here are the Sparc bits.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5cd9194a
    • L
      mm: re-architect the VM_UNPAGED logic · 6aab341e
      Linus Torvalds 提交于
      This replaces the (in my opinion horrible) VM_UNMAPPED logic with very
      explicit support for a "remapped page range" aka VM_PFNMAP.  It allows a
      VM area to contain an arbitrary range of page table entries that the VM
      never touches, and never considers to be normal pages.
      
      Any user of "remap_pfn_range()" automatically gets this new
      functionality, and doesn't even have to mark the pages reserved or
      indeed mark them any other way.  It just works.  As a side effect, doing
      mmap() on /dev/mem works for arbitrary ranges.
      
      Sparc update from David in the next commit.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6aab341e
  2. 28 11月, 2005 3 次提交
  3. 26 11月, 2005 7 次提交
  4. 25 11月, 2005 11 次提交
  5. 24 11月, 2005 5 次提交