* [GIT] Networking
From: David Miller @ 2018-05-11 21:00 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
1) Verify lengths of keys provided by the user is AF_KEY, from
Kevin Easton.
2) Add device ID for BCM89610 PHY. Thanks to Bhadram Varka.
3) Add Spectre guards to some ATM code, courtesy of Gustavo
A. R. Silva.
4) Fix infinite loop in NSH protocol code. To Eric Dumazet
we are most grateful for this fix.
5) Line up /proc/net/netlink headers properly. This fix from YU Bo,
we do appreciate.
6) Use after free in TLS code. Once again we are blessed by the
honorable Eric Dumazet with this fix.
7) Fix regression in TLS code causing stalls on partial TLS records.
This fix is bestowed upon us by Andrew Tomt.
8) Deal with too small MTUs properly in LLC code, another great gift
from Eric Dumazet.
9) Handle cached route flushing properly wrt. MTU locking in ipv4,
to Hangbin Liu we give thanks for this.
10) Fix regression in SO_BINDTODEVIC handling wrt. UDP socket demux.
Paolo Abeni, he gave us this.
11) Range check coalescing parameters in mlx4 driver, thank you
Moshe Shemesh.
12) Some ipv6 ICMP error handling fixes in rxrpc, from our good
brother David Howells.
13) Fix kexec on mlx5 by freeing IRQs in shutdown path. Daniel
Juergens, you're the best!
14) Don't send bonding RLB updates to invalid MAC addresses.
Debabrata Benerjee saved us!
15) Uh oh, we were leaking in udp_sendmsg and ping_v4_sendmsg. The
ship is now water tight, thanks to Andrey Ignatov.
16) IPSEC memory leak in ixgbe from Colin Ian King, man we've got
holes everywhere!
17) Fix error path in tcf_proto_create, Jiri Pirko what would we
do without you!
Please pull, thanks a lot!
The following changes since commit 1504269814263c9676b4605a6a91e14dc6ceac21:
Merge tag 'linux-kselftest-4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest (2018-05-03 19:26:51 -1000)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git
for you to fetch changes up to a52956dfc503f8cc5cfe6454959b7049fddb4413:
net sched actions: fix refcnt leak in skbmod (2018-05-11 16:37:03 -0400)
----------------------------------------------------------------
Adi Nissim (1):
net/mlx5: E-Switch, Include VF RDMA stats in vport statistics
Alexander Aring (1):
net: ieee802154: 6lowpan: fix frag reassembly
Anders Roxell (1):
selftests: net: use TEST_PROGS_EXTENDED
Andre Tomt (1):
net/tls: Fix connection stall on partial tls record
Andrew Lunn (1):
net: dsa: mv88e6xxx: Fix PHY interrupts by parameterising PHY base address
Andrey Ignatov (1):
ipv4: fix memory leaks in udp_sendmsg, ping_v4_sendmsg
Antoine Tenart (1):
net: phy: sfp: fix the BR,min computation
Bhadram Varka (1):
net: phy: broadcom: add support for BCM89610 PHY
Christophe JAILLET (2):
net/mlx4_en: Fix an error handling path in 'mlx4_en_init_netdev()'
mlxsw: core: Fix an error handling path in 'mlxsw_core_bus_device_register()'
Colin Ian King (5):
firestream: fix spelling mistake: "reseverd" -> "reserved"
sctp: fix spelling mistake: "max_retans" -> "max_retrans"
net/9p: fix spelling mistake: "suspsend" -> "suspend"
qed: fix spelling mistake: "taskelt" -> "tasklet"
ixgbe: fix memory leak on ipsec allocation
Daniel Borkmann (1):
bpf: use array_index_nospec in find_prog_type
Daniel Jurgens (1):
net/mlx5: Free IRQs in shutdown path
David Howells (5):
rxrpc: Fix missing start of call timeout
rxrpc: Fix error reception on AF_INET6 sockets
rxrpc: Fix the min security level for kernel calls
rxrpc: Add a tracepoint to log ICMP/ICMP6 and error messages
rxrpc: Trace UDP transmission failure
David S. Miller (13):
Merge git://git.kernel.org/.../bpf/bpf
Merge branch 'for-upstream' of git://git.kernel.org/.../bluetooth/bluetooth
Merge branch 'master' of git://git.kernel.org/.../klassert/ipsec
Merge branch 'Aquantia-various-patches-2018-05'
Merge branch 'ieee802154-for-davem-2018-05-08' of git://git.kernel.org/.../sschmidt/wpan
Merge tag 'linux-can-fixes-for-4.17-20180508' of ssh://gitolite.kernel.org/.../mkl/linux-can
Merge branch 'qed-rdma-fixes'
Merge tag 'mac80211-for-davem-2018-05-09' of git://git.kernel.org/.../jberg/mac80211
Merge tag 'linux-can-fixes-for-4.17-20180510' of ssh://gitolite.kernel.org/.../mkl/linux-can
Merge branch 'bonding-bug-fixes-and-regressions'
Merge tag 'mlx5-fixes-2018-05-10' of git://git.kernel.org/.../saeed/linux
Merge tag 'rxrpc-fixes-20180510' of git://git.kernel.org/.../dhowells/linux-fs
Merge branch '10GbE' of git://git.kernel.org/.../jkirsher/net-queue
Davide Caratti (1):
tc-testing: fix tdc tests for 'bpf' action
Debabrata Banerjee (2):
bonding: do not allow rlb updates to invalid mac
bonding: send learning packets for vlans on slave
Emil Tantilov (1):
ixgbe: return error on unsupported SFP module when resetting
Eric Dumazet (4):
nsh: fix infinite loop
tls: fix use after free in tls_sk_proto_close
llc: better deal with too small mtu
tipc: fix one byte leak in tipc_sk_set_orig_addr()
Ganesh Goudar (2):
cxgb4: zero the HMA memory
cxgb4: copy mbox log size to PF0-3 adap instances
Geert Uytterhoeven (1):
dt-bindings: can: rcar_can: Fix R8A7796 SoC name
Georg Hofmann (1):
trivial: fix inconsistent help texts
Gustavo A. R. Silva (3):
ieee802154: mcr20a: Fix memory leak in mcr20a_probe
atm: zatm: Fix potential Spectre v1
net: atm: Fix potential Spectre v1
Hangbin Liu (1):
ipv4: reset fnhe_mtu_locked after cache route flushed
Hans de Goede (3):
Revert "Bluetooth: btusb: Fix quirk for Atheros 1525/QCA6174"
Bluetooth: btusb: Only check needs_reset_resume DMI table for QCA rome chipsets
Bluetooth: btusb: Add Dell XPS 13 9360 to btusb_needs_reset_resume_table
Heiner Kallweit (1):
r8169: fix powering up RTL8168h
Igor Russkikh (2):
net: aquantia: driver should correctly declare vlan_features bits
net: aquantia: Limit number of vectors to actually allocated irqs
Ilan Peer (2):
mac80211: Fix condition validating WMM IE
mac80211: Adjust SAE authentication timeout
Jakob Unterwurzacher (1):
can: dev: increase bus-off message severity
Jeff Shaw (1):
ice: Set rq_last_status when cleaning rq
Jia-Ju Bai (1):
net: ieee802154: atusb: Replace GFP_ATOMIC with GFP_KERNEL in atusb_probe
Jimmy Assarsson (1):
can: kvaser_usb: Increase correct stats counter in kvaser_usb_rx_can_msg()
Jiri Pirko (1):
net: sched: fix error path in tcf_proto_create() when modules are not configured
Johan Hovold (1):
rfkill: gpio: fix memory leak in probe error path
Johannes Berg (1):
cfg80211: limit wiphy names to 128 bytes
Kevin Easton (1):
af_key: Always verify length of provided sadb_key
Luc Van Oostenryck (1):
ixgbevf: fix ixgbevf_xmit_frame()'s return type
Lukas Wunner (2):
can: hi311x: Acquire SPI lock on ->do_get_berr_counter
can: hi311x: Work around TX complete interrupt erratum
Mark Rutland (1):
bpf: fix possible spectre-v1 in find_and_alloc_map()
Michael Chan (1):
tg3: Fix vunmap() BUG_ON() triggered from tg3_free_consistent().
Michal Kalderon (2):
qed: Fix l2 initializations over iWARP personality
qede: Fix gfp flags sent to rdma event node allocation
Mohammed Gamal (1):
hv_netvsc: Fix net device attach on older Windows hosts
Moritz Fischer (2):
net: nixge: Fix error path for obtaining mac address
net: nixge: Address compiler warnings about signedness
Moshe Shemesh (1):
net/mlx4_en: Verify coalescing parameters are in range
Paolo Abeni (1):
udp: fix SO_BINDTODEVICE
Pieter Jansen van Vuuren (1):
nfp: flower: remove headroom from max MTU calculation
Randy Dunlap (1):
mac80211: fix kernel-doc "bad line" warning
Rob Taglang (1):
net: ethernet: sun: niu set correct packet size in skb
Roi Dayan (1):
net/mlx5e: Err if asked to offload TC match on frag being first
Roman Mashak (2):
net sched actions: fix invalid pointer dereferencing if skbedit flags missing
net sched actions: fix refcnt leak in skbmod
Sara Sharon (1):
mac80211: use timeout from the AddBA response instead of the request
Sergei Shtylyov (2):
DT: net: can: rcar_canfd: document R8A77970 bindings
DT: net: can: rcar_canfd: document R8A77980 bindings
Srinivas Dasari (1):
nl80211: Free connkeys on external authentication failure
Stefan Schmidt (1):
net: ieee802154: mcr20a: do not leak resources on error path
Stefano Brivio (2):
vti6: Change minimum MTU to IPV4_MIN_MTU, vti6 can carry IPv4 too
openvswitch: Don't swap table in nlattr_set() after OVS_ATTR_NESTED is found
Steffen Klassert (2):
xfrm: Fix warning in xfrm6_tunnel_net_exit.
MAINTAINERS: Update the 3c59x network driver entry
Stephen Hemminger (1):
hv_netvsc: set master device
Sun Lianwen (1):
net/9p: correct some comment errors in 9p file system code
Uwe Kleine-König (2):
can: flexcan: fix endianess detection
arm: dts: imx[35]*: declare flexcan devices to be compatible to imx25's flexcan
Wolfram Sang (1):
net: flow_dissector: fix typo 'can by' to 'can be'
Xin Long (2):
sctp: delay the authentication for the duplicated cookie-echo chunk
sctp: remove sctp_chunk_put from fail_mark err path in sctp_ulpevent_make_rcvmsg
YU Bo (1):
net/netlink: make sure the headers line up actual value output
Ying Xue (1):
tipc: eliminate KMSAN uninit-value in strcmp complaint
YueHaibing (1):
mac80211_hwsim: fix a possible memory leak in hwsim_new_radio_nl()
weiyongjun (A) (1):
cfg80211: fix possible memory leak in regdb_query_country()
Documentation/devicetree/bindings/net/can/rcar_canfd.txt | 4 ++-
MAINTAINERS | 4 +--
arch/arm/boot/dts/imx35.dtsi | 4 +--
arch/arm/boot/dts/imx53.dtsi | 4 +--
drivers/atm/firestream.c | 2 +-
drivers/atm/zatm.c | 3 +++
drivers/bluetooth/btusb.c | 19 +++++++++++---
drivers/net/bonding/bond_alb.c | 15 ++++++-----
drivers/net/bonding/bond_main.c | 2 ++
drivers/net/can/dev.c | 2 +-
drivers/net/can/flexcan.c | 26 ++++++++++---------
drivers/net/can/spi/hi311x.c | 11 +++++---
drivers/net/can/usb/kvaser_usb.c | 2 +-
drivers/net/dsa/mv88e6xxx/chip.c | 26 +++++++++++++++++++
drivers/net/dsa/mv88e6xxx/chip.h | 1 +
drivers/net/dsa/mv88e6xxx/global2.c | 2 +-
drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 3 +++
drivers/net/ethernet/aquantia/atlantic/aq_nic.h | 1 +
drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 20 +++++++-------
drivers/net/ethernet/broadcom/tg3.c | 9 ++++---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 7 +++--
drivers/net/ethernet/intel/ice/ice_controlq.c | 2 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c | 2 +-
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 3 +++
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +-
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 16 ++++++++++++
drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 8 +-----
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 7 +++--
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 +++
drivers/net/ethernet/mellanox/mlx5/core/eq.c | 28 ++++++++++++++++++++
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 11 +++++++-
drivers/net/ethernet/mellanox/mlx5/core/main.c | 8 ++++++
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h | 2 ++
drivers/net/ethernet/mellanox/mlxsw/core.c | 4 +--
drivers/net/ethernet/netronome/nfp/flower/main.c | 19 --------------
drivers/net/ethernet/ni/nixge.c | 10 ++++---
drivers/net/ethernet/qlogic/qed/qed_l2.c | 6 ++---
drivers/net/ethernet/qlogic/qed/qed_main.c | 2 +-
drivers/net/ethernet/qlogic/qede/qede_rdma.c | 2 +-
drivers/net/ethernet/realtek/r8169.c | 3 +++
drivers/net/ethernet/sun/niu.c | 5 ++--
drivers/net/hyperv/netvsc_drv.c | 3 ++-
drivers/net/hyperv/rndis_filter.c | 2 +-
drivers/net/ieee802154/atusb.c | 2 +-
drivers/net/ieee802154/mcr20a.c | 15 +++++++----
drivers/net/phy/broadcom.c | 10 +++++++
drivers/net/phy/sfp-bus.c | 2 +-
drivers/net/wireless/mac80211_hwsim.c | 1 +
include/linux/brcmphy.h | 1 +
include/net/bonding.h | 1 +
include/net/flow_dissector.h | 2 +-
include/net/mac80211.h | 2 +-
include/net/xfrm.h | 1 +
include/trace/events/rxrpc.h | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
include/uapi/linux/nl80211.h | 2 ++
kernel/bpf/syscall.c | 19 ++++++++++----
net/9p/trans_common.c | 2 +-
net/9p/trans_fd.c | 4 +--
net/9p/trans_rdma.c | 4 +--
net/9p/trans_virtio.c | 5 ++--
net/9p/trans_xen.c | 2 +-
net/atm/lec.c | 9 +++++--
net/ieee802154/6lowpan/6lowpan_i.h | 4 +--
net/ieee802154/6lowpan/reassembly.c | 14 +++++-----
net/ipv4/ping.c | 7 +++--
net/ipv4/route.c | 1 +
net/ipv4/udp.c | 11 +++++---
net/ipv6/Kconfig | 9 +++----
net/ipv6/ip6_vti.c | 4 +--
net/ipv6/udp.c | 4 +--
net/ipv6/xfrm6_tunnel.c | 3 +++
net/key/af_key.c | 45 +++++++++++++++++++++++++-------
net/llc/af_llc.c | 3 +++
net/mac80211/agg-tx.c | 4 +++
net/mac80211/mlme.c | 27 +++++++++++++------
net/mac80211/tx.c | 3 ++-
net/netlink/af_netlink.c | 6 ++---
net/nsh/nsh.c | 4 +++
net/openvswitch/flow_netlink.c | 9 +++----
net/rfkill/rfkill-gpio.c | 7 ++++-
net/rxrpc/af_rxrpc.c | 2 +-
net/rxrpc/ar-internal.h | 1 +
net/rxrpc/conn_event.c | 11 +++++---
net/rxrpc/input.c | 2 +-
net/rxrpc/local_event.c | 3 ++-
net/rxrpc/local_object.c | 57 +++++++++++++++++++++++++++++-----------
net/rxrpc/output.c | 34 ++++++++++++++++++++++--
net/rxrpc/peer_event.c | 46 ++++++++++++++++-----------------
net/rxrpc/rxkad.c | 6 +++--
net/rxrpc/sendmsg.c | 10 +++++++
net/sched/act_skbedit.c | 3 ++-
net/sched/act_skbmod.c | 5 +++-
net/sched/cls_api.c | 2 +-
net/sctp/associola.c | 30 ++++++++++++++++++++-
net/sctp/sm_make_chunk.c | 2 +-
net/sctp/sm_statefuns.c | 86 +++++++++++++++++++++++++++++++++----------------------------
net/sctp/ulpevent.c | 1 -
net/tipc/node.c | 15 +++++++++--
net/tipc/socket.c | 3 ++-
net/tls/tls_main.c | 12 ++++-----
net/wireless/core.c | 3 +++
net/wireless/nl80211.c | 1 +
net/wireless/reg.c | 1 +
net/xfrm/xfrm_state.c | 6 +++++
tools/testing/selftests/net/Makefile | 2 +-
tools/testing/selftests/tc-testing/tc-tests/actions/bpf.json | 11 +++++---
106 files changed, 714 insertions(+), 291 deletions(-)
^ permalink raw reply
* Re: [PATCH net-next 2/4] bonding: use common mac addr checks
From: Jay Vosburgh @ 2018-05-11 20:53 UTC (permalink / raw)
To: Debabrata Banerjee
Cc: David S . Miller, netdev, Veaceslav Falico, Andy Gospodarek
In-Reply-To: <20180511192548.8119-3-dbanerje@akamai.com>
Debabrata Banerjee <dbanerje@akamai.com> wrote:
>Replace homegrown mac addr checks with faster defs from etherdevice.h
>
>Signed-off-by: Debabrata Banerjee <dbanerje@akamai.com>
>---
> drivers/net/bonding/bond_alb.c | 28 +++++++++-------------------
> 1 file changed, 9 insertions(+), 19 deletions(-)
>
>diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
>index c2f6c58e4e6a..180e50f7806f 100644
>--- a/drivers/net/bonding/bond_alb.c
>+++ b/drivers/net/bonding/bond_alb.c
>@@ -40,11 +40,6 @@
> #include <net/bonding.h>
> #include <net/bond_alb.h>
>
>-
>-
>-static const u8 mac_bcast[ETH_ALEN + 2] __long_aligned = {
>- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
>-};
> static const u8 mac_v6_allmcast[ETH_ALEN + 2] __long_aligned = {
> 0x33, 0x33, 0x00, 0x00, 0x00, 0x01
> };
>@@ -420,9 +415,7 @@ static void rlb_clear_slave(struct bonding *bond, struct slave *slave)
>
> if (assigned_slave) {
> rx_hash_table[index].slave = assigned_slave;
>- if (!ether_addr_equal_64bits(rx_hash_table[index].mac_dst,
>- mac_bcast) &&
>- !is_zero_ether_addr(rx_hash_table[index].mac_dst)) {
>+ if (is_valid_ether_addr(rx_hash_table[index].mac_dst)) {
This change and the similar ones below will now fail
non-broadcast multicast Ethernet addresses, where the prior code would
not. Is this an intentional change?
-J
> bond_info->rx_hashtbl[index].ntt = 1;
> bond_info->rx_ntt = 1;
> /* A slave has been removed from the
>@@ -525,8 +518,7 @@ static void rlb_req_update_slave_clients(struct bonding *bond, struct slave *sla
> client_info = &(bond_info->rx_hashtbl[hash_index]);
>
> if ((client_info->slave == slave) &&
>- !ether_addr_equal_64bits(client_info->mac_dst, mac_bcast) &&
>- !is_zero_ether_addr(client_info->mac_dst)) {
>+ is_valid_ether_addr(client_info->mac_dst)) {
> client_info->ntt = 1;
> ntt = 1;
> }
>@@ -567,8 +559,7 @@ static void rlb_req_update_subnet_clients(struct bonding *bond, __be32 src_ip)
> if ((client_info->ip_src == src_ip) &&
> !ether_addr_equal_64bits(client_info->slave->dev->dev_addr,
> bond->dev->dev_addr) &&
>- !ether_addr_equal_64bits(client_info->mac_dst, mac_bcast) &&
>- !is_zero_ether_addr(client_info->mac_dst)) {
>+ is_valid_ether_addr(client_info->mac_dst)) {
> client_info->ntt = 1;
> bond_info->rx_ntt = 1;
> }
>@@ -596,7 +587,7 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bon
> if ((client_info->ip_src == arp->ip_src) &&
> (client_info->ip_dst == arp->ip_dst)) {
> /* the entry is already assigned to this client */
>- if (!ether_addr_equal_64bits(arp->mac_dst, mac_bcast)) {
>+ if (!is_broadcast_ether_addr(arp->mac_dst)) {
> /* update mac address from arp */
> ether_addr_copy(client_info->mac_dst, arp->mac_dst);
> }
>@@ -644,8 +635,7 @@ static struct slave *rlb_choose_channel(struct sk_buff *skb, struct bonding *bon
> ether_addr_copy(client_info->mac_src, arp->mac_src);
> client_info->slave = assigned_slave;
>
>- if (!ether_addr_equal_64bits(client_info->mac_dst, mac_bcast) &&
>- !is_zero_ether_addr(client_info->mac_dst)) {
>+ if (is_valid_ether_addr(client_info->mac_dst)) {
> client_info->ntt = 1;
> bond->alb_info.rx_ntt = 1;
> } else {
>@@ -1418,9 +1408,9 @@ int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev)
> case ETH_P_IP: {
> const struct iphdr *iph = ip_hdr(skb);
>
>- if (ether_addr_equal_64bits(eth_data->h_dest, mac_bcast) ||
>- (iph->daddr == ip_bcast) ||
>- (iph->protocol == IPPROTO_IGMP)) {
>+ if (is_broadcast_ether_addr(eth_data->h_dest) ||
>+ iph->daddr == ip_bcast ||
>+ iph->protocol == IPPROTO_IGMP) {
> do_tx_balance = false;
> break;
> }
>@@ -1432,7 +1422,7 @@ int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev)
> /* IPv6 doesn't really use broadcast mac address, but leave
> * that here just in case.
> */
>- if (ether_addr_equal_64bits(eth_data->h_dest, mac_bcast)) {
>+ if (is_broadcast_ether_addr(eth_data->h_dest)) {
> do_tx_balance = false;
> break;
> }
>--
>2.17.0
>
^ permalink raw reply
* Re: INFO: rcu detected stall in kfree_skbmem
From: Marcelo Ricardo Leitner @ 2018-05-11 20:42 UTC (permalink / raw)
To: Eric Dumazet
Cc: Dmitry Vyukov, syzbot, Vladislav Yasevich, Neil Horman,
linux-sctp, Andrei Vagin, David Miller, Kirill Tkhai, LKML,
netdev, syzkaller-bugs
In-Reply-To: <683d1ead-d35b-27ee-0f0c-f7e815d989fc@gmail.com>
On Fri, May 11, 2018 at 12:08:33PM -0700, Eric Dumazet wrote:
>
>
> On 05/11/2018 11:41 AM, Marcelo Ricardo Leitner wrote:
>
> > But calling ip6_xmit with rcu_read_lock is expected. tcp stack also
> > does it.
> > Thus I think this is more of an issue with IPv6 stack. If a host has
> > an extensive ip6tables ruleset, it probably generates this more
> > easily.
> >
> >>> sctp_v6_xmit+0x4a5/0x6b0 net/sctp/ipv6.c:225
> >>> sctp_packet_transmit+0x26f6/0x3ba0 net/sctp/output.c:650
> >>> sctp_outq_flush+0x1373/0x4370 net/sctp/outqueue.c:1197
> >>> sctp_outq_uncork+0x6a/0x80 net/sctp/outqueue.c:776
> >>> sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1820 [inline]
> >>> sctp_side_effects net/sctp/sm_sideeffect.c:1220 [inline]
> >>> sctp_do_sm+0x596/0x7160 net/sctp/sm_sideeffect.c:1191
> >>> sctp_generate_heartbeat_event+0x218/0x450 net/sctp/sm_sideeffect.c:406
> >>> call_timer_fn+0x230/0x940 kernel/time/timer.c:1326
> >>> expire_timers kernel/time/timer.c:1363 [inline]
> >
> > Having this call from a timer means it wasn't processing sctp stack
> > for too long.
> >
>
> I feel the problem is that this part is looping, in some infinite loop.
>
> I have seen this stack traces in other reports.
Checked mail history now, seems at least two other reports on RCU
stalls had sctp_generate_heartbeat_event involved.
>
> Maybe some kind of list corruption.
Could be.
Do we know if it generated a flood of packets?
Marcelo
^ permalink raw reply
* Re: [PATCH net 1/1] net sched actions: fix refcnt leak in skbmod
From: David Miller @ 2018-05-11 20:37 UTC (permalink / raw)
To: mrv; +Cc: netdev, kernel, jhs, xiyou.wangcong, jiri
In-Reply-To: <1526063733-7813-1-git-send-email-mrv@mojatatu.com>
From: Roman Mashak <mrv@mojatatu.com>
Date: Fri, 11 May 2018 14:35:33 -0400
> When application fails to pass flags in netlink TLV when replacing
> existing skbmod action, the kernel will leak refcnt:
>
> $ tc actions get action skbmod index 1
> total acts 0
>
> action order 0: skbmod pipe set smac 00:11:22:33:44:55
> index 1 ref 1 bind 0
>
> For example, at this point a buggy application replaces the action with
> index 1 with new smac 00:aa:22:33:44:55, it fails because of zero flags,
> however refcnt gets bumped:
>
> $ tc actions get actions skbmod index 1
> total acts 0
>
> action order 0: skbmod pipe set smac 00:11:22:33:44:55
> index 1 ref 2 bind 0
> $
>
> Tha patch fixes this by calling tcf_idr_release() on existing actions.
>
> Fixes: 86da71b57383d ("net_sched: Introduce skbmod action")
> Signed-off-by: Roman Mashak <mrv@mojatatu.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply
* Re: [PATCH v3] net: phy: DP83TC811: Introduce support for the DP83TC811 phy
From: David Miller @ 2018-05-11 20:36 UTC (permalink / raw)
To: dmurphy; +Cc: andrew, f.fainelli, netdev, linux-kernel
In-Reply-To: <20180511180819.5036-1-dmurphy@ti.com>
From: Dan Murphy <dmurphy@ti.com>
Date: Fri, 11 May 2018 13:08:19 -0500
> Add support for the DP83811 phy.
>
> The DP83811 supports both rgmii and sgmii interfaces.
> There are 2 part numbers for this the DP83TC811R does not
> reliably support the SGMII interface but the DP83TC811S will.
>
> There is not a way to differentiate these parts from the
> hardware or register set. So this is controlled via the DT
> to indicate which phy mode is required. Or the part can be
> strapped to a certain interface.
>
> Data sheet can be found here:
> http://www.ti.com/product/DP83TC811S-Q1/description
> http://www.ti.com/product/DP83TC811R-Q1/description
>
> Signed-off-by: Dan Murphy <dmurphy@ti.com>
Applied to net-next, thank you.
^ permalink raw reply
* Re: [patch net] net: sched: fix error path in tcf_proto_create() when modules are not configured
From: David Miller @ 2018-05-11 20:35 UTC (permalink / raw)
To: jiri; +Cc: netdev, jhs, xiyou.wangcong, mlxsw
In-Reply-To: <20180511154532.2391-1-jiri@resnulli.us>
From: Jiri Pirko <jiri@resnulli.us>
Date: Fri, 11 May 2018 17:45:32 +0200
> From: Jiri Pirko <jiri@mellanox.com>
>
> In case modules are not configured, error out when tp->ops is null
> and prevent later null pointer dereference.
>
> Fixes: 33a48927c193 ("sched: push TC filter protocol creation into a separate function")
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Applied and queued up for -stable.
^ permalink raw reply
* Re: [PATCH net-next 3/3] cxgb4: avoid schedule while atomic
From: David Miller @ 2018-05-11 20:12 UTC (permalink / raw)
To: ganeshgr; +Cc: netdev, nirranjan, indranil, venkatesh, arjun
In-Reply-To: <1526043976-6616-1-git-send-email-ganeshgr@chelsio.com>
From: Ganesh Goudar <ganeshgr@chelsio.com>
Date: Fri, 11 May 2018 18:36:16 +0530
> do not sleep while adding or deleting udp tunnel.
>
> Fixes: 846eac3fccec ("cxgb4: implement udp tunnel callbacks")
> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next 2/3] cxgb4: enable inner header checksum calculation
From: David Miller @ 2018-05-11 20:12 UTC (permalink / raw)
To: ganeshgr; +Cc: netdev, nirranjan, indranil, venkatesh, arjun
In-Reply-To: <1526043933-6569-1-git-send-email-ganeshgr@chelsio.com>
From: Ganesh Goudar <ganeshgr@chelsio.com>
Date: Fri, 11 May 2018 18:35:33 +0530
> set cntrl bits to indicate whether inner header checksum
> needs to be calculated whenever the packet is an encapsulated
> packet and enable supported encap features.
>
> Fixes: d0a1299c6bf7 ("cxgb4: add support for vxlan segmentation offload")
> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next 1/3] cxgb4: Fix {vxlan/geneve}_port initialization
From: David Miller @ 2018-05-11 20:12 UTC (permalink / raw)
To: ganeshgr; +Cc: netdev, nirranjan, indranil, venkatesh, arjun
In-Reply-To: <1526043883-6522-1-git-send-email-ganeshgr@chelsio.com>
From: Ganesh Goudar <ganeshgr@chelsio.com>
Date: Fri, 11 May 2018 18:34:43 +0530
> From: Arjun Vynipadath <arjun@chelsio.com>
>
> adapter->rawf_cnt was not initialized, thereby
> ndo_udp_tunnel_{add/del} was returning immediately
> without initializing {vxlan/geneve}_port.
> Also initializes mps_encap_entry refcnt.
>
> Fixes: 846eac3fccec ("cxgb4: implement udp tunnel callbacks")
> Signed-off-by: Arjun Vynipadath <arjun@chelsio.com>
> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next] cxgb4: Add new T5 device id
From: David Miller @ 2018-05-11 20:10 UTC (permalink / raw)
To: ganeshgr; +Cc: netdev, nirranjan, indranil, venkatesh
In-Reply-To: <1526044054-6709-1-git-send-email-ganeshgr@chelsio.com>
From: Ganesh Goudar <ganeshgr@chelsio.com>
Date: Fri, 11 May 2018 18:37:34 +0530
> Add 0x50ad device id for new T5 card.
>
> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Applied.
^ permalink raw reply
* Re: [PATCH 3/3] net: doc: fix spelling mistake: "modrobe.d" -> "modprobe.d"
From: David Miller @ 2018-05-11 20:09 UTC (permalink / raw)
To: xiangxia.m.yue; +Cc: netdev
In-Reply-To: <1526032392-65791-3-git-send-email-xiangxia.m.yue@gmail.com>
From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Date: Fri, 11 May 2018 02:53:12 -0700
> Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Applied to net-next.
^ permalink raw reply
* Re: [PATCH 2/3] bonding: use the skb_get/set_queue_mapping
From: David Miller @ 2018-05-11 20:09 UTC (permalink / raw)
To: xiangxia.m.yue; +Cc: netdev
In-Reply-To: <1526032392-65791-2-git-send-email-xiangxia.m.yue@gmail.com>
From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Date: Fri, 11 May 2018 02:53:11 -0700
> Use the skb_get_queue_mapping, skb_set_queue_mapping
> and skb_rx_queue_recorded for skb queue_mapping in bonding
> driver, but not use it directly.
>
> Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Applied to net-next
^ permalink raw reply
* Re: [PATCH 1/3] bonding: replace the return value type
From: David Miller @ 2018-05-11 20:08 UTC (permalink / raw)
To: xiangxia.m.yue; +Cc: netdev
In-Reply-To: <1526032354-65731-1-git-send-email-xiangxia.m.yue@gmail.com>
From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Date: Fri, 11 May 2018 02:52:32 -0700
> The method ndo_start_xmit is defined as returning a
> netdev_tx_t, which is a typedef for an enum type,
> but the implementation in this driver returns an int.
>
> Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Applied to net-next
^ permalink raw reply
* Re: [PATCH net-next] erspan: auto detect truncated ipv6 packets.
From: David Miller @ 2018-05-11 20:04 UTC (permalink / raw)
To: u9012063; +Cc: netdev
In-Reply-To: <1526042987-20015-1-git-send-email-u9012063@gmail.com>
From: William Tu <u9012063@gmail.com>
Date: Fri, 11 May 2018 05:49:47 -0700
> Currently the truncated bit is set only when 1) the mirrored packet
> is larger than mtu and 2) the ipv4 packet tot_len is larger than
> the actual skb->len. This patch adds another case for detecting
> whether ipv6 packet is truncated or not, by checking the ipv6 header
> payload_len and the skb->len.
>
> Reported-by: Xiaoyan Jin <xiaoyanj@vmware.com>
> Signed-off-by: William Tu <u9012063@gmail.com>
Applied, thanks William.
^ permalink raw reply
* Re: [PATCH net-next 0/2] mlxsw: spectrum_span: Two minor adjustments
From: David Miller @ 2018-05-11 20:01 UTC (permalink / raw)
To: idosch; +Cc: netdev, jiri, petrm, mlxsw
In-Reply-To: <20180511085731.9256-1-idosch@mellanox.com>
From: Ido Schimmel <idosch@mellanox.com>
Date: Fri, 11 May 2018 11:57:29 +0300
> Petr says:
>
> This patch set fixes a couple of nits in mlxsw's SPAN implementation:
> two counts of inaccurate variable name and one count of unsuitable error
> code, fixed, respectively, in patches #1 and #2.
Series applied, thanks.
^ permalink raw reply
* Re: [PATCH] dt-bindings: net: ravb: Add support for r8a77990 SoC
From: David Miller @ 2018-05-11 19:59 UTC (permalink / raw)
To: yoshihiro.shimoda.uh
Cc: netdev, linux-renesas-soc, robh+dt, mark.rutland, sergei.shtylyov,
devicetree
In-Reply-To: <1526008736-26496-1-git-send-email-yoshihiro.shimoda.uh@renesas.com>
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date: Fri, 11 May 2018 12:18:56 +0900
> Add documentation for r8a77990 compatible string to renesas ravb device
> tree bindings documentation.
>
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
I'm assuming this isn't targetted at one of my trees. Just FYI.
^ permalink raw reply
* Re: [net 0/4][pull request] Intel Wired LAN Driver Updates 2018-05-11
From: David Miller @ 2018-05-11 19:57 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, nhorman, sassmann, jogreene
In-Reply-To: <20180511194722.28325-1-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 11 May 2018 12:47:18 -0700
> This series contains fixes to the ice, ixgbe and ixgbevf drivers.
...
> The following are changes since commit 5ae4bbf76928b401fe467e837073d939300adbf0:
> Merge tag 'mlx5-fixes-2018-05-10' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux
> and are available in the git repository at:
> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue 10GbE
Pulled, thanks Jeff.
^ permalink raw reply
* Re: [PATCH v2 1/3] selinux: add AF_UNSPEC and INADDR_ANY checks to selinux_socket_bind()
From: Richard Haines via Selinux @ 2018-05-11 19:56 UTC (permalink / raw)
To: Alexey Kodanev, selinux-+05T5uksL2qpZYMLLGbcSA
Cc: linux-security-module-u79uwXL29TY76Z2rM5mHXA, Stephen Smalley,
netdev
In-Reply-To: <1526058913-14198-1-git-send-email-alexey.kodanev-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
On Fri, 2018-05-11 at 20:15 +0300, Alexey Kodanev wrote:
> Commit d452930fd3b9 ("selinux: Add SCTP support") breaks
> compatibility
> with the old programs that can pass sockaddr_in structure with
> AF_UNSPEC
> and INADDR_ANY to bind(). As a result, bind() returns EAFNOSUPPORT
> error.
> This was found with LTP/asapi_01 test.
>
> Similar to commit 29c486df6a20 ("net: ipv4: relax AF_INET check in
> bind()"), which relaxed AF_INET check for compatibility, add
> AF_UNSPEC
> case to AF_INET and make sure that the address is INADDR_ANY.
>
> Fixes: d452930fd3b9 ("selinux: Add SCTP support")
> Signed-off-by: Alexey Kodanev <alexey.kodanev-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
>
> v2: As suggested by Paul:
> * return EINVAL for SCTP socket if sa_family is AF_UNSPEC and
> address is not INADDR_ANY
> * add new 'sa_family' variable so that it equals either AF_INET
> or AF_INET6. Besides, it it will be used in the next patch that
> fixes audit record.
>
> security/selinux/hooks.c | 29 +++++++++++++++++++----------
> 1 file changed, 19 insertions(+), 10 deletions(-)
>
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index 4cafe6a..1ed7004 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -4576,6 +4576,7 @@ static int selinux_socket_post_create(struct
> socket *sock, int family,
> static int selinux_socket_bind(struct socket *sock, struct sockaddr
> *address, int addrlen)
> {
> struct sock *sk = sock->sk;
> + struct sk_security_struct *sksec = sk->sk_security;
> u16 family;
> int err;
>
> @@ -4587,11 +4588,11 @@ static int selinux_socket_bind(struct socket
> *sock, struct sockaddr *address, in
> family = sk->sk_family;
> if (family == PF_INET || family == PF_INET6) {
> char *addrp;
> - struct sk_security_struct *sksec = sk->sk_security;
> struct common_audit_data ad;
> struct lsm_network_audit net = {0,};
> struct sockaddr_in *addr4 = NULL;
> struct sockaddr_in6 *addr6 = NULL;
> + u16 family_sa = address->sa_family;
> unsigned short snum;
> u32 sid, node_perm;
>
> @@ -4601,11 +4602,20 @@ static int selinux_socket_bind(struct socket
> *sock, struct sockaddr *address, in
> * need to check address->sa_family as it is
> possible to have
> * sk->sk_family = PF_INET6 with addr->sa_family =
> AF_INET.
> */
> - switch (address->sa_family) {
> + switch (family_sa) {
> + case AF_UNSPEC:
> case AF_INET:
> if (addrlen < sizeof(struct sockaddr_in))
> return -EINVAL;
> addr4 = (struct sockaddr_in *)address;
> + if (family_sa == AF_UNSPEC) {
> + /* see __inet_bind(), we only want
> to allow
> + * AF_UNSPEC if the address is
> INADDR_ANY
> + */
> + if (addr4->sin_addr.s_addr !=
> htonl(INADDR_ANY))
> + goto err_af;
> + family_sa = AF_INET;
> + }
> snum = ntohs(addr4->sin_port);
> addrp = (char *)&addr4->sin_addr.s_addr;
> break;
> @@ -4617,13 +4627,7 @@ static int selinux_socket_bind(struct socket
> *sock, struct sockaddr *address, in
> addrp = (char *)&addr6->sin6_addr.s6_addr;
> break;
> default:
> - /* Note that SCTP services expect -EINVAL,
> whereas
> - * others expect -EAFNOSUPPORT.
> - */
> - if (sksec->sclass == SECCLASS_SCTP_SOCKET)
> - return -EINVAL;
> - else
> - return -EAFNOSUPPORT;
> + goto err_af;
> }
>
> if (snum) {
> @@ -4681,7 +4685,7 @@ static int selinux_socket_bind(struct socket
> *sock, struct sockaddr *address, in
> ad.u.net->sport = htons(snum);
> ad.u.net->family = family;
>
> - if (address->sa_family == AF_INET)
> + if (family_sa == AF_INET)
> ad.u.net->v4info.saddr = addr4-
> >sin_addr.s_addr;
> else
> ad.u.net->v6info.saddr = addr6->sin6_addr;
> @@ -4694,6 +4698,11 @@ static int selinux_socket_bind(struct socket
> *sock, struct sockaddr *address, in
> }
> out:
> return err;
> +err_af:
> + /* Note that SCTP services expect -EINVAL, others
> -EAFNOSUPPORT. */
> + if (sksec->sclass == SECCLASS_SCTP_SOCKET)
> + return -EINVAL;
> + return -EAFNOSUPPORT;
> }
>
> /* This supports connect(2) and SCTP connect services such as
> sctp_connectx(3)
Tested all three patches with no unexpected problems on kernel from [1]
using:
1) lksctp-tools - Passed except test_1_to_1_events as per [2]
2) sctp-tests - As above
3) selinux-testsuite with my SCTP patch [3] - Passes all sctp and
inet_socket tests.
4) The LTP "./runltp -pq -f connect-syscall" (see [4]) - Passes
[1] https://github.com/SELinuxProject/selinux-kernel/tree/next
[2] https://github.com/sctp/lksctp-tools/issues/24
[3] https://marc.info/?l=selinux&m=152156947715709&w=2
[4] https://marc.info/?l=selinux&m=151990968221563&w=2
^ permalink raw reply
* Re: [PATCH net 0/5] rxrpc: Fixes
From: David Miller @ 2018-05-11 19:56 UTC (permalink / raw)
To: dhowells; +Cc: netdev, linux-afs, linux-kernel
In-Reply-To: <152599231687.26376.15020977491573449830.stgit@warthog.procyon.org.uk>
From: David Howells <dhowells@redhat.com>
Date: Thu, 10 May 2018 23:45:17 +0100
> Here are three fixes for AF_RXRPC and two tracepoints that were useful for
> finding them:
...
> The patches are tagged here:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
> rxrpc-fixes-20180510
Pulled, thanks David.
^ permalink raw reply
* [PATCH net-next 0/4] bonding: performance and reliability
From: Debabrata Banerjee @ 2018-05-11 19:25 UTC (permalink / raw)
To: David S . Miller, netdev
Cc: Jay Vosburgh, Veaceslav Falico, Andy Gospodarek, dbanerje
Series of fixes to how rlb updates are handled, code cleanup, allowing
higher performance tx hashing in balance-alb mode, and reliability of
link up/down monitoring.
Debabrata Banerjee (4):
bonding: don't queue up extraneous rlb updates
bonding: use common mac addr checks
bonding: allow use of tx hashing in balance-alb
bonding: allow carrier and link status to determine link state
Documentation/networking/bonding.txt | 4 +--
drivers/net/bonding/bond_alb.c | 50 +++++++++++++++++-----------
drivers/net/bonding/bond_main.c | 37 ++++++++++++--------
drivers/net/bonding/bond_options.c | 9 ++---
include/net/bonding.h | 10 +++++-
5 files changed, 70 insertions(+), 40 deletions(-)
--
2.17.0
^ permalink raw reply
* Re: [PATCH v2 net 1/1] net sched actions: fix invalid pointer dereferencing if skbedit flags missing
From: David Miller @ 2018-05-11 19:53 UTC (permalink / raw)
To: mrv; +Cc: netdev, kernel, jhs, xiyou.wangcong, jiri, alexander.duyck
In-Reply-To: <1526050509-30487-1-git-send-email-mrv@mojatatu.com>
From: Roman Mashak <mrv@mojatatu.com>
Date: Fri, 11 May 2018 10:55:09 -0400
> When application fails to pass flags in netlink TLV for a new skbedit action,
> the kernel results in the following oops:
...
> The caller calls action's ->init() and passes pointer to "struct tc_action *a",
> which later may be initialized to point at the existing action, otherwise
> "struct tc_action *a" is still invalid, and therefore dereferencing it is an
> error as happens in tcf_idr_release, where refcnt is decremented.
>
> So in case of missing flags tcf_idr_release must be called only for
> existing actions.
>
> v2:
> - prepare patch for net tree
>
> Signed-off-by: Roman Mashak <mrv@mojatatu.com>
Applied and queued up for -stable.
^ permalink raw reply
* Re: [PATCH] isdn: eicon: fix a missing-check bug
From: David Miller @ 2018-05-11 19:50 UTC (permalink / raw)
To: wang6495; +Cc: kjlu, mac, isdn, netdev, linux-kernel
In-Reply-To: <1525548766-13017-1-git-send-email-wang6495@umn.edu>
From: Wenwen Wang <wang6495@umn.edu>
Date: Sat, 5 May 2018 14:32:46 -0500
> To avoid such issues, this patch adds a check after the second copy in the
> function diva_xdi_write(). If the adapter number is not equal to the one
> obtained in the first copy, (-4) will be returned to divas_write(), which
> will then return an error code -EINVAL.
Better fix is to copy the msg header once into an on-stack buffer supplied
by diva_write() to diva_xdi_open_adapter(), which is then passed on to
diva_xdi_write() with an adjusted src pointer and length.
^ permalink raw reply
* [PATCH net-next 4/4] bonding: allow carrier and link status to determine link state
From: Debabrata Banerjee @ 2018-05-11 19:25 UTC (permalink / raw)
To: David S . Miller, netdev
Cc: Jay Vosburgh, Veaceslav Falico, Andy Gospodarek, dbanerje
In-Reply-To: <20180511192548.8119-1-dbanerje@akamai.com>
In a mixed environment it may be difficult to tell if your hardware
support carrier, if it does not it can always report true. With a new
use_carrier option of 2, we can check both carrier and link status
sequentially, instead of one or the other
Signed-off-by: Debabrata Banerjee <dbanerje@akamai.com>
---
Documentation/networking/bonding.txt | 4 ++--
drivers/net/bonding/bond_main.c | 12 ++++++++----
drivers/net/bonding/bond_options.c | 7 ++++---
3 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt
index 9ba04c0bab8d..f063730e7e73 100644
--- a/Documentation/networking/bonding.txt
+++ b/Documentation/networking/bonding.txt
@@ -828,8 +828,8 @@ use_carrier
MII / ETHTOOL ioctl method to determine the link state.
A value of 1 enables the use of netif_carrier_ok(), a value of
- 0 will use the deprecated MII / ETHTOOL ioctls. The default
- value is 1.
+ 0 will use the deprecated MII / ETHTOOL ioctls. A value of 2
+ will check both. The default value is 1.
xmit_hash_policy
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index f7f8a49cb32b..7e9652c4b35c 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -132,7 +132,7 @@ MODULE_PARM_DESC(downdelay, "Delay before considering link down, "
"in milliseconds");
module_param(use_carrier, int, 0);
MODULE_PARM_DESC(use_carrier, "Use netif_carrier_ok (vs MII ioctls) in miimon; "
- "0 for off, 1 for on (default)");
+ "0 for off, 1 for on (default), 2 for carrier then legacy checks");
module_param(mode, charp, 0);
MODULE_PARM_DESC(mode, "Mode of operation; 0 for balance-rr, "
"1 for active-backup, 2 for balance-xor, "
@@ -434,12 +434,16 @@ static int bond_check_dev_link(struct bonding *bond,
int (*ioctl)(struct net_device *, struct ifreq *, int);
struct ifreq ifr;
struct mii_ioctl_data *mii;
+ bool carrier = true;
if (!reporting && !netif_running(slave_dev))
return 0;
if (bond->params.use_carrier)
- return netif_carrier_ok(slave_dev) ? BMSR_LSTATUS : 0;
+ carrier = netif_carrier_ok(slave_dev) ? BMSR_LSTATUS : 0;
+
+ if (!carrier)
+ return carrier;
/* Try to get link status using Ethtool first. */
if (slave_dev->ethtool_ops->get_link)
@@ -4399,8 +4403,8 @@ static int bond_check_params(struct bond_params *params)
downdelay = 0;
}
- if ((use_carrier != 0) && (use_carrier != 1)) {
- pr_warn("Warning: use_carrier module parameter (%d), not of valid value (0/1), so it was set to 1\n",
+ if (use_carrier < 0 || use_carrier > 2) {
+ pr_warn("Warning: use_carrier module parameter (%d), not of valid value (0-2), so it was set to 1\n",
use_carrier);
use_carrier = 1;
}
diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c
index 8a945c9341d6..dba6cef05134 100644
--- a/drivers/net/bonding/bond_options.c
+++ b/drivers/net/bonding/bond_options.c
@@ -164,9 +164,10 @@ static const struct bond_opt_value bond_primary_reselect_tbl[] = {
};
static const struct bond_opt_value bond_use_carrier_tbl[] = {
- { "off", 0, 0},
- { "on", 1, BOND_VALFLAG_DEFAULT},
- { NULL, -1, 0}
+ { "off", 0, 0},
+ { "on", 1, BOND_VALFLAG_DEFAULT},
+ { "both", 2, 0},
+ { NULL, -1, 0}
};
static const struct bond_opt_value bond_all_slaves_active_tbl[] = {
--
2.17.0
^ permalink raw reply related
* [net 2/4] ixgbe: return error on unsupported SFP module when resetting
From: Jeff Kirsher @ 2018-05-11 19:47 UTC (permalink / raw)
To: davem; +Cc: Emil Tantilov, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
In-Reply-To: <20180511194722.28325-1-jeffrey.t.kirsher@intel.com>
From: Emil Tantilov <emil.s.tantilov@intel.com>
Add check for unsupported module and return the error code.
This fixes a Coverity hit due to unused return status from setup_sfp.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
index 3123267dfba9..9592f3e3e42e 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
@@ -3427,6 +3427,9 @@ static s32 ixgbe_reset_hw_X550em(struct ixgbe_hw *hw)
hw->phy.sfp_setup_needed = false;
}
+ if (status == IXGBE_ERR_SFP_NOT_SUPPORTED)
+ return status;
+
/* Reset PHY */
if (!hw->phy.reset_disable && hw->phy.ops.reset)
hw->phy.ops.reset(hw);
--
2.17.0
^ permalink raw reply related
* [net 3/4] ixgbevf: fix ixgbevf_xmit_frame()'s return type
From: Jeff Kirsher @ 2018-05-11 19:47 UTC (permalink / raw)
To: davem; +Cc: Luc Van Oostenryck, netdev, nhorman, sassmann, jogreene,
Jeff Kirsher
In-Reply-To: <20180511194722.28325-1-jeffrey.t.kirsher@intel.com>
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, but the implementation in this
driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index e3d04f226d57..850f8af95e49 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -4137,7 +4137,7 @@ static int ixgbevf_xmit_frame_ring(struct sk_buff *skb,
return NETDEV_TX_OK;
}
-static int ixgbevf_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t ixgbevf_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
{
struct ixgbevf_adapter *adapter = netdev_priv(netdev);
struct ixgbevf_ring *tx_ring;
--
2.17.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox