1. 02 7月, 2011 28 次提交
  2. 29 6月, 2011 7 次提交
  3. 16 6月, 2011 1 次提交
  4. 15 6月, 2011 1 次提交
  5. 13 6月, 2011 1 次提交
  6. 12 6月, 2011 2 次提交
    • J
      ISDN, hfcsusb: Don't leak in hfcsusb_ph_info() · 84860c72
      Jesper Juhl 提交于
      We leak the memory allocated to 'phi' when the variable goes out of scope
      in hfcsusb_ph_info().
      Signed-off-by: NJesper Juhl <jj@chaosbits.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      84860c72
    • M
      net: ep93xx_eth: fix DMA API violations · f1c089e3
      Mika Westerberg 提交于
      Russell King said:
      >
      > So, to summarize what its doing:
      >
      > 1. It allocates buffers for rx and tx.
      > 2. It maps them with dma_map_single().
      >       This transfers ownership of the buffer to the DMA device.
      > 3. In ep93xx_xmit,
      > 3a. It copies the data into the buffer with skb_copy_and_csum_dev()
      >       This violates the DMA buffer ownership rules - the CPU should
      >       not be writing to this buffer while it is (in principle) owned
      >       by the DMA device.
      > 3b. It then calls dma_sync_single_for_cpu() for the buffer.
      >       This transfers ownership of the buffer to the CPU, which surely
      >       is the wrong direction.
      > 4. In ep93xx_rx,
      > 4a. It calls dma_sync_single_for_cpu() for the buffer.
      >       This at least transfers the DMA buffer ownership to the CPU
      >       before the CPU reads the buffer
      > 4b. It then uses skb_copy_to_linear_data() to copy the data out.
      >       At no point does it transfer ownership back to the DMA device.
      > 5. When the driver is removed, it dma_unmap_single()'s the buffer.
      >       This transfers ownership of the buffer to the CPU.
      > 6. It frees the buffer.
      >
      > While it may work on ep93xx, it's not respecting the DMA API rules,
      > and with DMA debugging enabled it will probably encounter quite a few
      > warnings.
      
      This patch fixes these violations.
      Signed-off-by: NMika Westerberg <mika.westerberg@iki.fi>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Acked-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
      Tested-by: NPetr Stetiar <ynezz@true.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f1c089e3