1. 04 10月, 2014 1 次提交
  2. 06 8月, 2014 1 次提交
    • M
      net: sun4i-emac: fix memory leak on bad packet · 2670cc69
      Marc Zyngier 提交于
      Upon reception of a new frame, the emac driver checks for a number
      of error conditions, and flag the packet as "bad" if any of these
      are present. It then allocates a skb unconditionally, but only uses
      it if the packet is "good". On the error path, the skb is just forgotten,
      and the system leaks memory.
      
      The piece of junk I have on my desk seems to encounter such error
      frequently enough so that the box goes OOM after a couple of days,
      which makes me grumpy.
      
      Fix this by moving the allocation on the "good_packet" path (and
      convert it to netdev_alloc_skb while we're at it).
      
      Tested on a random Allwinner A20 board.
      
      Cc: Stefan Roese <sr@denx.de>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: <stable@vger.kernel.org> # 3.11+
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2670cc69
  3. 26 6月, 2014 1 次提交
  4. 12 4月, 2014 1 次提交
    • M
      net: sun4i-emac: add promiscuous support · cec9ae50
      Marc Zyngier 提交于
      The sun4i-emac driver is rather primitive, and doesn't support
      promiscuous mode. This makes usage such as bridging impossible,
      which is a shame on virtualization capable HW such as the
      Allwinner A20.
      
      The fix is fairly simple: move the RX setup code to the ndo_set_rx_mode
      vector, and add the required HW configuration when IFF_PROMISC is passed
      by the core code.
      
      This has been tested on a generic A20 box running a few virtual
      machines hanging off a bridge with the EMAC chip as the link to the
      outside world.
      
      Cc: Stefan Roese <sr@denx.de>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Acked-by: NStefan Roese <sr@denx.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cec9ae50
  5. 25 3月, 2014 1 次提交
  6. 07 2月, 2014 1 次提交
  7. 17 1月, 2014 1 次提交
  8. 11 12月, 2013 1 次提交
  9. 05 6月, 2013 4 次提交
  10. 01 6月, 2013 1 次提交