Subject: Re: [Patch net-next 4/5] net_sched: forbid setting default qdisc to inappropriate ones

From: Stephen Hemminger <[email-masked]>
Date: Wed, 26 Aug 2015 17:08:02 -0700

On Wed, 26 Aug 2015 15:41:26 -0700
Cong Wang <[email-masked]> wrote:

> Currently there is no check for if a qdisc is appropriate
> to be used as the default qdisc. This causes we get no
> error even we set the default qdisc to an inappropriate one
> but an error will be shown up later. This is not good.
> 
> Also, for qdisc's like HTB, kernel will just crash when
> we use it as default qdisc, because some data structures are
> not even initialized yet before checking opt == NULL, the cleanup
> doing ->reset() or ->destroy() on them will just crash.

Why not fix the buggy one's instead?