On Mon, 21 Oct 2019 12:01:57 +0200, Stefano Brivio wrote:
> From: Hillf Danton <[email protected]>
> 
> syzbot found the following crash on:
 
> The function in net core, register_netdevice(), may fail with vport's
> destruction callback either invoked or not. After commit 309b66970ee2,

I've added the correct commit quote here, please heed checkpatch'es
warnings.

> the duty to destroy vport is offloaded from the driver OTOH, which ends
> up in the memory leak reported.
> 
> It is fixed by releasing vport unless device is registered successfully.
> To do that, the callback assignment is defered until device is registered.
> 
> Reported-by: [email protected]
> Fixes: 309b66970ee2 ("net: openvswitch: do not free vport if 
> register_netdevice() is failed.")
> Cc: Taehee Yoo <[email protected]>
> Cc: Greg Rose <[email protected]>
> Cc: Eric Dumazet <[email protected]>
> Cc: Marcelo Ricardo Leitner <[email protected]>
> Cc: Ying Xue <[email protected]>
> Cc: Andrey Konovalov <[email protected]>
> Signed-off-by: Hillf Danton <[email protected]>
> Acked-by: Pravin B Shelar <[email protected]>
> [sbrivio: this was sent to [email protected] and never made its way
>  to netdev -- resending original patch]
> Signed-off-by: Stefano Brivio <[email protected]>
> ---
> This patch was sent to [email protected] and appeared on netdev
> only as Pravin replied to it, giving his Acked-by. I contacted the
> original author one month ago requesting to resend this to netdev,
> but didn't get an answer, so I'm now resending the original patch.

Applied and queued for 4.14+, thanks!

Reply via email to