Re: [PATCH net] macvlan: fix passthru promiscuity accounting while down
From: Xia Yan
Date: Fri Oct 23 2026 - 02:17:02 EST
Hi Hangbin,
> If we discard the MACVLAN_FLAG_NOPROMISC change, should we remove the bit
> before calling WRITE_ONCE(vlan->flags, flags)?
WRITE_ONCE() still saves the new flags. The patch only skips the
lower device's promiscuity count update while the macvlan is down.
If NOPROMISC is cleared while down, macvlan_open() takes the
reference on the next open and macvlan_stop() releases it. If it is
set while down, the next open leaves the lower device's count alone.
I'd keep saving the requested flags. Clearing the bit would lose
the user's setting. Rejecting the update would require bringing the
interface up before changing this option.
Thanks,
Xia Yan