• David S. Miller's avatar
    pkt_sched: Fix OOPS on ingress qdisc add. · 8d50b53d
    David S. Miller authored
    Bug report from Steven Jan Springl:
    
    	Issuing the following command causes a kernel oops:
    		tc qdisc add dev eth0 handle ffff: ingress
    
    The problem mostly stems from all of the special case handling of
    ingress qdiscs.
    
    So, to fix this, do the grafting operation the same way we do for TX
    qdiscs.  Which means that dev_activate() and dev_deactivate() now do
    the "qdisc_sleeping <--> qdisc" transitions on dev->rx_queue too.
    
    Future simplifications are possible now, mainly because it is
    impossible for dev_queue->{qdisc,qdisc_sleeping} to be NULL.  There
    are NULL checks all over to handle the ingress qdisc special case
    that used to exist before this commit.
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8d50b53d
dev.c 117 KB