crypto: chelsio - Fix NULL pointer dereference

Do not request FW to generate cidx update if there is less
space in tx queue to post new request.
SGE DBP 1 pidx increment too large
BUG: unable to handle kernel NULL pointer dereference at
0000000000000124
SGE error for queue 101

Signed-off-by: Atul Gupta <atul.gupta@chelsio.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Atul Gupta 2019-05-02 03:46:55 -07:00 committed by Herbert Xu
parent e59f755ceb
commit b4f9166430
1 changed files with 2 additions and 1 deletions

View File

@ -575,6 +575,7 @@ inline void *chcr_crypto_wreq(struct sk_buff *skb,
if (unlikely(credits < ETHTXQ_STOP_THRES)) { if (unlikely(credits < ETHTXQ_STOP_THRES)) {
netif_tx_stop_queue(q->txq); netif_tx_stop_queue(q->txq);
q->q.stops++; q->q.stops++;
if (!q->dbqt)
wr_mid |= FW_WR_EQUEQ_F | FW_WR_EQUIQ_F; wr_mid |= FW_WR_EQUEQ_F | FW_WR_EQUIQ_F;
} }
wr_mid |= FW_ULPTX_WR_DATA_F; wr_mid |= FW_ULPTX_WR_DATA_F;