linux/drivers/net/ethernet/marvell
Tom Rix f4544e5361 net: mvneta: fix double free of txq->buf
clang static analysis reports this problem:

drivers/net/ethernet/marvell/mvneta.c:3465:2: warning:
  Attempt to free released memory
        kfree(txq->buf);
        ^~~~~~~~~~~~~~~

When mvneta_txq_sw_init() fails to alloc txq->tso_hdrs,
it frees without poisoning txq->buf.  The error is caught
in the mvneta_setup_txqs() caller which handles the error
by cleaning up all of the txqs with a call to
mvneta_txq_sw_deinit which also frees txq->buf.

Since mvneta_txq_sw_deinit is a general cleaner, all of the
partial cleaning in mvneta_txq_sw_deinit()'s error handling
is not needed.

Fixes: 2adb719d74 ("net: mvneta: Implement software TSO")
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-10-04 15:07:19 -07:00
..
mvpp2 treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
octeontx2 octeontx2-pf: Fix synchnorization issue in mbox 2020-09-30 15:07:19 -07:00
Kconfig mvpp2: use page_pool allocator 2020-07-03 14:46:24 -07:00
Makefile
mv643xx_eth.c net: tso: cache transport header length 2020-06-18 20:46:23 -07:00
mvmdio.c net: mvmdio: avoid error message for optional IRQ 2020-03-17 20:54:37 -07:00
mvneta_bm.c
mvneta_bm.h net: mvneta: make stub functions static inline 2019-10-25 16:21:48 -07:00
mvneta.c net: mvneta: fix double free of txq->buf 2020-10-04 15:07:19 -07:00
pxa168_eth.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
skge.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
skge.h PCI: Add constant PCI_STATUS_ERROR_BITS 2020-03-04 14:21:00 -08:00
sky2.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
sky2.h PCI: Add constant PCI_STATUS_ERROR_BITS 2020-03-04 14:21:00 -08:00