1. 27 4月, 2009 2 次提交
    • J
      dma-debug: remove broken dma memory leak detection for 2.6.30 · 314eeac9
      Joerg Roedel 提交于
      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: NJoerg 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: NIngo Molnar <mingo@elte.hu>
      314eeac9
    • M
      locking: Documentation: lockdep-design.txt, fix note of state bits · 992d7ced
      Ming Lei 提交于
      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: NMing Lei <tom.leiming@gmail.com>
      LKML-Reference: <1240585806-5744-1-git-send-email-tom.leiming@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      992d7ced
  2. 23 4月, 2009 1 次提交
    • I
      locking: clarify kernel-taint warning message · b48ccb09
      Ingo Molnar 提交于
      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: NAndi Kleen <andi@firstfloor.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b48ccb09
  3. 18 4月, 2009 2 次提交
    • S
      lockdep, x86: account for irqs enabled in paranoid_exit · 0300e7f1
      Steven Rostedt 提交于
      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: NPeter Zijlsta <a.p.zijlstra@chello.nl>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0300e7f1
    • P
      lockdep: more robust lockdep_map init sequence · c8a25005
      Peter Zijlstra 提交于
      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: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NSteven 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: NIngo Molnar <mingo@elte.hu>
      c8a25005
  4. 17 4月, 2009 1 次提交
  5. 14 4月, 2009 34 次提交