2026-03-16, 12:26:11 +0800, Hangbin Liu wrote: > After calling netdev_change_features() in __netdev_upper_dev_link(), > the call stack looks like: > > - netdev_upper_dev_link > - __netdev_upper_dev_link > - netdev_change_features > - notifier_call_chain > - rtnetlink_event > - rtmsg_ifinfo_event > - rtmsg_ifinfo_build_skb > > In macsec, we call netdev_upper_dev_link() before > macsec_changelink_common(), which causes the fields of the MACsec > Security Entity to be uninitialized. Later, macsec_fill_info() returns > -EMSGSIZE and triggers WARN_ON() in rtmsg_ifinfo_build_skb. > > Fix this by moving netdev_upper_dev_link() after > macsec_changelink_common(), and return 0 if secy->key_len is not > initialized yet. > > Suggested-by: Sabrina Dubroca <[email protected]> > Signed-off-by: Hangbin Liu <[email protected]> > --- > drivers/net/macsec.c | 23 ++++++++++++----------- > 1 file changed, 12 insertions(+), 11 deletions(-)
I'm not sure I'll manage to look at the rest of the series before it's applied, but for this patch: Reviewed-by: Sabrina Dubroca <[email protected]> Thanks Hangbin. -- Sabrina

