net: openvswitch: fix race on port output

Bug #2020606 reported by William Tu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-bluefield (Ubuntu)
Invalid
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Jammy
Fix Committed
Undecided
Unassigned

Bug Description

fix race on port output

* Explain the bug(s)

there is a race condition on port output

* brief explanation of fixes

We found that upstream linux has the same issue and fix

commit 066b86787fa3d97b7aefb5ac0a99a22dad2d15f8
Author: Felix Huettner <email address hidden>
Date: Wed Apr 5 07:53:41 2023 +0000

    net: openvswitch: fix race on port output

    assume the following setup on a single machine:
    1. An openvswitch instance with one bridge and default flows
    2. two network namespaces "server" and "client"
    3. two ovs interfaces "server" and "client" on the bridge
    4. for each ovs interface a veth pair with a matching name and 32 rx and
       tx queues
    5. move the ends of the veth pairs to the respective network namespaces
    6. assign ip addresses to each of the veth ends in the namespaces (needs
       to be the same subnet)
    7. start some http server on the server network namespace
    8. test if a client in the client namespace can reach the http server
...
    Fixes: 7f8a436eaa2c ("openvswitch: Add conntrack action")
    Co-developed-by: Luca Czesla <email address hidden>
    Signed-off-by: Luca Czesla <email address hidden>
    Signed-off-by: Felix Huettner <email address hidden>
    Reviewed-by: Eric Dumazet <email address hidden>
    Reviewed-by: Simon Horman <email address hidden>
    Link: https://lore.kernel.org/r/ZC0pBXBAgh7c76CA@kernel-bug-kernel-bug
    Signed-off-by: Jakub Kicinski <email address hidden>

* How to test
After configuring QoS on BF-3:
Disable all priorities
Set priorities [0, 0, 0, 0, 0, 0, 0, 0]
Remove all policies
Remove all traffic classes
Add policy (policy_name=ND_traffic, traffic_type=RDMA, priority=5, port=20000, dscp=None)
Add policy (policy_name=TCP_traffic, traffic_type=TCP, priority=4, port=26000, dscp=None)
Add traffic class two prio TC with prio_list=[5, 4], min_bw=76, algorithm=ETS
Enable QOS on adapter SLOT 5 Port 1
Restart driver (detach VFs -> restart with devcon -> attach VFs)

BF-3 sometimes stops responding. need to run it multiple times!

Changed in linux-bluefield (Ubuntu):
status: New → Invalid
Changed in linux-bluefield (Ubuntu Focal):
status: New → Fix Committed
Changed in linux-bluefield (Ubuntu Jammy):
status: New → Fix Committed
Revision history for this message
Bartlomiej Zolnierkiewicz (bzolnier) wrote :

This bug is awaiting verification that the linux-bluefield/5.15.0-1019.21 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy' to 'verification-done-jammy'. If the problem still exists, change the tag 'verification-needed-jammy' to 'verification-failed-jammy'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-jammy
Tien Do (tienmdo)
tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-bluefield/5.4.0-1068.74 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-focal-linux-bluefield verification-needed-focal
tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (22.7 KiB)

This bug was fixed in the package linux-bluefield - 5.4.0-1068.74

---------------
linux-bluefield (5.4.0-1068.74) focal; urgency=medium

  * focal/linux-bluefield: 5.4.0-1068.74 -proposed tracker (LP: #2026552)

  * mlxbf-tmfifo: fix potential race (LP: #2016039)
    - SAUCE: mlxbf-tmfifo: fix potential race

  * mlxbf-gige: Fix kernel panic at shutdown (LP: #2022370)
    - SAUCE: mlxbf-gige: Fix kernel panic at shutdown

  * net: openvswitch: fix race on port output (LP: #2020606)
    - net: openvswitch: fix race on port output

  * mlxbf-bootctl: support SMC call for setting ARM boot state (LP: #2013383)
    - SAUCE: mlxbf-bootctl: support SMC call for setting ARM boot state

  * mlxbf-gige: Fix intermittent no ip issue (LP: #2022387)
    - SAUCE: mlxbf-gige: Fix intermittent no ip issue

  * mlxbf-tmfifo: robust fix to drop over-sized packet or no Rx descriptors
    (LP: #2021749)
    - SAUCE: mlxbf-tmfifo: Drop the Rx packet if no more descriptors
    - SAUCE: mlxbf-tmfifo: Drop jumbo frames

  [ Ubuntu: 5.4.0-156.173 ]

  * focal/linux: 5.4.0-156.173 -proposed tracker (LP: #2026585)
  * CVE-2023-3390
    - netfilter: nf_tables: incorrect error path handling with NFT_MSG_NEWRULE
  * Focal update: v5.4.241 upstream stable release (LP: #2023930)
    - scsi: ses: Handle enclosure with just a primary component gracefully
    - x86/PCI: Add quirk for AMD XHCI controller that loses MSI-X state in D3hot
    - cgroup/cpuset: Wake up cpuset_attach_wq tasks in cpuset_cancel_attach()
    - treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD()
    - smb3: fix problem with null cifs super block with previous patch
    - pinctrl: amd: Use irqchip template
    - pinctrl: amd: disable and mask interrupts on probe
    - pinctrl: amd: Disable and mask interrupts on resume
    - pwm: cros-ec: Explicitly set .polarity in .get_state()
    - pwm: sprd: Explicitly set .polarity in .get_state()
    - wifi: mac80211: fix invalid drv_sta_pre_rcu_remove calls for non-uploaded
      sta
    - icmp: guard against too small mtu
    - net: don't let netpoll invoke NAPI if in xmit context
    - sctp: check send stream number after wait_for_sndbuf
    - ipv6: Fix an uninit variable access bug in __ip6_make_skb()
    - gpio: davinci: Add irq chip flag to skip set wake
    - sunrpc: only free unix grouplist after RCU settles
    - NFSD: callback request does not use correct credential for AUTH_SYS
    - xhci: also avoid the XHCI_ZERO_64B_REGS quirk with a passthrough iommu
    - USB: serial: cp210x: add Silicon Labs IFS-USB-DATACABLE IDs
    - usb: typec: altmodes/displayport: Fix configure initial pin assignment
    - USB: serial: option: add Telit FE990 compositions
    - USB: serial: option: add Quectel RM500U-CN modem
    - iio: adc: ti-ads7950: Set `can_sleep` flag for GPIO chip
    - iio: dac: cio-dac: Fix max DAC write value check for 12-bit
    - tty: serial: sh-sci: Fix transmit end interrupt handler
    - tty: serial: sh-sci: Fix Rx on RZ/G2L SCI
    - tty: serial: fsl_lpuart: avoid checking for transfer complete when
      UARTCTRL_SBK is asserted in lpuart32_tx_empty
    - nilfs2: fix potential UAF of struct nilfs_sc_info in nilfs_segctor_thread()
   ...

Changed in linux-bluefield (Ubuntu Focal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.