1. 22 Jul, 2014 1 commit
  2. 12 Mar, 2014 1 commit
  3. 13 Jan, 2014 1 commit
  4. 08 Jan, 2014 1 commit
  5. 07 Jan, 2014 1 commit
  6. 31 Oct, 2013 2 commits
  7. 30 Sep, 2013 1 commit
  8. 25 Sep, 2013 1 commit
  9. 14 Aug, 2013 6 commits
  10. 25 Jun, 2013 1 commit
  11. 24 Jun, 2013 1 commit
  12. 17 Jun, 2013 7 commits
  13. 17 May, 2013 1 commit
  14. 16 May, 2013 1 commit
    • Stephen Warren's avatar
      USB: set device dma_mask without reference to global data · 3b9561e9
      Stephen Warren authored
      Many USB host drivers contain code such as:
      
      if (!pdev->dev.dma_mask)
              pdev->dev.dma_mask = &tegra_ehci_dma_mask;
      
      ... where tegra_ehci_dma_mask is a global. I suspect this code originated
      in commit 4a53f4e6
      
       "USB: ehci-tegra: add probing through device tree" and
      was simply copied everywhere else.
      
      This works fine when the code is built-in, but can cause a crash when the
      code is in a module. The first module load sets up the dma_mask pointer,
      but if the module is removed and re-inserted, the value is now non-NULL,
      and hence is not updated to point at the new location, and hence points
      at a stale location within the previous module load address, which in
      turn causes a crash if the pointer is de-referenced.
      
      The simplest way of solving this seems to be to copy the code from
      ehci-platform.c, which uses the coherent_dma_mask as the target for the
      dma_mask pointer.
      Suggested-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarTony Prisk <linux@prisktech.co.nz>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3b9561e9
  15. 30 Mar, 2013 1 commit
  16. 21 Nov, 2012 4 commits
  17. 12 Sep, 2012 2 commits
  18. 09 Jul, 2012 1 commit