1. 30 Apr, 2009 1 commit
  2. 26 Apr, 2009 2 commits
    • Joerg Roedel's avatar
      dma-debug: remove broken dma memory leak detection for 2.6.30 · 314eeac9
      Joerg Roedel authored
      The feature needs some more work because the notfier which is used to
      check for pending allocations is called before the device drivers
      ->remove() function. Therefore this feature reports false positives.
      
      A real fix for this issue is to introduce a new notifier event which sent
      _after_ the driver has deinitialized itself. That will done for the next
      kernel version.
      
      [ Impact: reduce the scope of CONFIG_DMA_API_DEBUG=y checks ]
      Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
      Cc: iommu@lists.linux-foundation.org
      LKML-Reference: <1240576557-22442-1-git-send-email-joerg.roedel@amd.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      314eeac9
    • Ming Lei's avatar
      locking: Documentation: lockdep-design.txt, fix note of state bits · 992d7ced
      Ming Lei authored
      From source code of get_usage_char(), the previous note is not correct,
      so fix it.
      
      static char get_usage_char(struct lock_class *class, enum lock_usage_bit bit)
      {
      	char c = '.';
      
      	if (class->usage_mask & lock_flag(bit + 2))/*LOCK_ENABLED_##STATE*/
      		c = '+';
      	if (class->usage_mask & lock_flag(bit)) {/*LOCK_USED_IN_##STATE*/
      		c = '-';
      		if (class->usage_mask & lock_flag(bit + 2))
      			c = '?';
      	}
      
      	return c;
      }
      
      note:
      
      1) The 'bit' parameter always is passed as  LOCK_USED_IN_##STATE
         or LOCK_USED_IN_##STATE_READ , from get_usage_chars().
      Signed-off-by: default avatarMing Lei <tom.leiming@gmail.com>
      LKML-Reference: <1240585806-5744-1-git-send-email-tom.leiming@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      992d7ced
  3. 23 Apr, 2009 1 commit
    • Ingo Molnar's avatar
      locking: clarify kernel-taint warning message · b48ccb09
      Ingo Molnar authored
      Andi Kleen reported this message triggering on non-lockdep kernels:
      
         Disabling lockdep due to kernel taint
      
      Clarify the message to say 'lock debugging' - debug_locks_off()
      turns off all things lock debugging, not just lockdep.
      
      [ Impact: change kernel warning message text ]
      Reported-by: default avatarAndi Kleen <andi@firstfloor.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      b48ccb09
  4. 18 Apr, 2009 1 commit
    • Steven Rostedt's avatar
      lockdep, x86: account for irqs enabled in paranoid_exit · 0300e7f1
      Steven Rostedt authored
      I hit the check_flags error of lockdep:
      
       WARNING: at kernel/lockdep.c:2893 check_flags+0x1a7/0x1d0()
       [...]
       hardirqs last  enabled at (12567): [<ffffffff8026206a>] local_bh_enable+0xaa/0x110
       hardirqs last disabled at (12569): [<ffffffff80610c76>] int3+0x16/0x40
       softirqs last  enabled at (12566): [<ffffffff80514d2b>] lock_sock_nested+0xfb/0x110
       softirqs last disabled at (12568): [<ffffffff8058454e>] tcp_prequeue_process+0x2e/0xa0
      
      The check_flags warning of lockdep tells me that lockdep thought interrupts
      were disabled, but they were really enabled.
      
      The numbers in the above parenthesis show the order of events:
      
       12566: softirqs last enabled:  lock_sock_nested
       12567: hardirqs last enabled:  local_bh_enable
       12568: softirqs last disabled: tcp_prequeue_process
       12566: hardirqs last disabled: int3
      
      int3 is a breakpoint!
      
      Examining this further, I have CONFIG_NET_TCPPROBE enabled which adds
      break points into the kernel.
      
      The paranoid_exit of the return of int3 does not account for enabling
      interrupts on return to kernel. This code is a bit tricky since it
      is also used by the nmi handler (when lockdep is off), and we must be
      careful about the swapgs. We can not call kernel code after the swapgs
      has been performed.
      
      [ Impact: fix lockdep check_flags warning + self-turn-off ]
      Acked-by: default avatarPeter Zijlsta <a.p.zijlstra@chello.nl>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      0300e7f1
  5. 17 Apr, 2009 1 commit
    • Peter Zijlstra's avatar
      lockdep: more robust lockdep_map init sequence · c8a25005
      Peter Zijlstra authored
      Steven Rostedt reported:
      
      > OK, I think I figured this bug out. This is a lockdep issue with respect
      > to tracepoints.
      >
      > The trace points in lockdep are called all the time. Outside the lockdep
      > logic. But if lockdep were to trigger an error / warning (which this run
      > did) we might be in trouble. For new locks, like the dentry->d_lock, that
      > are created, they will not get a name:
      >
      > void lockdep_init_map(struct lockdep_map *lock, const char *name,
      >                       struct lock_class_key *key, int subclass)
      > {
      >         if (unlikely(!debug_locks))
      >                 return;
      >
      > When a problem is found by lockdep, debug_locks becomes false. Thus we
      > stop allocating names for locks. This dentry->d_lock I had, now has no
      > name. Worse yet, I have CONFIG_DEBUG_VM set, that scrambles non
      > initialized memory. Thus, when the trace point was hit, it had junk for
      > the lock->name, and the machine crashed.
      
      Ah, nice catch. I think we should put at least the name in regardless.
      
      Ensure we at least initialize the trivial entries of the depmap so that
      they can be relied upon, even when lockdep itself decided to pack up and
      go home.
      
      [ Impact: fix lock tracing after lockdep warnings. ]
      Reported-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1239954049.23397.4156.camel@laptop>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c8a25005
  6. 16 Apr, 2009 1 commit
  7. 14 Apr, 2009 4 commits
    • Paul E. McKenney's avatar
      rcu: Make hierarchical RCU less IPI-happy · ef631b0c
      Paul E. McKenney authored
      This patch fixes a hierarchical-RCU performance bug located by Anton
      Blanchard.  The problem stems from a misguided attempt to provide a
      work-around for jiffies-counter failure.  This work-around uses a per-CPU
      n_rcu_pending counter, which is incremented on each call to rcu_pending(),
      which in turn is called from each scheduling-clock interrupt.  Each CPU
      then treats this counter as a surrogate for the jiffies counter, so
      that if the jiffies counter fails to advance, the per-CPU n_rcu_pending
      counter will cause RCU to invoke force_quiescent_state(), which in turn
      will (among other things) send resched IPIs to CPUs that have thus far
      failed to pass through an RCU quiescent state.
      
      Unfortunately, each CPU resets only its own counter after sending a
      batch of IPIs.  This means that the other CPUs will also (needlessly)
      send -another- round of IPIs, for a full N-squared set of IPIs in the
      worst case every three scheduler-clock ticks until the grace period
      finally ends.  It is not reasonable for a given CPU to reset each and
      every n_rcu_pending for all the other CPUs, so this patch instead simply
      disables the jiffies-counter "training wheels", thus eliminating the
      excessive IPIs.
      
      Note that the jiffies-counter IPIs do not have this problem due to
      the fact that the jiffies counter is global, so that the CPU sending
      the IPIs can easily reset things, thus preventing the other CPUs from
      sending redundant IPIs.
      
      Note also that the n_rcu_pending counter remains, as it will continue to
      be used for tracing.  It may also see use to update the jiffies counter,
      should an appropriate kick-the-jiffies-counter API appear.
      Located-by: default avatarAnton Blanchard <anton@au1.ibm.com>
      Tested-by: default avatarAnton Blanchard <anton@au1.ibm.com>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: anton@samba.org
      Cc: akpm@linux-foundation.org
      Cc: dipankar@in.ibm.com
      Cc: manfred@colorfullife.com
      Cc: cl@linux-foundation.org
      Cc: josht@linux.vnet.ibm.com
      Cc: schamp@sgi.com
      Cc: niv@us.ibm.com
      Cc: dvhltc@us.ibm.com
      Cc: ego@in.ibm.com
      Cc: laijs@cn.fujitsu.com
      Cc: rostedt@goodmis.org
      Cc: peterz@infradead.org
      Cc: penberg@cs.helsinki.fi
      Cc: andi@firstfloor.org
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      LKML-Reference: <12396834793575-git-send-email->
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      ef631b0c
    • Ingo Molnar's avatar
      lockdep: warn about lockdep disabling after kernel taint, fix · 27b19565
      Ingo Molnar authored
      Impact: build fix for Sparc and s390
      
      Stephen Rothwell reported that the Sparc build broke:
      
       In file included from kernel/panic.c:12:
       include/linux/debug_locks.h: In function '__debug_locks_off':
       include/linux/debug_locks.h:15: error: implicit declaration of function 'xchg'
      
      due to:
      
       9eeba613: lockdep: warn about lockdep disabling after kernel taint
      
      There is some inconsistency between architectures about where exactly
      xchg() is defined.
      
      The traditional place is in system.h but the more logical point for it
      is in atomic.h - where most architectures (especially new ones) have
      it defined. These architecture also still offer it via system.h.
      
      Some, such as Sparc or s390 only have it in asm/system.h and not available
      via asm/atomic.h at all.
      
      Use the widest set of headers in debug_locks.h and also include asm/system.h.
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <20090414144317.026498df.sfr@canb.auug.org.au>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      27b19565
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of... · b21597d0
      Linus Torvalds authored
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
        tomoyo: version bump to 2.2.0.
        tomoyo: add Documentation/tomoyo.txt
      b21597d0
    • Linus Torvalds's avatar
      Fix quilt merge error in acpi-cpufreq.c · 1c98aa74
      Linus Torvalds authored
      We ended up incorrectly using '&cur' instead of '&readin' in the
      work_on_cpu() -> smp_call_function_single() transformation in commit
      01599fca ("cpufreq: use
      smp_call_function_[single|many]() in acpi-cpufreq.c").
      
      Andrew explains:
       "OK, the acpi tree went and had conflicting changes merged into it after
        I'd written the patch and it appears that I incorrectly reverted part
        of 18b2646f while fixing the resulting
        rejects.
      
        Switching it to `readin' looks correct."
      Acked-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1c98aa74
  8. 13 Apr, 2009 29 commits