mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 08:16:41 +07:00
be2net: Fix race in posting rx buffers.
There is a possibility of be_post_rx_frags() being called simultaneously from both be_worker() (when rx_post_starved) and be_poll_rx() (when rxq->used is 0). This can be avoided by posting rx buffers only when some completions have been reaped. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ec5efe7946
commit
857c99059e
@ -1862,7 +1862,7 @@ static int be_poll_rx(struct napi_struct *napi, int budget)
|
||||
}
|
||||
|
||||
/* Refill the queue */
|
||||
if (atomic_read(&rxo->q.used) < RX_FRAGS_REFILL_WM)
|
||||
if (work_done && atomic_read(&rxo->q.used) < RX_FRAGS_REFILL_WM)
|
||||
be_post_rx_frags(rxo, GFP_ATOMIC);
|
||||
|
||||
/* All consumed */
|
||||
|
Loading…
Reference in New Issue
Block a user