[Patch v3] net/mana: use mana_local_data for tracking usage data for primary process
Stephen Hemminger
stephen at networkplumber.org
Fri Feb 21 21:11:14 CET 2025
On Thu, 20 Feb 2025 15:32:02 -0800
longli at linuxonhyperv.com wrote:
> From: Long Li <longli at microsoft.com>
>
> The driver uses mana_shared_data for tracking usage count for primary
> process. This is not correct as the mana_shared_data is allocated
> by the primary and is meant to track usage of secondary process by the
> primary process. And it creates a race condition when the device is
> removed because the counter is no longer available if this shared
> memory is freed.
>
> Move the usage count tracking to mana_local_data and fix the race
> condition in mana_pci_remove().
>
> Fixes: 517ed6e2d590 ("net/mana: add basic driver with build environment")
> Signed-off-by: Long Li <longli at microsoft.com>
Ok, mind if I break the long lines when merging?
More information about the dev
mailing list