]> git.baikalelectronics.ru Git - kernel.git/commit
net_sched: fix error path in red_init()
authorCong Wang <xiyou.wangcong@gmail.com>
Thu, 27 Aug 2020 17:40:41 +0000 (10:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Aug 2020 14:16:46 +0000 (07:16 -0700)
commitcb2db3139f9b65d1c465ef57d68ec0e3272b99a4
treee7bb813ce5fe1d1d6a495591405d775d41e768d0
parent839e6314714658c1bfaedae7112688a3154dcbb3
net_sched: fix error path in red_init()

When ->init() fails, ->destroy() is called to clean up.
So it is unnecessary to clean up in red_init(), and it
would cause some refcount underflow.

Fixes: af061e4a7c09 ("net: sched: sch_red: Add qevents "early_drop" and "mark"")
Reported-and-tested-by: syzbot+b33c1cb0a30ebdc8a5f9@syzkaller.appspotmail.com
Reported-and-tested-by: syzbot+e5ea5f8a3ecfd4427a1c@syzkaller.appspotmail.com
Cc: Petr Machata <petrm@mellanox.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_red.c