Recently, a vulnerability has been resolved in the Linux kernel that affects the i40e driver in the Intel Ethernet Controller XL710 family. This issue was reported by a customer during SRIOV (Single Root I/O Virtualization) testing, leading to a call trace warning being triggered. The cause of the problem was identified as the i40e driver workqueue being allocated with the WQ_MEM_RECLAIM flag, while the i40iw workqueue was not.

For reference, please find the original discussion of this issue here.

The error was similar to one encountered in the ice driver, and the solution was to remove the WQ_MEM_RECLAIM flag from the i40e driver as well. This fix prevents the warning from happening and ensures the work queues are properly handled by these drivers. For those interested in the details of the code change, you can find it here.

A snippet of the changes made is as follows

- wq = alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, pci_name(pdev));
+ wq = alloc_ordered_workqueue("%s", , pci_name(pdev));

The issue manifested as a warning during the SRIOV testing

[Feb 9 09:08] ------------[ cut here ]------------
[  +.000004] workqueue: WQ_MEM_RECLAIM i40e:i40e_service_task [i40e] is
flushing !WQ_MEM_RECLAIM infiniband:x

This warning indicated that the i40e driver workqueue was set to WQ_MEM_RECLAIM while the i40iw workqueue was not. The removal of this flag in the i40e driver resolved the discrepancy between the two workqueues and fixed the issue.

The problem was discovered during testing of the Linux kernel version 6.8.-rc2-Feb-net_dev-Qiueue-00279-gbd43c5687e05. Those using this version and the affected drivers should update to a version containing the fix as soon as possible to avoid potential issues.

Timeline

Published on: 05/20/2024 10:15:14 UTC
Last modified on: 06/27/2024 12:15:27 UTC