1. 05 11月, 2013 25 次提交
  2. 04 11月, 2013 15 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · be408cd3
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
       "I'm sending a pull request of these lingering bug fixes for networking
        before the normal merge window material because some of this stuff I'd
        like to get to -stable ASAP"
      
       1) cxgb3 stopped working on 32-bit machines, fix from Ben Hutchings.
      
       2) Structures passed via netlink for netfilter logging are not fully
          initialized.  From Mathias Krause.
      
       3) Properly unlink upper openvswitch device during notifications, from
          Alexei Starovoitov.
      
       4) Fix race conditions involving access to the IP compression scratch
          buffer, from Michal Kubrecek.
      
       5) We don't handle the expiration of MTU information contained in ipv6
          routes sometimes, fix from Hannes Frederic Sowa.
      
       6) With Fast Open we can miscompute the TCP SYN/ACK RTT, from Yuchung
          Cheng.
      
       7) Don't take TCP RTT sample when an ACK doesn't acknowledge new data,
          also from Yuchung Cheng.
      
       8) The decreased IPSEC garbage collection threshold causes problems for
          some people, bump it back up.  From Steffen Klassert.
      
       9) Fix skb->truesize calculated by tcp_tso_segment(), from Eric
          Dumazet.
      
      10) flow_dissector doesn't validate packet lengths sufficiently, from
          Jason Wang
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (41 commits)
        net/mlx4_core: Fix call to __mlx4_unregister_mac
        net: sctp: do not trigger BUG_ON in sctp_cmd_delete_tcb
        net: flow_dissector: fail on evil iph->ihl
        xfrm: Fix null pointer dereference when decoding sessions
        can: kvaser_usb: fix usb endpoints detection
        can: c_can: Fix RX message handling, handle lost message before EOB
        doc:net: Fix typo in Documentation/networking
        bgmac: don't update slot on skb alloc/dma mapping error
        ibm emac: Fix locking for enable/disable eob irq
        ibm emac: Don't call napi_complete if napi_reschedule failed
        virtio-net: correctly handle cpu hotplug notifier during resuming
        bridge: pass correct vlan id to multicast code
        net: x25: Fix dead URLs in Kconfig
        netfilter: xt_NFQUEUE: fix --queue-bypass regression
        xen-netback: use jiffies_64 value to calculate credit timeout
        cxgb3: Fix length calculation in write_ofld_wr() on 32-bit architectures
        bnx2x: Disable VF access on PF removal
        bnx2x: prevent FW assert on low mem during unload
        tcp: gso: fix truesize tracking
        xfrm: Increase the garbage collector threshold
        ...
      be408cd3
    • J
      net/mlx4_core: Fix call to __mlx4_unregister_mac · c32b7dfb
      Jack Morgenstein 提交于
      In function mlx4_master_deactivate_admin_state() __mlx4_unregister_mac was
      called using the MAC index. It should be called with the value of the MAC itself.
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c32b7dfb
    • D
      Merge branch 'fixes-for-3.12' of git://gitorious.org/linux-can/linux-can · e9b51a19
      David S. Miller 提交于
      Marc Kleine-Budde says:
      
      ====================
      I have two late fixes for the v3.12 release:
      
      The first patch fixes a problem in the c_can's RX message handling, which can
      lead to an endless interrupt loop under heavy load if messages are lost. The
      second patch is by Olivier Sobrie and fixes the endpoint detection of the
      kvaser_usb driver, which is needed for some devices.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e9b51a19
    • D
      net: sctp: do not trigger BUG_ON in sctp_cmd_delete_tcb · 7926c1d5
      Daniel Borkmann 提交于
      Introduced in f9e42b85 ("net: sctp: sideeffect: throw BUG if
      primary_path is NULL"), we intended to find a buggy assoc that's
      part of the assoc hash table with a primary_path that is NULL.
      However, we better remove the BUG_ON for now and find a more
      suitable place to assert for these things as Mark reports that
      this also triggers the bug when duplication cookie processing
      happens, and the assoc is not part of the hash table (so all
      good in this case). Such a situation can for example easily be
      reproduced by:
      
        tc qdisc add dev eth0 root handle 1: prio bands 2 priomap 1 1 1 1 1 1
        tc qdisc add dev eth0 parent 1:2 handle 20: netem loss 20%
        tc filter add dev eth0 protocol ip parent 1: prio 2 u32 match ip \
                  protocol 132 0xff match u8 0x0b 0xff at 32 flowid 1:2
      
      This drops 20% of COOKIE-ACK packets. After some follow-up
      discussion with Vlad we came to the conclusion that for now we
      should still better remove this BUG_ON() assertion, and come up
      with two follow-ups later on, that is, i) find a more suitable
      place for this assertion, and possibly ii) have a special
      allocator/initializer for such kind of temporary assocs.
      Reported-by: NMark Thomas <Mark.Thomas@metaswitch.com>
      Signed-off-by: NVlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7926c1d5
    • A
      net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0) · f421436a
      Arvid Brodin 提交于
      High-availability Seamless Redundancy ("HSR") provides instant failover
      redundancy for Ethernet networks. It requires a special network topology where
      all nodes are connected in a ring (each node having two physical network
      interfaces). It is suited for applications that demand high availability and
      very short reaction time.
      
      HSR acts on the Ethernet layer, using a registered Ethernet protocol type to
      send special HSR frames in both directions over the ring. The driver creates
      virtual network interfaces that can be used just like any ordinary Linux
      network interface, for IP/TCP/UDP traffic etc. All nodes in the network ring
      must be HSR capable.
      
      This code is a "best effort" to comply with the HSR standard as described in
      IEC 62439-3:2010 (HSRv0).
      Signed-off-by: NArvid Brodin <arvid.brodin@xdin.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f421436a
    • E
      net: extend net_device allocation to vmalloc() · 74d332c1
      Eric Dumazet 提交于
      Joby Poriyath provided a xen-netback patch to reduce the size of
      xenvif structure as some netdev allocation could fail under
      memory pressure/fragmentation.
      
      This patch is handling the problem at the core level, allowing
      any netdev structures to use vmalloc() if kmalloc() failed.
      
      As vmalloc() adds overhead on a critical network path, add __GFP_REPEAT
      to kzalloc() flags to do this fallback only when really needed.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Reported-by: NJoby Poriyath <joby.poriyath@citrix.com>
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      74d332c1
    • D
      Merge branch 'sctp_csum' · b397f999
      David S. Miller 提交于
      Daniel Borkmann says:
      
      ====================
      SCTP fix/updates
      
      Please see patch 5 for the main description/motivation, the rest just
      brings in the needed functionality for that. Although this is actually
      a fix, I've based it against net-next as some additional work for
      fixing it was needed.
      ====================
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      Acked-by: NVlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b397f999
    • D
      net: sctp: fix and consolidate SCTP checksumming code · e6d8b64b
      Daniel Borkmann 提交于
      This fixes an outstanding bug found through IPVS, where SCTP packets
      with skb->data_len > 0 (non-linearized) and empty frag_list, but data
      accumulated in frags[] member, are forwarded with incorrect checksum
      letting SCTP initial handshake fail on some systems. Linearizing each
      SCTP skb in IPVS to prevent that would not be a good solution as
      this leads to an additional and unnecessary performance penalty on
      the load-balancer itself for no good reason (as we actually only want
      to update the checksum, and can do that in a different/better way
      presented here).
      
      The actual problem is elsewhere, namely, that SCTP's checksumming
      in sctp_compute_cksum() does not take frags[] into account like
      skb_checksum() does. So while we are fixing this up, we better reuse
      the existing code that we have anyway in __skb_checksum() and use it
      for walking through the data doing checksumming. This will not only
      fix this issue, but also consolidates some SCTP code with core
      sk_buff code, bringing it closer together and removing respectively
      avoiding reimplementation of skb_checksum() for no good reason.
      
      As crc32c() can use hardware implementation within the crypto layer,
      we leave that intact (it wraps around / falls back to e.g. slice-by-8
      algorithm in __crc32c_le() otherwise); plus use the __crc32c_le_combine()
      combinator for crc32c blocks.
      
      Also, we remove all other SCTP checksumming code, so that we only
      have to use sctp_compute_cksum() from now on; for doing that, we need
      to transform SCTP checkumming in output path slightly, and can leave
      the rest intact.
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e6d8b64b
    • D
      net: skb_checksum: allow custom update/combine for walking skb · 2817a336
      Daniel Borkmann 提交于
      Currently, skb_checksum walks over 1) linearized, 2) frags[], and
      3) frag_list data and calculats the one's complement, a 32 bit
      result suitable for feeding into itself or csum_tcpudp_magic(),
      but unsuitable for SCTP as we're calculating CRC32c there.
      
      Hence, in order to not re-implement the very same function in
      SCTP (and maybe other protocols) over and over again, use an
      update() + combine() callback internally to allow for walking
      over the skb with different algorithms.
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2817a336
    • D
      lib: crc32: add test cases for crc32{, c}_combine routines · efba721f
      Daniel Borkmann 提交于
      We already have 100 test cases for crcs itself, so split the test
      buffer with a-prio known checksums, and test crc of two blocks
      against crc of the whole block for the same results.
      
      Output/result with CONFIG_CRC32_SELFTEST=y:
      
        [    2.687095] crc32: CRC_LE_BITS = 64, CRC_BE BITS = 64
        [    2.687097] crc32: self tests passed, processed 225944 bytes in 278177 nsec
        [    2.687383] crc32c: CRC_LE_BITS = 64
        [    2.687385] crc32c: self tests passed, processed 225944 bytes in 141708 nsec
        [    7.336771] crc32_combine: 113072 self tests passed
        [   12.050479] crc32c_combine: 113072 self tests passed
        [   17.633089] alg: No test for crc32 (crc32-pclmul)
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      efba721f
    • D
      lib: crc32: add functionality to combine two crc32{, c}s in GF(2) · 6e95fcaa
      Daniel Borkmann 提交于
      This patch adds a combinator to merge two or more crc32{,c}s
      into a new one. This is useful for checksum computations of
      fragmented skbs that use crc32/crc32c as checksums.
      
      The arithmetics for combining both in the GF(2) was taken and
      slightly modified from zlib. Only passing two crcs is insufficient
      as two crcs and the length of the second piece is needed for
      merging. The code is made generic, so that only polynomials
      need to be passed for crc32_le resp. crc32c_le.
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6e95fcaa
    • D
      lib: crc32: clean up spacing in test cases · d921e049
      Daniel Borkmann 提交于
      This is nothing more but a whitepace cleanup, as 80 chars is not a
      hard but soft limit, and otherwise makes the test cases array really
      look ugly. So fix it up.
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d921e049
    • L
      Linux 3.12 · 5e01dc7b
      Linus Torvalds 提交于
      5e01dc7b
    • L
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 17f6ee43
      Linus Torvalds 提交于
      Pull MIPS fixes from Ralf Baechle:
       "Three fixes across arch/mips with the most complex one being the GIC
        interrupt fix - at nine lines still not monster.  I'm confident this
        are the final MIPS patches even if there should go for an rc8"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: ralink: fix return value check in rt_timer_probe()
        MIPS: malta: Fix GIC interrupt offsets
        MIPS: Perf: Fix 74K cache map
      17f6ee43
    • M
      ipc, msg: forbid negative values for "msg{max,mnb,mni}" · 9bf76ca3
      Mathias Krause 提交于
      Negative message lengths make no sense -- so don't do negative queue
      lenghts or identifier counts. Prevent them from getting negative.
      
      Also change the underlying data types to be unsigned to avoid hairy
      surprises with sign extensions in cases where those variables get
      evaluated in unsigned expressions with bigger data types, e.g size_t.
      
      In case a user still wants to have "unlimited" sizes she could just use
      INT_MAX instead.
      Signed-off-by: NMathias Krause <minipli@googlemail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9bf76ca3