Skip to content

Commit

Permalink
ionic: no rx flush in deinit
Browse files Browse the repository at this point in the history
[ Upstream commit 43ecf7b ]

Kmemleak pointed out to us that ionic_rx_flush() is sending
skbs into napi_gro_XXX with a disabled napi context, and these
end up getting lost and leaked.  We can safely remove the flush.

Fixes: 0f3154e ("ionic: Add Tx and Rx handling")
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Sasha Levin authored and gregkh committed Nov 5, 2020
1 parent e7d0b16 commit f17225e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion drivers/net/ethernet/pensando/ionic/ionic_lif.c
Expand Up @@ -1512,7 +1512,6 @@ static void ionic_txrx_deinit(struct ionic_lif *lif)
if (lif->rxqcqs) {
for (i = 0; i < lif->nxqs; i++) {
ionic_lif_qcq_deinit(lif, lif->rxqcqs[i].qcq);
ionic_rx_flush(&lif->rxqcqs[i].qcq->cq);
ionic_rx_empty(&lif->rxqcqs[i].qcq->q);
}
}
Expand Down
13 changes: 0 additions & 13 deletions drivers/net/ethernet/pensando/ionic/ionic_txrx.c
Expand Up @@ -253,19 +253,6 @@ static bool ionic_rx_service(struct ionic_cq *cq, struct ionic_cq_info *cq_info)
return true;
}

void ionic_rx_flush(struct ionic_cq *cq)
{
struct ionic_dev *idev = &cq->lif->ionic->idev;
u32 work_done;

work_done = ionic_cq_service(cq, cq->num_descs,
ionic_rx_service, NULL, NULL);

if (work_done)
ionic_intr_credits(idev->intr_ctrl, cq->bound_intr->index,
work_done, IONIC_INTR_CRED_RESET_COALESCE);
}

static struct page *ionic_rx_page_alloc(struct ionic_queue *q,
dma_addr_t *dma_addr)
{
Expand Down
1 change: 0 additions & 1 deletion drivers/net/ethernet/pensando/ionic/ionic_txrx.h
Expand Up @@ -4,7 +4,6 @@
#ifndef _IONIC_TXRX_H_
#define _IONIC_TXRX_H_

void ionic_rx_flush(struct ionic_cq *cq);
void ionic_tx_flush(struct ionic_cq *cq);

void ionic_rx_fill(struct ionic_queue *q);
Expand Down

0 comments on commit f17225e

Please sign in to comment.