1. 19 10月, 2010 1 次提交
  2. 06 10月, 2010 1 次提交
    • L
      modules: Fix module_bug_list list corruption race · 5336377d
      Linus Torvalds 提交于
      With all the recent module loading cleanups, we've minimized the code
      that sits under module_mutex, fixing various deadlocks and making it
      possible to do most of the module loading in parallel.
      
      However, that whole conversion totally missed the rather obscure code
      that adds a new module to the list for BUG() handling.  That code was
      doubly obscure because (a) the code itself lives in lib/bugs.c (for
      dubious reasons) and (b) it gets called from the architecture-specific
      "module_finalize()" rather than from generic code.
      
      Calling it from arch-specific code makes no sense what-so-ever to begin
      with, and is now actively wrong since that code isn't protected by the
      module loading lock any more.
      
      So this commit moves the "module_bug_{finalize,cleanup}()" calls away
      from the arch-specific code, and into the generic code - and in the
      process protects it with the module_mutex so that the list operations
      are now safe.
      
      Future fixups:
       - move the module list handling code into kernel/module.c where it
         belongs.
       - get rid of 'module_bug_list' and just use the regular list of modules
         (called 'modules' - imagine that) that we already create and maintain
         for other reasons.
      Reported-and-tested-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Adrian Bunk <bunk@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      5336377d
  3. 02 10月, 2010 1 次提交
  4. 23 9月, 2010 1 次提交
  5. 01 9月, 2010 1 次提交
    • S
      tracing/lockdep: Fix dependency of TRACE_IRQFLAGS · 46b93b74
      Steven Rostedt 提交于
      When CONFIG_IRQSOFF_TRACER is set and CONFIG_PROVE_LOCKING is not, we
      get the following error:
      
      $  make oldconfig
      scripts/kconfig/conf --oldconfig arch/x86/Kconfig
      warning: (IRQSOFF_TRACER && TRACING_SUPPORT && FTRACE && TRACE_IRQFLAGS_SUPPORT && !ARCH_USES_GETTIMEOFFSET) selects TRACE_IRQFLAGS which has unmet direct dependencies (DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && PROVE_LOCKING)
      warning: (IRQSOFF_TRACER && TRACING_SUPPORT && FTRACE && TRACE_IRQFLAGS_SUPPORT && !ARCH_USES_GETTIMEOFFSET) selects TRACE_IRQFLAGS which has unmet direct dependencies (DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && PROVE_LOCKING)
      
      This is because IRQSOFF_TRACER selects TRACE_IRQFLAGS but TRACE_IRQFLAGS
      has PROVE_LOCKING as a dependency. This code is incorrect, and
      this patch changes the TRACE_IRQFLAGS to be just a simple bool that
      does not depend or select anything. Instead both IRQSOFF_TRACER and
      PROVE_LOCKING select it.
      Reported-by: NRichard Kennedy <richard@rsk.demon.co.uk>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      46b93b74
  6. 31 8月, 2010 1 次提交
  7. 30 8月, 2010 1 次提交
  8. 24 8月, 2010 1 次提交
  9. 23 8月, 2010 2 次提交
    • D
      radix-tree: radix_tree_range_tag_if_tagged() can set incorrect tags · 144dcfc0
      Dave Chinner 提交于
      Commit ebf8aa44 ("radix-tree:
      omplement function radix_tree_range_tag_if_tagged") does not safely
      set tags on on intermediate tree nodes. The code walks down the tree
      setting tags before it has fully resolved the path to the leaf under
      the assumption there will be a leaf slot with the tag set in the
      range it is searching.
      
      Unfortunately, this is not a valid assumption - we can abort after
      setting a tag on an intermediate node if we overrun the number of
      tags we are allowed to set in a batch, or stop scanning because we
      we have passed the last scan index before we reach a leaf slot with
      the tag we are searching for set.
      
      As a result, we can leave the function with tags set on intemediate
      nodes which can be tripped over later by tag-based lookups. The
      result of these stale tags is that lookup may end prematurely or
      livelock because the lookup cannot make progress.
      
      The fix for the problem involves reocrding the traversal path we
      take to the leaf nodes, and only propagating the tags back up the
      tree once the tag is set in the leaf node slot. We are already
      recording the path for efficient traversal, so there is no
      additional overhead to do the intermediately node tag setting in
      this manner.
      
      This fixes a radix tree lookup livelock triggered by the new
      writeback sync livelock avoidance code introduced in commit
      f446daae ("mm: implement writeback
      livelock avoidance using page tagging").
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Acked-by: NJan Kara <jack@suse.cz>
      144dcfc0
    • D
      radix-tree: clear all tags in radix_tree_node_rcu_free · b6dd0865
      Dave Chinner 提交于
      Commit f446daae ("mm: implement
      writeback livelock avoidance using page tagging") introduced a new
      radix tree tag, increasing the number of tags in each node from 2 to
      3. It did not, however, fix up the code in
      radix_tree_node_rcu_free() that cleans up after radix_tree_shrink()
      and hence could leave stray tags set in the new tag array.
      
      The result is that the livelock avoidance code added in the the
      above commit would hit stale tags when doing tag based lookups,
      resulting in livelocks when trying to traverse the tree.
      
      Fix this problem in radix_tree_node_rcu_free() so it doesn't happen
      again in the future by using a loop to walk all the tags up to
      RADIX_TREE_MAX_TAGS to clear the stray tags radix_tree_shrink()
      leaves behind.
      Signed-off-by: NDave Chinner <dchinner@redhat.com>
      Acked-by: NNick Piggin <npiggin@kernel.dk>
      Acked-by: NJan Kara <jack@suse.cz>
      b6dd0865
  10. 21 8月, 2010 1 次提交
  11. 17 8月, 2010 1 次提交
    • R
      latencytop: Fix kconfig dependency warnings · 625fdcaa
      Randy Dunlap 提交于
      warning: (LATENCYTOP && HAVE_LATENCYTOP_SUPPORT) selects
      SCHED_DEBUG which has unmet direct dependencies (DEBUG_KERNEL &&
      PROC_FS) warning: (LATENCYTOP && HAVE_LATENCYTOP_SUPPORT) selects
      SCHEDSTATS which has unmet direct dependencies (DEBUG_KERNEL && PROC_FS)
      
      Add depends on STACKTRACE_SUPPORT for 'select STACKTRACE'.
      Add depends on PROC_FS since that is where the output goes.
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      LKML-Reference: <20100812123121.a7c99cde.randy.dunlap@oracle.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      625fdcaa
  12. 13 8月, 2010 1 次提交
    • D
      MN10300: Don't try and #include <linux/slab.h> in lib/inflate.c from bootloader · 1490cf5f
      David Howells 提交于
      Don't try and #include <linux/slab.h> in lib/inflate.c from the bootloader code
      as linux/slab.h hauls in function defs that aren't available in the bootloader
      code and may also haul in conflicting functions.
      
      To fix this, make the inclusion of linux/slab.h contingent on NO_INFLATE_MALLOC
      as are the usages of kmalloc() and kfree().
      
      In MN10300, this causes the following errors:
      
      In file included from include/linux/string.h:21,
                       from include/linux/bitmap.h:8,
                       from include/linux/nodemask.h:93,
                       from include/linux/mmzone.h:16,
                       from include/linux/gfp.h:4,
                       from include/linux/slab.h:12,
                       from arch/mn10300/boot/compressed/../../../../lib/inflate.c:106,
                       from arch/mn10300/boot/compressed/misc.c:170:
      /warthog/am33/linux-2.6-mn10300/arch/mn10300/include/asm/string.h:19: error: conflicting types for 'memset'
      arch/mn10300/boot/compressed/misc.c:59: error: previous definition of 'memset' was here
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1490cf5f
  13. 12 8月, 2010 2 次提交
  14. 11 8月, 2010 4 次提交
  15. 10 8月, 2010 11 次提交
  16. 06 8月, 2010 1 次提交
    • R
      debugfs: no longer needs to depend on SYSFS · c462e8cd
      Randy Dunlap 提交于
      debugfs no longer uses 'kernel_subsys' (which is gone), and other
      kernel/ksysfs.c code is always built, so DEBUG_FS does not need
      to depend on SYSFS.
      
      Fixes this kconfig warning:
      
      warning: (TREE_RCU_TRACE || AMD_IOMMU_STATS && AMD_IOMMU || MTD_UBI_DEBUG && MTD && SYSFS && MTD_UBI || UBIFS_FS_DEBUG && MISC_FILESYSTEMS && UBIFS_FS || DEBUG_KMEMLEAK && DEBUG_KERNEL && EXPERIMENTAL && !MEMORY_HOTPLUG && (X86 || ARM || PPC || S390 || SPARC64 || SUPERH || MICROBLAZE) && SYSFS || TRACING || X86_PTDUMP && DEBUG_KERNEL || BLK_DEV_IO_TRACE && TRACING_SUPPORT && FTRACE && SYSFS && BLOCK) selects DEBUG_FS which has unmet direct dependencies (SYSFS)
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c462e8cd
  17. 04 8月, 2010 1 次提交
  18. 29 7月, 2010 1 次提交
    • C
      lib/scatterlist: Hook sg_kmalloc into kmemleak (v2) · b94de9bb
      Chris Wilson 提交于
      kmemleak ignores page_alloc() and so believes the final sub-page
      allocation using the plain kmalloc is decoupled and lost. This leads to
      lots of false-positives with code that uses scatterlists.
      
      The options seem to be either to tell kmemleak that the kmalloc is not
      leaked or to notify kmemleak of the page allocations. The danger of the
      first approach is that we may hide a real leak, so choose the latter
      approach (of which I am not sure of the downsides).
      
      v2: Added comments on the suggestion of Catalin.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Jens Axboe <jaxboe@fusionio.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      b94de9bb
  19. 27 7月, 2010 1 次提交
  20. 21 7月, 2010 1 次提交
  21. 19 7月, 2010 1 次提交
  22. 14 7月, 2010 2 次提交
  23. 12 7月, 2010 1 次提交
  24. 10 7月, 2010 1 次提交
    • K
      x86, ioremap: Fix incorrect physical address handling in PAE mode · ffa71f33
      Kenji Kaneshige 提交于
      Current x86 ioremap() doesn't handle physical address higher than
      32-bit properly in X86_32 PAE mode. When physical address higher than
      32-bit is passed to ioremap(), higher 32-bits in physical address is
      cleared wrongly. Due to this bug, ioremap() can map wrong address to
      linear address space.
      
      In my case, 64-bit MMIO region was assigned to a PCI device (ioat
      device) on my system. Because of the ioremap()'s bug, wrong physical
      address (instead of MMIO region) was mapped to linear address space.
      Because of this, loading ioatdma driver caused unexpected behavior
      (kernel panic, kernel hangup, ...).
      Signed-off-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      LKML-Reference: <4C1AE680.7090408@jp.fujitsu.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      ffa71f33