We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a58893a commit b2cafefCopy full SHA for b2cafef
drivers/net/netdevsim/netdev.c
@@ -710,9 +710,13 @@ static struct nsim_rq *nsim_queue_alloc(void)
710
static void nsim_queue_free(struct net_device *dev, struct nsim_rq *rq)
711
{
712
hrtimer_cancel(&rq->napi_timer);
713
- local_bh_disable();
714
- dev_dstats_rx_dropped_add(dev, rq->skb_queue.qlen);
715
- local_bh_enable();
+
+ if (rq->skb_queue.qlen) {
+ local_bh_disable();
716
+ dev_dstats_rx_dropped_add(dev, rq->skb_queue.qlen);
717
+ local_bh_enable();
718
+ }
719
720
skb_queue_purge_reason(&rq->skb_queue, SKB_DROP_REASON_QUEUE_PURGE);
721
kfree(rq);
722
}
0 commit comments