Re: [PATCH] netdevice: fix sparse warning for HARD_TX_LOCK

From: David Miller
Date: Sun Nov 27 2016 - 15:44:53 EST


From: "Michael S. Tsirkin" <mst@xxxxxxxxxx>
Date: Thu, 24 Nov 2016 07:04:08 +0200

> sparse warns about context imbalance in any code
> that uses HARD_TX_LOCK/UNLOCK - this is because it's
> unable to determine that flags don't change so
> lock and unlock are paired.
>
> Seems easy enough to fix by adding __acquire/__release
> calls.
>
> With this patch af_packet.c is now sparse-clean,
>
> Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>

Applied to net-next, thanks.