net/nfp: cancel delayed LSC work in port close
authorHeinrich Kuhn <heinrich.kuhn@corigine.com>
Wed, 6 Oct 2021 06:44:55 +0000 (08:44 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 7 Oct 2021 10:19:53 +0000 (12:19 +0200)
commit851f03e1eab7d29a81078832b49f2977e9562524
treeeef6bb31d91ce4c56f2b174163fe3f4433a893b4
parent7483341ae5533c5d5fa080a5d229e6f2daf03ea5
net/nfp: cancel delayed LSC work in port close

The link state change interrupt handler of the NFP PMD will delay the
actual LSC work for a short period to ensure the link is stable. If the
link of the port changes state and the port is closed immediately after
the link event then a segmentation fault will occur. This happens
because the delayed LSC work eventually triggers and this logic will try
to access private port data that had been released when the port was
closed.

Fixes: 6c53f87b3497 ("nfp: add link status interrupt")
Cc: stable@dpdk.org
Signed-off-by: Heinrich Kuhn <heinrich.kuhn@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
drivers/net/nfp/nfp_common.c
drivers/net/nfp/nfp_common.h
drivers/net/nfp/nfp_ethdev.c
drivers/net/nfp/nfp_ethdev_vf.c