On Sunday, 6 June 2021 17:48:25 CEST Tetsuo Handa wrote:
And the explanation you give seems to be bogus. Or am I missing some error handling in batadv_hardif_enable_interface [1]?
I told syzbot to try https://syzkaller.appspot.com/text?tag=Patch&x=100b083fd00000 and the response ( https://syzkaller.appspot.com/text?tag=CrashLog&x=1456f0ffd00000 ) was
batman_adv: forw_packet->if_outgoing->soft_iface=0000000000000000 forw_packet->if_incoming->soft_iface=0000000039fa85b7
indicating that if_outgoing->soft_iface was NULL, and there was a memory allocation fault injection immediately before this result.
Since if_outgoing->soft_iface becomes non-NULL if batadv_hardif_enable_interface() succeeds, this situation indicates that batadv_hardif_enable_interface() failure caused forw_packet->if_outgoing->soft_iface to remain NULL.
Ok, then I misread the commit message. I've understood is as "soft_iface" allocation failed (which doesn't happen here anymore) in batadv_hardif_enable_interface. But you meant that was that hard_iface->soft_iface is set to the correct value, the OGM transmission is started up by batadv_iv_ogm_schedule_buff but soft_iface is changed back immediately in batadv_hardif_enable_interface because netdev_master_upper_dev_link failed.
Kind regards, Sven