[PATCH v4 5/9] net/ixgbe/base: fix lock checker errors

Burakov, Anatoly anatoly.burakov at intel.com
Fri Mar 28 14:05:33 CET 2025


On 3/28/2025 12:16 PM, Bruce Richardson wrote:
> When building on FreeBSD, errors are reported in the base code by the
> lock checker (-Wthread-safety). For example:
> 
> ../drivers/net/intel/ixgbe/base/ixgbe_osdep.c:42:1: error: mutex 'lock->mutex' is still held at the end of function [-Werror,-Wthread-safety-analysis]
>     42 | }
>        | ^
> 
> These errors are due to the checker not recognising the lock wrapper
> functions. We can avoid these errors by converting these functions into
> macros. While converting the lock macros, we can also convert the memory
> allocation functions too, which allows us to remove the osdep.c file
> entirely from the build.
> 
> Fixes: 30b19d1b5c43 ("net/ixgbe/base: add definitions for E610")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> ---
Reviewed-by: Anatoly Burakov <anatoly.burakov at intel.com>

-- 
Thanks,
Anatoly


More information about the stable mailing list