1. 09 1月, 2016 2 次提交
  2. 08 1月, 2016 1 次提交
  3. 07 1月, 2016 3 次提交
  4. 06 1月, 2016 1 次提交
    • O
      6pack: fix free memory scribbles · 60aa3b08
      One Thousand Gnomes 提交于
      commit acf673a3 fixed a user triggerable free
      memory scribble but in doing so replaced it with a different one that allows
      the user to control the data and scribble even more.
      
      sixpack_close is called by the tty layer in tty context. The tty context is
      protected by sp_get() and sp_put(). However network layer activity via
      sp_xmit() is not protected this way. We must therefore stop the queue
      otherwise the user gets to dump a buffer mostly of their choice into freed
      kernel pages.
      Signed-off-by: NAlan Cox <alan@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      60aa3b08
  5. 05 1月, 2016 4 次提交
  6. 30 12月, 2015 1 次提交
  7. 29 12月, 2015 1 次提交
    • D
      RDMA/be2net: Remove open and close entry points · f41647ef
      Devesh Sharma 提交于
      Recently Dough Ledford reported a deadlock happening
      between ocrdma-load sequence and NetworkManager service
      issueing "open" on be2net interface.
      
      The deadlock happens when any be2net hook (e.g. open/close) is called
      in parallel to insmod ocrdma.ko.
      
      A. be2net is sending administrative open/close event to ocrdma holding
         device_list_mutex. It does this from ndo_open/ndo_stop hooks of be2net.
         So sequence of locks is rtnl_lock---> device_list lock
      
      B.  When new ocrdma roce device gets registered, infiniband stack now
          takes rtnl_lock in ib_register_device() in GID initialization routines.
          So sequence of locks in this path is device_list lock ---> rtnl_lock.
      
      This improper locking sequence causes deadlock.
      
      In order to resolve the above deadlock condition, ocrdma intorduced a
      patch to stop listening to administrative open/close events generated from
      be2net driver. It now depends on link-state-change async-event generated from
      CNA. This change leaves behind dead code which used to generate administrative
      open/close events. This patch cleans-up all that dead code from be2net.
      Reported-by: NDoug Ledford <dledford@redhat.com>
      CC: Sathya Perla <sathya.perla@avagotech.com>
      Signed-off-by: NPadmanabh Ratnakar <padmanabh.ratnakar@avagotech.com>
      Signed-off-by: NSelvin Xavier <selvin.xavier@avagotech.com>
      Signed-off-by: NDevesh Sharma <devesh.sharma@avagotech.com>
      Signed-off-by: NDoug Ledford <dledford@redhat.com>
      f41647ef
  8. 25 12月, 2015 1 次提交
  9. 24 12月, 2015 2 次提交
    • B
      net: cdc_ncm: avoid changing RX/TX buffers on MTU changes · 1dfddff5
      Bjørn Mork 提交于
      NCM buffer sizes are negotiated with the device independently of
      the network device MTU.  The RX buffers are allocated by the
      usbnet framework based on the rx_urb_size value set by cdc_ncm. A
      single RX buffer can hold a number of MTU sized packets.
      
      The default usbnet change_mtu ndo only modifies rx_urb_size if it
      is equal to hard_mtu.  And the cdc_ncm driver will set rx_urb_size
      and hard_mtu independently of each other, based on dwNtbInMaxSize
      and dwNtbOutMaxSize respectively. It was therefore assumed that
      usbnet_change_mtu() would never touch rx_urb_size.  This failed to
      consider the case where dwNtbInMaxSize and dwNtbOutMaxSize happens
      to be equal.
      
      Fix by implementing an NCM specific change_mtu ndo, modifying the
      netdev MTU without touching the buffer size settings.
      Signed-off-by: NBjørn Mork <bjorn@mork.no>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1dfddff5
    • P
      geneve: initialize needed_headroom · 184fc8b5
      Paolo Abeni 提交于
      Currently the needed_headroom field for the geneve device is left
      to the default value.
      
      This patch set it to space required for basic geneve encapsulation,
      so that we can avoid the skb head re-allocation on xmit.
      
      This give a 6% speedup for unsegment traffic on geneve tunnel.
      
      v1 -> v2:
        - add ETH_HLEN for the lower device to the needed headroom
      Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
      Acked-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
      Acked-by: NJohn W. Linville <linville@tuxdriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      184fc8b5
  10. 23 12月, 2015 2 次提交
    • S
      sh_eth: fix 16-bit descriptor field access endianness too · 5cbf20c7
      Sergei Shtylyov 提交于
      Commit 1299653a ("sh_eth: fix descriptor access endianness") only
      addressed the 32-bit buffer address field byte-swapping  but the driver
      still accesses 16-bit frame/buffer length descriptor fields without the
      necessary byte-swapping -- which should affect the big-endian kernels.
      In order to be able to use {cpu|edmac}_to_{edmac|cpu}(), we need to declare
      the RX/TX descriptor word 1 as a 32-bit field and use shifts/masking to
      access the 16-bit subfields (which gets rid of the ugly #ifdef'ery too)...
      Signed-off-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5cbf20c7
    • V
      veth: don’t modify ip_summed; doing so treats packets with bad checksums as good. · ce8c839b
      Vijay Pandurangan 提交于
      Packets that arrive from real hardware devices have ip_summed ==
      CHECKSUM_UNNECESSARY if the hardware verified the checksums, or
      CHECKSUM_NONE if the packet is bad or it was unable to verify it. The
      current version of veth will replace CHECKSUM_NONE with
      CHECKSUM_UNNECESSARY, which causes corrupt packets routed from hardware to
      a veth device to be delivered to the application. This caused applications
      at Twitter to receive corrupt data when network hardware was corrupting
      packets.
      
      We believe this was added as an optimization to skip computing and
      verifying checksums for communication between containers. However, locally
      generated packets have ip_summed == CHECKSUM_PARTIAL, so the code as
      written does nothing for them. As far as we can tell, after removing this
      code, these packets are transmitted from one stack to another unmodified
      (tcpdump shows invalid checksums on both sides, as expected), and they are
      delivered correctly to applications. We didn’t test every possible network
      configuration, but we tried a few common ones such as bridging containers,
      using NAT between the host and a container, and routing from hardware
      devices to containers. We have effectively deployed this in production at
      Twitter (by disabling RX checksum offloading on veth devices).
      
      This code dates back to the first version of the driver, commit
      <e314dbdc> ("[NET]: Virtual ethernet device driver"), so I
      suspect this bug occurred mostly because the driver API has evolved
      significantly since then. Commit <0b796750> ("net/veth: Fix
      packet checksumming") (in December 2010) fixed this for packets that get
      created locally and sent to hardware devices, by not changing
      CHECKSUM_PARTIAL. However, the same issue still occurs for packets coming
      in from hardware devices.
      Co-authored-by: NEvan Jones <ej@evanjones.ca>
      Signed-off-by: NEvan Jones <ej@evanjones.ca>
      Cc: Nicolas Dichtel <nicolas.dichtel@6wind.com>
      Cc: Phil Sutter <phil@nwl.cc>
      Cc: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
      Cc: netdev@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NVijay Pandurangan <vijayp@vijayp.ca>
      Acked-by: NCong Wang <cwang@twopensource.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ce8c839b
  11. 22 12月, 2015 2 次提交
  12. 20 12月, 2015 1 次提交
  13. 19 12月, 2015 9 次提交
  14. 18 12月, 2015 3 次提交
  15. 17 12月, 2015 2 次提交
  16. 16 12月, 2015 5 次提交