1. 21 Feb, 2019 3 commits
    • David S. Miller's avatar
      Merge tag 'mlx5-updates-2019-02-19' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux · 8e4c076e
      David S. Miller authored
      Saeed Mahameed says:
      
      ====================
      mlx5-updates-2019-02-19
      
      This series includes misc updates to mlx5 drivers and one ethtool update.
      
      1) From Aya Levin:
         - ethtool: Define 50Gbps per lane link modes
         - add support for 50Gbps per lane link modes in mlx5 driver
      
      2) From Tariq Toukan,
         - Add a helper function to unify mlx5 resource reloading
      
      3) From Vlad Buslov,
         - Remove wrong and superfluous tc pedit header type check
      
      4) From Tonghao Zhang,
         - Some refactoring in en_tc.c to simplify the mlx5e_tc_add_fdb_flow
      
      5) From Leon Romanovsky & Saeed,
         - Compilation warning fixes
      
      6) From Bodong wang,
         - E-Switch fixes that are related to the SmarNIC series
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8e4c076e
    • Cong Wang's avatar
      net_sched: fix a memory leak in cls_tcindex · 51dcb69d
      Cong Wang authored
      (cherry picked from commit 033b228e)
      
      When tcindex_destroy() destroys all the filter results in
      the perfect hash table, it invokes the walker to delete
      each of them. However, results with class==0 are skipped
      in either tcindex_walk() or tcindex_delete(), which causes
      a memory leak reported by kmemleak.
      
      This patch fixes it by skipping the walker and directly
      deleting these filter results so we don't miss any filter
      result.
      
      As a result of this change, we have to initialize exts->net
      properly in tcindex_alloc_perfect_hash(). For net-next, we
      need to consider whether we should initialize ->net in
      tcf_exts_init() instead, before that just directly test
      CONFIG_NET_CLS_ACT=y.
      
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Cc: Jiri Pirko <jiri@resnulli.us>
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      51dcb69d
    • Cong Wang's avatar
      net_sched: fix a race condition in tcindex_destroy() · 3d210534
      Cong Wang authored
      (cherry picked from commit 8015d93e)
      
      tcindex_destroy() invokes tcindex_destroy_element() via
      a walker to delete each filter result in its perfect hash
      table, and tcindex_destroy_element() calls tcindex_delete()
      which schedules tcf RCU works to do the final deletion work.
      Unfortunately this races with the RCU callback
      __tcindex_destroy(), which could lead to use-after-free as
      reported by Adrian.
      
      Fix this by migrating this RCU callback to tcf RCU work too,
      as that workqueue is ordered, we will not have use-after-free.
      
      Note, we don't need to hold netns refcnt because we don't call
      tcf_exts_destroy() here.
      
      Fixes: 27ce4f05 ("net_sched: use tcf_queue_work() in tcindex filter")
      Reported-by: default avatarAdrian <bugs@abtelecom.ro>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Cc: Jiri Pirko <jiri@resnulli.us>
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3d210534
  2. 20 Feb, 2019 4 commits
    • Willem de Bruijn's avatar
      gso: validate gso_type on ipip style tunnels · 418e897e
      Willem de Bruijn authored
      Commit 121d57af ("gso: validate gso_type in GSO handlers") added
      gso_type validation to existing gso_segment callback functions, to
      filter out illegal and potentially dangerous SKB_GSO_DODGY packets.
      
      Convert tunnels that now call inet_gso_segment and ipv6_gso_segment
      directly to have their own callbacks and extend validation to these.
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      418e897e
    • Vakul Garg's avatar
      selftest/tls: Add test to verify received 'type' of non-data record · 203ef5f1
      Vakul Garg authored
      Test case 'control_msg' has been updated to peek non-data record and
      then verify the type of record received. Subsequently, the same record
      is retrieved without MSG_PEEK flag in recvmsg().
      Signed-off-by: default avatarVakul Garg <vakul.garg@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      203ef5f1
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 375ca548
      David S. Miller authored
      Two easily resolvable overlapping change conflicts, one in
      TCP and one in the eBPF verifier.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      375ca548
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 40e196a9
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix suspend and resume in mt76x0u USB driver, from Stanislaw
          Gruszka.
      
       2) Missing memory barriers in xsk, from Magnus Karlsson.
      
       3) rhashtable fixes in mac80211 from Herbert Xu.
      
       4) 32-bit MIPS eBPF JIT fixes from Paul Burton.
      
       5) Fix for_each_netdev_feature() on big endian, from Hauke Mehrtens.
      
       6) GSO validation fixes from Willem de Bruijn.
      
       7) Endianness fix for dwmac4 timestamp handling, from Alexandre Torgue.
      
       8) More strict checks in tcp_v4_err(), from Eric Dumazet.
      
       9) af_alg_release should NULL out the sk after the sock_put(), from Mao
          Wenan.
      
      10) Missing unlock in mac80211 mesh error path, from Wei Yongjun.
      
      11) Missing device put in hns driver, from Salil Mehta.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (44 commits)
        sky2: Increase D3 delay again
        vhost: correctly check the return value of translate_desc() in log_used()
        net: netcp: Fix ethss driver probe issue
        net: hns: Fixes the missing put_device in positive leg for roce reset
        net: stmmac: Fix a race in EEE enable callback
        qed: Fix iWARP syn packet mac address validation.
        qed: Fix iWARP buffer size provided for syn packet processing.
        r8152: Add support for MAC address pass through on RTL8153-BD
        mac80211: mesh: fix missing unlock on error in table_path_del()
        net/mlx4_en: fix spelling mistake: "quiting" -> "quitting"
        net: crypto set sk to NULL when af_alg_release.
        net: Do not allocate page fragments that are not skb aligned
        mm: Use fixed constant in page_frag_alloc instead of size + 1
        tcp: tcp_v4_err() should be more careful
        tcp: clear icsk_backoff in tcp_write_queue_purge()
        net: mv643xx_eth: disable clk on error path in mv643xx_eth_shared_probe()
        qmi_wwan: apply SET_DTR quirk to Sierra WP7607
        net: stmmac: handle endianness in dwmac4_get_timestamp
        doc: Mention MSG_ZEROCOPY implementation for UDP
        mlxsw: __mlxsw_sp_port_headroom_set(): Fix a use of local variable
        ...
      40e196a9
  3. 19 Feb, 2019 33 commits