Re: [PATCH v2] net: netrom: Fix error cleanup path of nr_proto_init

From: David Miller
Date: Thu Apr 11 2019 - 17:00:14 EST


From: Yue Haibing <yuehaibing@xxxxxxxxxx>
Date: Tue, 9 Apr 2019 19:53:55 +0800

> From: YueHaibing <yuehaibing@xxxxxxxxxx>
>
> Syzkaller report this:
...
> If nr_proto_init failed, it may forget to call proto_unregister,
> tiggering this issue.This patch rearrange code of nr_proto_init
> to avoid such issues.
>
> Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
> Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>
> ---
> v2: fix compile warnings

Applied.