On 12/12/2024 7:02 PM, Stephen Hemminger wrote:
On Thu, 12 Dec 2024 16:19:03 +0000 Anatoly Burakov <[email protected]> wrote:Currently, the architecture of the base driver is such that it uses function pointers internally. These are not guaranteed to be valid in secondary processes, which can lead to crashes. This patch prevents these functions from being executed in e1000 driver. Fixes: 805803445a02 ("e1000: support EM devices (also known as e1000/e1000e)") Cc: [email protected] Signed-off-by: Anatoly Burakov <[email protected]> ---Not a fan of this. It creates so many special cases like: "This is ixgbe, and it can do X but not Y in secondary process". Either the driver should get fixed correctly so that all operations work in secondary process, yes you would have to fix the base code. Or the driver should be not support secondary process model at all. If you have to write lots of documentation about limitations, it is not helping the user.
That is the intention. Fixing these issues will take some effort as there's a lot of code to fix due to how endemic function pointers' usage are to these drivers, but in the meantime, things "arbitrarily not working" is better than things crashing outright.
-- Thanks, Anatoly

