Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bnxt_en: Remove locking around txr->dev_state

txr->dev_state was not consistently manipulated with the acquisition of
the per-queue lock, after further inspection the lock does not seem
necessary, either the value is read as BNXT_DEV_STATE_CLOSING or 0.

Reported-by: coverity (CID 1339583)
Fixes: c0c050c58d840 ("bnxt_en: New Broadcom ethernet driver.")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Florian Fainelli and committed by
David S. Miller
cbce91ca 7e0433b3

-2
-2
drivers/net/ethernet/broadcom/bnxt/bnxt.c
··· 4930 4930 for (i = 0; i < bp->tx_nr_rings; i++) { 4931 4931 txr = &bp->tx_ring[i]; 4932 4932 txq = netdev_get_tx_queue(bp->dev, i); 4933 - __netif_tx_lock(txq, smp_processor_id()); 4934 4933 txr->dev_state = BNXT_DEV_STATE_CLOSING; 4935 - __netif_tx_unlock(txq); 4936 4934 } 4937 4935 } 4938 4936 /* Stop all TX queues */