1. 29 11月, 2017 3 次提交
  2. 28 11月, 2017 21 次提交
  3. 27 11月, 2017 11 次提交
  4. 26 11月, 2017 3 次提交
  5. 25 11月, 2017 2 次提交
    • R
      net: sched: crash on blocks with goto chain action · a60b3f51
      Roman Kapl 提交于
      tcf_block_put_ext has assumed that all filters (and thus their goto
      actions) are destroyed in RCU callback and thus can not race with our
      list iteration. However, that is not true during netns cleanup (see
      tcf_exts_get_net comment).
      
      Prevent the user after free by holding all chains (except 0, that one is
      already held). foreach_safe is not enough in this case.
      
      To reproduce, run the following in a netns and then delete the ns:
          ip link add dtest type dummy
          tc qdisc add dev dtest ingress
          tc filter add dev dtest chain 1 parent ffff: handle 1 prio 1 flower action goto chain 2
      
      Fixes: 822e86d9 ("net_sched: remove tcf_block_put_deferred()")
      Signed-off-by: NRoman Kapl <code@rkapl.cz>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a60b3f51
    • M
      net: thunderbolt: Stop using zero to mean no valid DMA mapping · 540c1115
      Mika Westerberg 提交于
      Commit 86dabda4 ("net: thunderbolt: Clear finished Tx frame bus
      address in tbnet_tx_callback()") fixed a DMA-API violation where the
      driver called dma_unmap_page() in tbnet_free_buffers() for a bus address
      that might already be unmapped. The fix was to zero out the bus address
      of a frame in tbnet_tx_callback().
      
      However, as pointed out by David Miller, zero might well be valid
      mapping (at least in theory) so it is not good idea to use it here.
      
      It turns out that we don't need the whole map/unmap dance for Tx buffers
      at all. Instead we can map the buffers when they are initially allocated
      and unmap them when the interface is brought down. In between we just
      DMA sync the buffers for the CPU or device as needed.
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      540c1115