1. 17 Aug, 2020 4 commits
  2. 16 Aug, 2020 6 commits
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf · 8c26544f
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      The following patchset contains Netfilter fixes for net:
      
      1) Endianness issue in IPv4 option support in nft_exthdr,
         from Stephen Suryaputra.
      
      2) Removes the waitcount optimization in nft_compat,
         from Florian Westphal.
      
      3) Remove ipv6 -> nf_defrag_ipv6 module dependency, from
         Florian Westphal.
      
      4) Memleak in chain binding support, also from Florian.
      
      5) Simplify nft_flowtable.sh selftest, from Fabian Frederick.
      
      6) Optional MTU arguments for selftest nft_flowtable.sh,
         also from Fabian.
      
      7) Remove noise error report when killing process in
         selftest nft_flowtable.sh, from Fabian Frederick.
      
      8) Reject bogus getsockopt option length in ebtables,
         from Florian Westphal.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8c26544f
    • David S. Miller's avatar
      Merge tag 'linux-can-fixes-for-5.9-20200815' of... · 71a50419
      David S. Miller authored
      Merge tag 'linux-can-fixes-for-5.9-20200815' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
      
      Marc Kleine-Budde says:
      
      ====================
      pull-request: can 2020-08-15
      
      this is a pull request of 4 patches for net/master.
      
      All patches are by Zhang Changzhong and fix broadcast related problems in the
      j1939 CAN networking stack.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      71a50419
    • Miaohe Lin's avatar
      net: Fix potential wrong skb->protocol in skb_vlan_untag() · 55eff0eb
      Miaohe Lin authored
      We may access the two bytes after vlan_hdr in vlan_set_encap_proto(). So
      we should pull VLAN_HLEN + sizeof(unsigned short) in skb_vlan_untag() or
      we may access the wrong data.
      
      Fixes: 0d5501c1 ("net: Always untag vlan-tagged traffic on input.")
      Signed-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      55eff0eb
    • Jason A. Donenfeld's avatar
      net: xdp: pull ethernet header off packet after computing skb->protocol · f8414a8d
      Jason A. Donenfeld authored
      When an XDP program changes the ethernet header protocol field,
      eth_type_trans is used to recalculate skb->protocol. In order for
      eth_type_trans to work correctly, the ethernet header must actually be
      part of the skb data segment, so the code first pushes that onto the
      head of the skb. However, it subsequently forgets to pull it back off,
      making the behavior of the passed-on packet inconsistent between the
      protocol modifying case and the static protocol case. This patch fixes
      the issue by simply pulling the ethernet header back off of the skb
      head.
      
      Fixes: 29724956 ("net: fix generic XDP to handle if eth header was mangled")
      Cc: Jesper Dangaard Brouer <brouer@redhat.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f8414a8d
    • Mahesh Bandewar's avatar
      ipvlan: fix device features · d0f5c707
      Mahesh Bandewar authored
      Processing NETDEV_FEAT_CHANGE causes IPvlan links to lose
      NETIF_F_LLTX feature because of the incorrect handling of
      features in ipvlan_fix_features().
      
      --before--
      lpaa10:~# ethtool -k ipvl0 | grep tx-lockless
      tx-lockless: on [fixed]
      lpaa10:~# ethtool -K ipvl0 tso off
      Cannot change tcp-segmentation-offload
      Actual changes:
      vlan-challenged: off [fixed]
      tx-lockless: off [fixed]
      lpaa10:~# ethtool -k ipvl0 | grep tx-lockless
      tx-lockless: off [fixed]
      lpaa10:~#
      
      --after--
      lpaa10:~# ethtool -k ipvl0 | grep tx-lockless
      tx-lockless: on [fixed]
      lpaa10:~# ethtool -K ipvl0 tso off
      Cannot change tcp-segmentation-offload
      Could not change any device features
      lpaa10:~# ethtool -k ipvl0 | grep tx-lockless
      tx-lockless: on [fixed]
      lpaa10:~#
      
      Fixes: 2ad7bf36 ("ipvlan: Initial check-in of the IPVLAN driver.")
      Signed-off-by: default avatarMahesh Bandewar <maheshb@google.com>
      Cc: Eric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d0f5c707
    • Cong Wang's avatar
      bonding: fix a potential double-unregister · 83270702
      Cong Wang authored
      When we tear down a network namespace, we unregister all
      the netdevices within it. So we may queue a slave device
      and a bonding device together in the same unregister queue.
      
      If the only slave device is non-ethernet, it would
      automatically unregister the bonding device as well. Thus,
      we may end up unregistering the bonding device twice.
      
      Workaround this special case by checking reg_state.
      
      Fixes: 9b5e383c ("net: Introduce unregister_netdevice_many()")
      Reported-by: syzbot+af23e7f3e0a7e10c8b67@syzkaller.appspotmail.com
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Cc: Jay Vosburgh <j.vosburgh@gmail.com>
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      83270702
  3. 15 Aug, 2020 19 commits
    • Zhang Changzhong's avatar
      can: j1939: add rxtimer for multipacket broadcast session · 0ae18a82
      Zhang Changzhong authored
      According to SAE J1939/21 (Chapter 5.12.3 and APPENDIX C), for transmit side
      the required time interval between packets of a multipacket broadcast message
      is 50 to 200 ms, the responder shall use a timeout of 250ms (provides margin
      allowing for the maximumm spacing of 200ms). For receive side a timeout will
      occur when a time of greater than 750 ms elapsed between two message packets
      when more packets were expected.
      
      So this patch fix and add rxtimer for multipacket broadcast session.
      
      Fixes: 9d71dd0c ("can: add support of SAE J1939 protocol")
      Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
      Link: https://lore.kernel.org/r/1596599425-5534-5-git-send-email-zhangchangzhong@huawei.comAcked-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      0ae18a82
    • Zhang Changzhong's avatar
      can: j1939: abort multipacket broadcast session when timeout occurs · 2b8b2e31
      Zhang Changzhong authored
      If timeout occurs, j1939_tp_rxtimer() first calls hrtimer_start() to restart
      rxtimer, and then calls __j1939_session_cancel() to set session->state =
      J1939_SESSION_WAITING_ABORT. At next timeout expiration, because of the
      J1939_SESSION_WAITING_ABORT session state j1939_tp_rxtimer() will call
      j1939_session_deactivate_activate_next() to deactivate current session, and
      rxtimer won't be set.
      
      But for multipacket broadcast session, __j1939_session_cancel() don't set
      session->state = J1939_SESSION_WAITING_ABORT, thus current session won't be
      deactivate and hrtimer_start() is called to start new rxtimer again and again.
      
      So fix it by moving session->state = J1939_SESSION_WAITING_ABORT out of if
      (!j1939_cb_is_broadcast(&session->skcb)) statement.
      
      Fixes: 9d71dd0c ("can: add support of SAE J1939 protocol")
      Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
      Link: https://lore.kernel.org/r/1596599425-5534-4-git-send-email-zhangchangzhong@huawei.comAcked-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      2b8b2e31
    • Zhang Changzhong's avatar
      can: j1939: cancel rxtimer on multipacket broadcast session complete · e8b17653
      Zhang Changzhong authored
      If j1939_xtp_rx_dat_one() receive last frame of multipacket broadcast message,
      j1939_session_timers_cancel() should be called to cancel rxtimer.
      
      Fixes: 9d71dd0c ("can: add support of SAE J1939 protocol")
      Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
      Link: https://lore.kernel.org/r/1596599425-5534-3-git-send-email-zhangchangzhong@huawei.comAcked-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      e8b17653
    • Zhang Changzhong's avatar
      can: j1939: fix support for multipacket broadcast message · f4fd77fd
      Zhang Changzhong authored
      Currently j1939_tp_im_involved_anydir() in j1939_tp_recv() check the previously
      set flags J1939_ECU_LOCAL_DST and J1939_ECU_LOCAL_SRC of incoming skb, thus
      multipacket broadcast message was aborted by receive side because it may come
      from remote ECUs and have no exact dst address. Similarly, j1939_tp_cmd_recv()
      and j1939_xtp_rx_dat() didn't process broadcast message.
      
      So fix it by checking and process broadcast message in j1939_tp_recv(),
      j1939_tp_cmd_recv() and j1939_xtp_rx_dat().
      
      Fixes: 9d71dd0c ("can: add support of SAE J1939 protocol")
      Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
      Link: https://lore.kernel.org/r/1596599425-5534-2-git-send-email-zhangchangzhong@huawei.comAcked-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
      Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
      f4fd77fd
    • Lee Jones's avatar
      net: fddi: skfp: cfm: Remove seemingly unused variable 'ID_sccs' · 81dbf219
      Lee Jones authored
      This variable is present in many source files and has not been used
      anywhere (at least internally) since it was introduced.
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/fddi/skfp/cfm.c: In function ‘cfm’:
       drivers/net/fddi/skfp/cfm.c:211:6: warning: variable ‘oldstate’ set but not used [-Wunused-but-set-variable]
       drivers/net/fddi/skfp/cfm.c:40:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=]
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Lee Jones <lee.jones@linaro.org>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      81dbf219
    • Lee Jones's avatar
      net: fddi: skfp: cfm: Remove set but unused variable 'oldstate' · d1ad06ba
      Lee Jones authored
      While we're at it, remove some code which has never been invoked.
      
      Keep the comment though, as it seems potentially half useful.
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/fddi/skfp/cfm.c: In function ‘cfm’:
       drivers/net/fddi/skfp/cfm.c:211:6: warning: variable ‘oldstate’ set but not used [-Wunused-but-set-variable]
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d1ad06ba
    • Lee Jones's avatar
      net: fddi: skfp: smt: Remove seemingly unused variable 'ID_sccs' · 7b1af34f
      Lee Jones authored
      This variable is present in many source files and has not been used
      anywhere (at least internally) since it was introduced.
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/fddi/skfp/smt.c:24:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=]
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7b1af34f
    • Lee Jones's avatar
      net: fddi: skfp: smt: Place definition of 'smt_pdef' under same stipulations as its use · 327afdd7
      Lee Jones authored
      The variable 'smt_pdef' is only used if LITTLE_ENDIAN is set, so only
      define it if this is the case.
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/fddi/skfp/smt.c:1572:3: warning: ‘smt_pdef’ defined but not used [-Wunused-const-variable=]
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      327afdd7
    • Lee Jones's avatar
      net: fddi: skfp: fplustm: Remove seemingly unused variable 'ID_sccs' · 026ff46b
      Lee Jones authored
      This variable is present in many source files and has not been used
      anywhere (at least internally) since it was introduced.
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/fddi/skfp/fplustm.c:25:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=]
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
      Cc: Alexandre Torgue <alexandre.torgue@st.com>
      Cc: netdev@vger.kernel.org
      Cc: linux-stm32@st-md-mailman.stormreply.com
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      026ff46b
    • Lee Jones's avatar
      net: fddi: skfp: hwmtm: Remove seemingly unused variable 'ID_sccs' · 0d9b5645
      Lee Jones authored
      This variable is present in many source files and has not been used
      anywhere (at least internally) since it was introduced.
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/fddi/skfp/hwmtm.c:14:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=]
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0d9b5645
    • Lee Jones's avatar
      net: wan: dlci: Remove set but not used variable 'err' · 1a2c2668
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/wan/dlci.c: In function ‘dlci_close’:
       drivers/net/wan/dlci.c:298:8: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Mike McLagan <mike.mclagan@linux.org>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1a2c2668
    • Lee Jones's avatar
      net: ethernet: 8390: axnet_cs: Document unused parameter 'txqueue' · fd29aeee
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/ethernet/8390/axnet_cs.c:907: warning: Function parameter or member 'txqueue' not described in 'axnet_tx_timeout'
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Martin Habets <mhabets@solarflare.com>
      Cc: Shannon Nelson <snelson@pensando.io>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: William Lee <william@asix.com.tw>
      Cc: "A. Hinds --" <dahinds@users.sourceforge.net>
      Cc: reached at <becker@scyld.com>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fd29aeee
    • Lee Jones's avatar
      net: bonding: bond_alb: Describe alb_handle_addr_collision_on_attach()'s 'bond' and 'addr' params · f6e81b89
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/bonding/bond_alb.c:1222: warning: Function parameter or member 'bond' not described in 'alb_set_mac_address'
      
      Cc: Jay Vosburgh <j.vosburgh@gmail.com>
      Cc: Veaceslav Falico <vfalico@gmail.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f6e81b89
    • Lee Jones's avatar
      net: ethernet: 3com: 3c574_cs: Remove set but unused variables 'tx' and 'rx' · 2083bebc
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/ethernet/3com/3c574_cs.c: In function ‘update_stats’:
       drivers/net/ethernet/3com/3c574_cs.c:954:9: warning: variable ‘tx’ set but not used [-Wunused-but-set-variable]
       954 | u8 rx, tx, up;
       | ^~
       drivers/net/ethernet/3com/3c574_cs.c:954:5: warning: variable ‘rx’ set but not used [-Wunused-but-set-variable]
       954 | u8 rx, tx, up;
       | ^~
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Shannon Nelson <snelson@pensando.io>
      Cc: Heiner Kallweit <hkallweit1@gmail.com>
      Cc: Martin Habets <mhabets@solarflare.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Donald Becker <becker@scyld.com>
      Cc: David Hinds <dahinds@users.sourceforge.net>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2083bebc
    • Lee Jones's avatar
      net: bonding: bond_main: Document 'proto' and rename 'new_active' parameters · 45a1553b
      Lee Jones authored
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/bonding/bond_main.c:329: warning: Function parameter or member 'proto' not described in 'bond_vlan_rx_add_vid'
       drivers/net/bonding/bond_main.c:362: warning: Function parameter or member 'proto' not described in 'bond_vlan_rx_kill_vid'
       drivers/net/bonding/bond_main.c:964: warning: Function parameter or member 'new_active' not described in 'bond_change_active_slave'
       drivers/net/bonding/bond_main.c:964: warning: Excess function parameter 'new' description in 'bond_change_active_slave'
      
      Cc: Jay Vosburgh <j.vosburgh@gmail.com>
      Cc: Veaceslav Falico <vfalico@gmail.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Thomas Davis <tadavis@lbl.gov>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      45a1553b
    • Lee Jones's avatar
      net: bonding: bond_3ad: Fix a bunch of kerneldoc parameter issues · a35e5478
      Lee Jones authored
      Renames and missing descriptions.
      
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/bonding/bond_3ad.c:140: warning: Function parameter or member 'port' not described in '__get_first_agg'
       drivers/net/bonding/bond_3ad.c:140: warning: Excess function parameter 'bond' description in '__get_first_agg'
       drivers/net/bonding/bond_3ad.c:1655: warning: Function parameter or member 'agg' not described in 'ad_agg_selection_logic'
       drivers/net/bonding/bond_3ad.c:1655: warning: Excess function parameter 'aggregator' description in 'ad_agg_selection_logic'
       drivers/net/bonding/bond_3ad.c:1817: warning: Function parameter or member 'port' not described in 'ad_initialize_port'
       drivers/net/bonding/bond_3ad.c:1817: warning: Excess function parameter 'aggregator' description in 'ad_initialize_port'
       drivers/net/bonding/bond_3ad.c:1976: warning: Function parameter or member 'timeout' not described in 'bond_3ad_initiate_agg_selection'
       drivers/net/bonding/bond_3ad.c:2274: warning: Function parameter or member 'work' not described in 'bond_3ad_state_machine_handler'
       drivers/net/bonding/bond_3ad.c:2274: warning: Excess function parameter 'bond' description in 'bond_3ad_state_machine_handler'
       drivers/net/bonding/bond_3ad.c:2508: warning: Function parameter or member 'link' not described in 'bond_3ad_handle_link_change'
       drivers/net/bonding/bond_3ad.c:2508: warning: Excess function parameter 'status' description in 'bond_3ad_handle_link_change'
       drivers/net/bonding/bond_3ad.c:2566: warning: Function parameter or member 'bond' not described in 'bond_3ad_set_carrier'
       drivers/net/bonding/bond_3ad.c:2677: warning: Function parameter or member 'bond' not described in 'bond_3ad_update_lacp_rate'
       drivers/net/bonding/bond_3ad.c:1655: warning: Function parameter or member 'agg' not described in 'ad_agg_selection_logic'
       drivers/net/bonding/bond_3ad.c:1655: warning: Excess function parameter 'aggregator' description in 'ad_agg_selection_logic'
       drivers/net/bonding/bond_3ad.c:1817: warning: Function parameter or member 'port' not described in 'ad_initialize_port'
       drivers/net/bonding/bond_3ad.c:1817: warning: Excess function parameter 'aggregator' description in 'ad_initialize_port'
       drivers/net/bonding/bond_3ad.c:1976: warning: Function parameter or member 'timeout' not described in 'bond_3ad_initiate_agg_selection'
       drivers/net/bonding/bond_3ad.c:2274: warning: Function parameter or member 'work' not described in 'bond_3ad_state_machine_handler'
       drivers/net/bonding/bond_3ad.c:2274: warning: Excess function parameter 'bond' description in 'bond_3ad_state_machine_handler'
       drivers/net/bonding/bond_3ad.c:2508: warning: Function parameter or member 'link' not described in 'bond_3ad_handle_link_change'
       drivers/net/bonding/bond_3ad.c:2508: warning: Excess function parameter 'status' description in 'bond_3ad_handle_link_change'
       drivers/net/bonding/bond_3ad.c:2566: warning: Function parameter or member 'bond' not described in 'bond_3ad_set_carrier'
       drivers/net/bonding/bond_3ad.c:2677: warning: Function parameter or member 'bond' not described in 'bond_3ad_update_lacp_rate'
      
      Cc: Jay Vosburgh <j.vosburgh@gmail.com>
      Cc: Veaceslav Falico <vfalico@gmail.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a35e5478
    • Xie He's avatar
      drivers/net/wan/hdlc_x25: Added needed_headroom and a skb->len check · 77b981c8
      Xie He authored
      1. Added a skb->len check
      
      This driver expects upper layers to include a pseudo header of 1 byte
      when passing down a skb for transmission. This driver will read this
      1-byte header. This patch added a skb->len check before reading the
      header to make sure the header exists.
      
      2. Added needed_headroom and set hard_header_len to 0
      
      When this driver transmits data,
        first this driver will remove a pseudo header of 1 byte,
        then the lapb module will prepend the LAPB header of 2 or 3 bytes.
      So the value of needed_headroom in this driver should be 3 - 1.
      
      Because this driver has no header_ops, according to the logic of
      af_packet.c, the value of hard_header_len should be 0.
      
      Reason of setting needed_headroom and hard_header_len at this place:
      
      This driver is written using the API of the hdlc module, the hdlc
      module enables this driver (the protocol driver) to run on any hardware
      that has a driver (the hardware driver) written using the API of the
      hdlc module.
      
      Two other hdlc protocol drivers - hdlc_ppp and hdlc_raw_eth, also set
      things like hard_header_len at this place. In hdlc_ppp, it sets
      hard_header_len after attach_hdlc_protocol and before setting dev->type.
      In hdlc_raw_eth, it sets hard_header_len by calling ether_setup after
      attach_hdlc_protocol and after memcpy the settings.
      
      3. Reset needed_headroom when detaching protocols (in hdlc.c)
      
      When detaching a protocol from a hardware device, the hdlc module will
      reset various parameters of the device (including hard_header_len) to
      the default values. We add needed_headroom here so that needed_headroom
      will also be reset.
      
      Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
      Cc: Martin Schiller <ms@dev.tdt.de>
      Cc: Andrew Hendry <andrew.hendry@gmail.com>
      Signed-off-by: default avatarXie He <xie.he.0141@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      77b981c8
    • Jarod Wilson's avatar
      bonding: show saner speed for broadcast mode · 4ca0d9ac
      Jarod Wilson authored
      Broadcast mode bonds transmit a copy of all traffic simultaneously out of
      all interfaces, so the "speed" of the bond isn't really the aggregate of
      all interfaces, but rather, the speed of the slowest active interface.
      
      Also, the type of the speed field is u32, not unsigned long, so adjust
      that accordingly, as required to make min() function here without
      complaining about mismatching types.
      
      Fixes: bb5b052f ("bond: add support to read speed and duplex via ethtool")
      CC: Jay Vosburgh <j.vosburgh@gmail.com>
      CC: Veaceslav Falico <vfalico@gmail.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: netdev@vger.kernel.org
      Acked-by: default avatarJay Vosburgh <jay.vosburgh@canonical.com>
      Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4ca0d9ac
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · 10a3b7c1
      David S. Miller authored
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf 2020-08-15
      
      The following pull-request contains BPF updates for your *net* tree.
      
      We've added 23 non-merge commits during the last 4 day(s) which contain
      a total of 32 files changed, 421 insertions(+), 141 deletions(-).
      
      The main changes are:
      
      1) Fix sock_ops ctx access splat due to register override, from John Fastabend.
      
      2) Batch of various fixes to libbpf, bpftool, and selftests when testing build
         in 32-bit mode, from Andrii Nakryiko.
      
      3) Fix vmlinux.h generation on ARM by mapping GCC built-in types (__Poly*_t)
         to equivalent ones clang can work with, from Jean-Philippe Brucker.
      
      4) Fix build_id lookup in bpf_get_stackid() helper by walking all NOTE ELF
         sections instead of just first, from Jiri Olsa.
      
      5) Avoid use of __builtin_offsetof() in libbpf for CO-RE, from Yonghong Song.
      
      6) Fix segfault in test_mmap due to inconsistent length params, from Jianlin Lv.
      
      7) Don't override errno in libbpf when logging errors, from Toke Høiland-Jørgensen.
      
      8) Fix v4_to_v6 sockaddr conversion in sk_lookup test, from Stanislav Fomichev.
      
      9) Add link to bpf-helpers(7) man page to BPF doc, from Joe Stringer.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      10a3b7c1
  4. 14 Aug, 2020 11 commits