1. 18 Oct, 2014 20 commits
  2. 17 Oct, 2014 8 commits
  3. 16 Oct, 2014 10 commits
  4. 15 Oct, 2014 2 commits
    • Claudiu Manoil's avatar
      gianfar: Add FCS to rx buffer size (fix) · f5b720b8
      Claudiu Manoil authored
      For each Rx frame the eTSEC writes its FCS (Frame Check Sequence)
      to the Rx buffer.
      
      The eTSEC h/w manual states in the "Receive Buffer Descriptor Field
      Descriptions" table:
      "Data length is the number of octets written by the eTSEC into this BD's
      data buffer if L is cleared (the value is equal to MRBLR), or, if L is
      set, the length of the frame including *CRC*, FCB (if RCTRL[PRSDEP > 00),
      preamble (if MACCFG2[PreAmRxEn]=1), time stamp (if RCTRL[TS] = 1) and
      any padding (RCTRL[PAL])."
      
      Though the FCS bytes are removed by the driver before passing the skb
      to the net stack, the Rx buffer size computation does not currently
      take into account the FCS bytes (4 bytes).
      Because the Rx buffer size is multiple of 512 bytes, leaving out the
      FCS is not a problem for the default MTU of 1500, as the Rx buffer size
      is 1536 in this case.  However, for custom MTUs, where the difference
      between the MTU size and the Rx buffer size is less, this can be a
      problem as the computed Rx buffer size won't be enough to accomodate
      the FCS for a received frame that is big enough (close to MTU size).
      In such case the received frame is considered to be incomplete (L flag
      not set in the RxBD status) and silently dropped.
      
      Note that the driver does not currently support S/G on Rx, so it has to
      compute its Rx buffer size based on the MTU of the device.
      Reported-by: default avatarKristian Otnes <kotnes@cisco.com>
      Signed-off-by: default avatarClaudiu Manoil <claudiu.manoil@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f5b720b8
    • Michael S. Tsirkin's avatar
      virtio_net: fix use after free · 4b7fd2e6
      Michael S. Tsirkin authored
      commit 0b725a2c
          net: Remove ndo_xmit_flush netdev operation, use signalling instead.
      
      added code that looks at skb->xmit_more after the skb has
      been put in TX VQ. Since some paths process the ring and free the skb
      immediately, this can cause use after free.
      
      Fix by storing xmit_more in a local variable.
      
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4b7fd2e6