1. 23 1月, 2010 1 次提交
  2. 21 12月, 2009 1 次提交
    • S
      dma-debug: Do not add notifier when dma debugging is disabled. · f797d988
      Shaun Ruffell 提交于
      If CONFIG_HAVE_DMA_API_DEBUG is defined and "dma_debug=off" is
      specified on the kernel command line, when you detach a driver from a
      device you can cause the following NULL pointer dereference:
      
      BUG: unable to handle kernel NULL pointer dereference at (null)
      IP: [<c0580d35>] dma_debug_device_change+0x5d/0x117
      
      The problem is that the dma_debug_device_change notifier function is
      added to the bus notifier chain even though the dma_entry_hash array
      was never initialized.  If dma debugging is disabled, this patch both
      prevents dma_debug_device_change notifiers from being added to the
      chain, and additionally ensures that the dma_debug_device_change
      notifier function is a no-op.
      
      Cc: stable@kernel.org
      Signed-off-by: NShaun Ruffell <sruffell@digium.com>
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      f797d988
  3. 04 12月, 2009 1 次提交
  4. 29 10月, 2009 1 次提交
  5. 21 8月, 2009 1 次提交
    • K
      dma-debug: Fix check_unmap null pointer dereference · ec9c96ef
      Kyle McMartin 提交于
      While it's debatable whether or not a NULL device argument to
      the DMA API functions is valid... since it certainly isn't
      valid on devices with an IOMMU... dma-debug really shouldn't be
      dereferencing null pointers either.
      
      Guard against that in err_printk and the driver_filter
      functions. A Fedora rawhide user was seeing this in one of the
      dvb drivers resulting in an oops on boot.
      
      [ A patch has been sent for testing to the driver, but I feel
        the dma debugging support should be fixed as well. (There's
        still a pile of legacy garbage in the kernel passing null
        pointers to dma_{alloc,free}_*. :( ]
      Signed-off-by: NKyle McMartin <kyle@redhat.com>
      Cc: mchehab@infradead.org
      Cc: Joerg Roedel <joerg.roedel@amd.com>
      LKML-Reference: <20090820011708.GP25206@bombadil.infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ec9c96ef
  6. 11 7月, 2009 1 次提交
    • I
      dma-debug: Fix the overlap() function to be correct and readable · f39d1b97
      Ingo Molnar 提交于
      Linus noticed how unclean and buggy the overlap() function is:
      
       - It uses convoluted (and bug-causing) positive checks for
         range overlap - instead of using a more natural negative
         check.
      
       - Even the positive checks are buggy: a positive intersection
         check has four natural cases while we checked only for three,
         missing the (addr < start && addr2 == end) case for example.
      
       - The variables are mis-named, making it non-obvious how the
         check was done.
      
       - It needlessly uses u64 instead of unsigned long. Since these
         are kernel memory pointers and we explicitly exclude highmem
         ranges anyway we cannot ever overflow 32 bits, even if we
         could. (and on 64-bit it doesnt matter anyway)
      
      All in one, this function needs a total revamp. I used Linus's
      suggestions minus the paranoid checks (we cannot overflow really
      because if we get totally bad DMA ranges passed far more things
      break in the systems than just DMA debugging). I also fixed a
      few other small details i noticed.
      Reported-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Joerg Roedel <joerg.roedel@amd.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f39d1b97
  7. 17 6月, 2009 1 次提交
  8. 16 6月, 2009 1 次提交
  9. 15 6月, 2009 2 次提交
  10. 08 6月, 2009 5 次提交
  11. 07 6月, 2009 1 次提交
  12. 02 6月, 2009 3 次提交
  13. 29 5月, 2009 3 次提交
  14. 28 5月, 2009 1 次提交
  15. 27 4月, 2009 1 次提交
    • 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
  16. 15 4月, 2009 1 次提交
  17. 31 3月, 2009 1 次提交
    • R
      dma-debug: fix printk formats (i386) · 93c36ed8
      Randy Dunlap 提交于
      Fix printk format warnings in dma-debug:
      
        lib/dma-debug.c:645: warning: format '%016llx' expects type 'long long unsigned int', but argument 6 has type 'dma_addr_t'
        lib/dma-debug.c:662: warning: format '%016llx' expects type 'long long unsigned int', but argument 6 has type 'dma_addr_t'
        lib/dma-debug.c:676: warning: format '%016llx' expects type 'long long unsigned int', but argument 6 has type 'dma_addr_t'
        lib/dma-debug.c:686: warning: format '%016llx' expects type 'long long unsigned int', but argument 6 has type 'dma_addr_t'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      93c36ed8
  18. 24 3月, 2009 1 次提交
  19. 19 3月, 2009 1 次提交
  20. 17 3月, 2009 4 次提交
  21. 06 3月, 2009 8 次提交