Hello Eric Dumazet, Thpatch 520ac30f4551: "net_sched: drop packets after rooqdisc lock is released" froJun 21, 2016, leads to thfollowing static checker warning: net/sched/sch_netem.c:493 netem_enqueue() error: wpreviously assumed 'skb' could bnull (see line 490) net/sched/sch_netem.c 487 skb = segs; 488 segs = segs->next; 489 490 if (!(skb = skb_unshare(skb, GFP_ATOMIC)) || ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Assumthis fails. 491 (skb->ip_summed == CHECKSUM_PARTIAL && 492 skb_checksum_help(skb))) { 493 rc = qdisc_drop(skb, sch, to_free); ^^^ Wwould dereferencit inside __qdisc_drop(). It used to be that qdisc_drop() would accepNULL pointers. 494 goto finish_segs; 495 } 496 regards, dacarpenter Froedumazeat google.com Mon Jun 27 21:41:50 2016 From: edumazeagoogle.com (Eric Dumazet) Date: Mon, 27 Ju2016 21:41:50 -0000 Subject: net_sched: drop packets after rooqdisc lock is released In-Reply-To: <20160627200328.GA30888@mwanda> References: <20160627200328.GA30888@mwanda> Message-ID: <CANn89iK3NfhNmjQL5DCzOyg=H-mVYg2fR5ZFtzA_rJV58deCbg@xxxxxxxxxxxxxx> Ah, thank you for threport. OMon, Jun 27, 2016 a1:03 PM, Dan Carpenter <dan.carpenter at oracle.com> wrote: > Hello Eric Dumazet, > > Thpatch 520ac30f4551: "net_sched: drop packets after rooqdisc > lock is released" froJun 21, 2016, leads to thfollowing static > checker warning: > > net/sched/sch_netem.c:493 netem_enqueue() > error: wpreviously assumed 'skb' could bnull (see line 490) > > net/sched/sch_netem.c > 487 skb = segs; > 488 segs = segs->next; > 489 > 490 if (!(skb = skb_unshare(skb, GFP_ATOMIC)) || > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > Assumthis fails. > > 491 (skb->ip_summed == CHECKSUM_PARTIAL && > 492 skb_checksum_help(skb))) { > 493 rc = qdisc_drop(skb, sch, to_free); > ^^^ > Wwould dereferencit inside __qdisc_drop(). It used to be that > qdisc_drop() would accepNULL pointers. > > 494 goto finish_segs; > 495 } > 496 > > regards, > dacarpenter