On Tue, 10 Sep 2024 00:10:08 +0200 Paolo Abeni wrote:
quoted hunk ↗ jump to hunk
+ if (adapter->netdev->reg_state == NETREG_REGISTERED) {
+ mutex_lock(&adapter->netdev->lock);
+ devlock = true;
+ }
This leads to a false positive in cocci.
Any concerns about moving the mutex_init() / _destroy() into
alloc_netdev_mqs() / free_netdev()? I guess one could argue
that narrower scope of the lock being valid may help catching
errors, but I think we'll instead end up with more checks like
the above sprinkled around than bugs caught?