]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
cxgb4: do not call napi_hash_del()
authorEric Dumazet <edumazet@google.com>
Wed, 16 Nov 2016 14:19:02 +0000 (06:19 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Nov 2016 22:06:51 +0000 (17:06 -0500)
Calling napi_hash_del() before netif_napi_del() is dangerous
if a synchronize_rcu() is not enforced before NAPI struct freeing.

Lets leave this detail to core networking stack and feel
more comfortable.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Hariprasad S <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/sge.c

index 1e74fd6085df43b954f2343cd47ba1f8b592deaf..e19a0ca8e5ddb315ec5900c327bce9cab69ee96c 100644 (file)
@@ -2951,7 +2951,6 @@ void free_rspq_fl(struct adapter *adap, struct sge_rspq *rq,
                   rq->cntxt_id, fl_id, 0xffff);
        dma_free_coherent(adap->pdev_dev, (rq->size + 1) * rq->iqe_len,
                          rq->desc, rq->phys_addr);
-       napi_hash_del(&rq->napi);
        netif_napi_del(&rq->napi);
        rq->netdev = NULL;
        rq->cntxt_id = rq->abs_id = 0;