1. 14 8月, 2015 3 次提交
  2. 18 3月, 2015 5 次提交
  3. 27 11月, 2014 3 次提交
  4. 04 11月, 2014 1 次提交
  5. 20 10月, 2014 1 次提交
  6. 24 9月, 2014 1 次提交
  7. 23 7月, 2014 1 次提交
  8. 13 3月, 2014 1 次提交
  9. 14 1月, 2014 1 次提交
  10. 09 1月, 2014 1 次提交
  11. 08 1月, 2014 1 次提交
  12. 31 10月, 2013 2 次提交
  13. 01 10月, 2013 1 次提交
  14. 26 9月, 2013 1 次提交
  15. 15 8月, 2013 6 次提交
  16. 26 6月, 2013 1 次提交
  17. 25 6月, 2013 1 次提交
  18. 18 6月, 2013 7 次提交
  19. 18 5月, 2013 1 次提交
  20. 17 5月, 2013 1 次提交
    • S
      USB: set device dma_mask without reference to global data · 3b9561e9
      Stephen Warren 提交于
      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: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NTony Prisk <linux@prisktech.co.nz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3b9561e9