Re: [Patch net] net_sched: fix error path in red_init()

2020-08-28 Thread David Miller
From: Cong Wang Date: Thu, 27 Aug 2020 10:40:41 -0700 > 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: aee9caa03fc3 ("net: sched: sch_red: Add qevents "early_drop" and > "mark"")

Re: [Patch net] net_sched: fix error path in red_init()

2020-08-28 Thread Petr Machata
Cong Wang writes: > 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. Hmm, yeah, qdisc_put() would get called twice. A surprising API, the init needs to make sure to always bring the qdisc int

[Patch net] net_sched: fix error path in red_init()

2020-08-27 Thread Cong Wang
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: aee9caa03fc3 ("net: sched: sch_red: Add qevents "early_drop" and "mark"") Reported-and-tested-by: syzbot+b33c1cb0a30ebdc8a...@syzkaller.appspot