1. 21 5月, 2015 1 次提交
  2. 20 5月, 2015 3 次提交
    • Y
      tcp: don't over-send F-RTO probes · b7b0ed91
      Yuchung Cheng 提交于
      After sending the new data packets to probe (step 2), F-RTO may
      incorrectly send more probes if the next ACK advances SND_UNA and
      does not sack new packet. However F-RTO RFC 5682 probes at most
      once. This bug may cause sender to always send new data instead of
      repairing holes, inducing longer HoL blocking on the receiver for
      the application.
      Signed-off-by: NYuchung Cheng <ycheng@google.com>
      Signed-off-by: NNeal Cardwell <ncardwell@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b7b0ed91
    • Y
      tcp: only undo on partial ACKs in CA_Loss · da34ac76
      Yuchung Cheng 提交于
      Undo based on TCP timestamps should only happen on ACKs that advance
      SND_UNA, according to the Eifel algorithm in RFC 3522:
      
      Section 3.2:
      
        (4) If the value of the Timestamp Echo Reply field of the
            acceptable ACK's Timestamps option is smaller than the
            value of RetransmitTS, then proceed to step (5),
      
      Section Terminology:
         We use the term 'acceptable ACK' as defined in [RFC793].  That is an
         ACK that acknowledges previously unacknowledged data.
      
      This is because upon receiving an out-of-order packet, the receiver
      returns the last timestamp that advances RCV_NXT, not the current
      timestamp of the packet in the DUPACK. Without checking the flag,
      the DUPACK will cause tcp_packet_delayed() to return true and
      tcp_try_undo_loss() will revert cwnd reduction.
      
      Note that we check the condition in CA_Recovery already by only
      calling tcp_try_undo_partial() if FLAG_SND_UNA_ADVANCED is set or
      tcp_try_undo_recovery() if snd_una crosses high_seq.
      Signed-off-by: NYuchung Cheng <ycheng@google.com>
      Signed-off-by: NNeal Cardwell <ncardwell@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      da34ac76
    • H
      net/ipv6/udp: Fix ipv6 multicast socket filter regression · 33b4b015
      Henning Rogge 提交于
      Commit <5cf3d461> ("udp: Simplify__udp*_lib_mcast_deliver")
      simplified the filter for incoming IPv6 multicast but removed
      the check of the local socket address and the UDP destination
      address.
      
      This patch restores the filter to prevent sockets bound to a IPv6
      multicast IP to receive other UDP traffic link unicast.
      Signed-off-by: NHenning Rogge <hrogge@gmail.com>
      Fixes: 5cf3d461 ("udp: Simplify__udp*_lib_mcast_deliver")
      Cc: "David S. Miller" <davem@davemloft.net>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      33b4b015
  3. 18 5月, 2015 2 次提交
  4. 17 5月, 2015 1 次提交
  5. 16 5月, 2015 3 次提交
  6. 15 5月, 2015 3 次提交
  7. 14 5月, 2015 2 次提交
    • W
      Bluetooth: Fix remote name event return directly. · 177d0506
      Wesley Kuo 提交于
      This patch fixes hci_remote_name_evt dose not resolve name during
      discovery status is RESOLVING. Before simultaneous dual mode scan enabled,
      hci_check_pending_name will set discovery status to STOPPED eventually.
      Signed-off-by: NWesley Kuo <wesley.kuo@intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      177d0506
    • V
      vlan: Correctly propagate promisc|allmulti flags in notifier. · be346ffa
      Vlad Yasevich 提交于
      Currently vlan notifier handler will try to update all vlans
      for a device when that device comes up.  A problem occurs,
      however, when the vlan device was set to promiscuous, but not
      by the user (ex: a bridge).  In that case, dev->gflags are
      not updated.  What results is that the lower device ends
      up with an extra promiscuity count.  Here are the
      backtraces that prove this:
      [62852.052179]  [<ffffffff814fe248>] __dev_set_promiscuity+0x38/0x1e0
      [62852.052186]  [<ffffffff8160bcbb>] ? _raw_spin_unlock_bh+0x1b/0x40
      [62852.052188]  [<ffffffff814fe4be>] ? dev_set_rx_mode+0x2e/0x40
      [62852.052190]  [<ffffffff814fe694>] dev_set_promiscuity+0x24/0x50
      [62852.052194]  [<ffffffffa0324795>] vlan_dev_open+0xd5/0x1f0 [8021q]
      [62852.052196]  [<ffffffff814fe58f>] __dev_open+0xbf/0x140
      [62852.052198]  [<ffffffff814fe88d>] __dev_change_flags+0x9d/0x170
      [62852.052200]  [<ffffffff814fe989>] dev_change_flags+0x29/0x60
      
      The above comes from the setting the vlan device to IFF_UP state.
      
      [62852.053569]  [<ffffffff814fe248>] __dev_set_promiscuity+0x38/0x1e0
      [62852.053571]  [<ffffffffa032459b>] ? vlan_dev_set_rx_mode+0x2b/0x30
      [8021q]
      [62852.053573]  [<ffffffff814fe8d5>] __dev_change_flags+0xe5/0x170
      [62852.053645]  [<ffffffff814fe989>] dev_change_flags+0x29/0x60
      [62852.053647]  [<ffffffffa032334a>] vlan_device_event+0x18a/0x690
      [8021q]
      [62852.053649]  [<ffffffff8161036c>] notifier_call_chain+0x4c/0x70
      [62852.053651]  [<ffffffff8109d456>] raw_notifier_call_chain+0x16/0x20
      [62852.053653]  [<ffffffff814f744d>] call_netdevice_notifiers+0x2d/0x60
      [62852.053654]  [<ffffffff814fe1a3>] __dev_notify_flags+0x33/0xa0
      [62852.053656]  [<ffffffff814fe9b2>] dev_change_flags+0x52/0x60
      [62852.053657]  [<ffffffff8150cd57>] do_setlink+0x397/0xa40
      
      And this one comes from the notification code.  What we end
      up with is a vlan with promiscuity count of 1 and and a physical
      device with a promiscuity count of 2.  They should both have
      a count 1.
      
      To resolve this issue, vlan code can use dev_get_flags() api
      which correctly masks promiscuity and allmulti flags.
      Signed-off-by: NVlad Yasevich <vyasevic@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      be346ffa
  8. 13 5月, 2015 1 次提交
  9. 12 5月, 2015 1 次提交
  10. 11 5月, 2015 2 次提交
    • J
      mac80211: move WEP tailroom size check · 47b4e1fc
      Janusz Dziedzic 提交于
      Remove checking tailroom when adding IV as it uses only
      headroom, and move the check to the ICV generation that
      actually needs the tailroom.
      
      In other case I hit such warning and datapath don't work,
      when testing:
      - IBSS + WEP
      - ath9k with hw crypt enabled
      - IPv6 data (ping6)
      
      WARNING: CPU: 3 PID: 13301 at net/mac80211/wep.c:102 ieee80211_wep_add_iv+0x129/0x190 [mac80211]()
      [...]
      Call Trace:
      [<ffffffff817bf491>] dump_stack+0x45/0x57
      [<ffffffff8107746a>] warn_slowpath_common+0x8a/0xc0
      [<ffffffff8107755a>] warn_slowpath_null+0x1a/0x20
      [<ffffffffc09ae109>] ieee80211_wep_add_iv+0x129/0x190 [mac80211]
      [<ffffffffc09ae7ab>] ieee80211_crypto_wep_encrypt+0x6b/0xd0 [mac80211]
      [<ffffffffc09d3fb1>] invoke_tx_handlers+0xc51/0xf30 [mac80211]
      [...]
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJanusz Dziedzic <janusz.dziedzic@tieto.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      47b4e1fc
    • K
      af_packet / TX_RING not fully non-blocking (w/ MSG_DONTWAIT). · fbf33a28
      Kretschmer, Mathias 提交于
      This patch fixes an issue where the send(MSG_DONTWAIT) call
      on a TX_RING is not fully non-blocking in cases where the device's sndBuf is
      full. We pass nonblock=true to sock_alloc_send_skb() and return any possibly
      occuring error code (most likely EGAIN) to the caller. As the fast-path stays
      as it is, we keep the unlikely() around skb == NULL.
      Signed-off-by: NMathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fbf33a28
  11. 10 5月, 2015 5 次提交
  12. 08 5月, 2015 1 次提交
    • T
      ipvs: fix memory leak in ip_vs_ctl.c · f30bf2a5
      Tommi Rantala 提交于
      Fix memory leak introduced in commit a0840e2e ("IPVS: netns,
      ip_vs_ctl local vars moved to ipvs struct."):
      
      unreferenced object 0xffff88005785b800 (size 2048):
        comm "(-localed)", pid 1434, jiffies 4294755650 (age 1421.089s)
        hex dump (first 32 bytes):
          bb 89 0b 83 ff ff ff ff b0 78 f0 4e 00 88 ff ff  .........x.N....
          04 00 00 00 a4 01 00 00 00 00 00 00 00 00 00 00  ................
        backtrace:
          [<ffffffff8262ea8e>] kmemleak_alloc+0x4e/0xb0
          [<ffffffff811fba74>] __kmalloc_track_caller+0x244/0x430
          [<ffffffff811b88a0>] kmemdup+0x20/0x50
          [<ffffffff823276b7>] ip_vs_control_net_init+0x1f7/0x510
          [<ffffffff8231d630>] __ip_vs_init+0x100/0x250
          [<ffffffff822363a1>] ops_init+0x41/0x190
          [<ffffffff82236583>] setup_net+0x93/0x150
          [<ffffffff82236cc2>] copy_net_ns+0x82/0x140
          [<ffffffff810ab13d>] create_new_namespaces+0xfd/0x190
          [<ffffffff810ab49a>] unshare_nsproxy_namespaces+0x5a/0xc0
          [<ffffffff810833e3>] SyS_unshare+0x173/0x310
          [<ffffffff8265cbd7>] system_call_fastpath+0x12/0x6f
          [<ffffffffffffffff>] 0xffffffffffffffff
      
      Fixes: a0840e2e ("IPVS: netns, ip_vs_ctl local vars moved to ipvs struct.")
      Signed-off-by: NTommi Rantala <tt.rantala@gmail.com>
      Acked-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      f30bf2a5
  13. 06 5月, 2015 2 次提交
  14. 05 5月, 2015 3 次提交
    • D
      net/rds: Fix new sparse warning · e2783717
      David Ahern 提交于
      c0adf54a introduced new sparse warnings:
        CHECK   /home/dahern/kernels/linux.git/net/rds/ib_cm.c
      net/rds/ib_cm.c:191:34: warning: incorrect type in initializer (different base types)
      net/rds/ib_cm.c:191:34:    expected unsigned long long [unsigned] [usertype] dp_ack_seq
      net/rds/ib_cm.c:191:34:    got restricted __be64 <noident>
      net/rds/ib_cm.c:194:51: warning: cast to restricted __be64
      
      The temporary variable for sequence number should have been declared as __be64
      rather than u64. Make it so.
      Signed-off-by: NDavid Ahern <david.ahern@oracle.com>
      Cc: shamir rabinovitch <shamir.rabinovitch@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e2783717
    • V
      net: core: Correct an over-stringent device loop detection. · d66bf7dd
      Vlad Yasevich 提交于
      The code in __netdev_upper_dev_link() has an over-stringent
      loop detection logic that actually prevents valid configurations
      from working correctly.
      
      In particular, the logic returns an error if an upper device
      is already in the list of all upper devices for a given dev.
      This particular check seems to be a overzealous as it disallows
      perfectly valid configurations.  For example:
        # ip l a link eth0 name eth0.10 type vlan id 10
        # ip l a dev br0 typ bridge
        # ip l s eth0.10 master br0
        # ip l s eth0 master br0  <--- Will fail
      
      If you switch the last two commands (add eth0 first), then both
      will succeed.  If after that, you remove eth0 and try to re-add
      it, it will fail!
      
      It appears to be enough to simply check adj_list to keeps things
      safe.
      
      I've tried stacking multiple devices multiple times in all different
      combinations, and either rx_handler registration prevented the stacking
      of the device linking cought the error.
      Signed-off-by: NVladislav Yasevich <vyasevic@redhat.com>
      Acked-by: NJiri Pirko <jiri@resnulli.us>
      Acked-by: NVeaceslav Falico <vfalico@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d66bf7dd
    • S
      svcrpc: fix potential GSSX_ACCEPT_SEC_CONTEXT decoding failures · 9507271d
      Scott Mayhew 提交于
      In an environment where the KDC is running Active Directory, the
      exported composite name field returned in the context could be large
      enough to span a page boundary.  Attaching a scratch buffer to the
      decoding xdr_stream helps deal with those cases.
      
      The case where we saw this was actually due to behavior that's been
      fixed in newer gss-proxy versions, but we're fixing it here too.
      Signed-off-by: NScott Mayhew <smayhew@redhat.com>
      Cc: stable@vger.kernel.org
      Reviewed-by: NSimo Sorce <simo@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      9507271d
  15. 04 5月, 2015 4 次提交
    • H
      Revert "net: kernel socket should be released in init_net namespace" · 2e70aedd
      Herbert Xu 提交于
      This reverts commit c243d7e2.
      
      That patch is solving a non-existant problem while creating a
      real problem.  Just because a socket is allocated in the init
      name space doesn't mean that it gets hashed in the init name space.
      
      When we unhash it the name space must be the same as the one
      we had when we hashed it.  So this patch is completely bogus
      and causes socket leaks.
      Reported-by: NAndrey Wagin <avagin@gmail.com>
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2e70aedd
    • S
      net/rds: fix unaligned memory access · c0adf54a
      shamir rabinovitch 提交于
      rdma_conn_param private data is copied using memcpy after headers such
      as cma_hdr (see cma_resolve_ib_udp as example). so the start of the
      private data is aligned to the end of the structure that come before. if
      this structure end with u32 the meaning is that the start of the private
      data will be 4 bytes aligned. structures that use u8/u16/u32/u64 are
      naturally aligned but in case the structure start is not 8 bytes aligned,
      all u64 members of this structure will not be aligned. to solve this issue
      we must use special macros that allow unaligned access to those
      unaligned members.
      
      Addresses the following kernel log seen when attempting to use RDMA:
      
      Kernel unaligned access at TPC[10507a88] rds_ib_cm_connect_complete+0x1bc/0x1e0 [rds_rdma]
      Acked-by: NChien Yen <chien.yen@oracle.com>
      Signed-off-by: Nshamir rabinovitch <shamir.rabinovitch@oracle.com>
      [Minor tweaks for top of tree by:]
      Signed-off-by: NDavid Ahern <david.ahern@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c0adf54a
    • H
      netlink: Remove max_size setting · edac450d
      Herbert Xu 提交于
      We currently limit the hash table size to 64K which is very bad
      as even 10 years ago it was relatively easy to generate millions
      of sockets.
      
      Since the hash table is naturally limited by memory allocation
      failure, we don't really need an explicit limit so this patch
      removes it.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Acked-by: NThomas Graf <tgraf@noironetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      edac450d
    • E
      codel: fix maxpacket/mtu confusion · a5d28090
      Eric Dumazet 提交于
      Under presence of TSO/GSO/GRO packets, codel at low rates can be quite
      useless. In following example, not a single packet was ever dropped,
      while average delay in codel queue is ~100 ms !
      
      qdisc codel 0: parent 1:12 limit 16000p target 5.0ms interval 100.0ms
       Sent 134376498 bytes 88797 pkt (dropped 0, overlimits 0 requeues 0)
       backlog 13626b 3p requeues 0
        count 0 lastcount 0 ldelay 96.9ms drop_next 0us
        maxpacket 9084 ecn_mark 0 drop_overlimit 0
      
      This comes from a confusion of what should be the minimal backlog. It is
      pretty clear it is not 64KB or whatever max GSO packet ever reached the
      qdisc.
      
      codel intent was to use MTU of the device.
      
      After the fix, we finally drop some packets, and rtt/cwnd of my single
      TCP flow are meeting our expectations.
      
      qdisc codel 0: parent 1:12 limit 16000p target 5.0ms interval 100.0ms
       Sent 102798497 bytes 67912 pkt (dropped 1365, overlimits 0 requeues 0)
       backlog 6056b 3p requeues 0
        count 1 lastcount 1 ldelay 36.3ms drop_next 0us
        maxpacket 10598 ecn_mark 0 drop_overlimit 0
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Kathleen Nichols <nichols@pollere.com>
      Cc: Dave Taht <dave.taht@gmail.com>
      Cc: Van Jacobson <vanj@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a5d28090
  16. 02 5月, 2015 1 次提交
  17. 01 5月, 2015 5 次提交