Subject: CVE-2024-20607: pds_core: Prevent health thread from running during reset/remove

From: Greg Kroah-Hartman <[email-masked]>

Description
===========

pds_core: Prevent health thread from running during reset/remove

The PCIe reset handlers can run at the same time as the
health thread. This can cause the health thread to
stomp on the PCIe reset. Fix this by preventing the
health thread from running while a PCIe reset is happening.

As part of this use timer_shutdown_sync() during reset and
remove to make sure the timer doesn't ever get rearmed.

The Linux kernel CVE team has assigned CVE-2024-20607 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.7 with commit ffa55858330f and fixed in 6.7.4 with commit 46826a384406
	Issue introduced in 6.7 with commit ffa55858330f and fixed in 6.8-rc3 with commit d9407ff11809

Please see https://www.kernel.org or a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2024-20607
will be updated if fixes are backported, please check that for the most
up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
	drivers/net/ethernet/amd/pds_core/main.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/46826a384406
	https://git.kernel.org/stable/c/d9407ff11809