diff mbox series

[1/4] crypto:chelsio Fix NULL pointer dereference

Message ID 20190502104655.21690-1-atul.gupta@chelsio.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series [1/4] crypto:chelsio Fix NULL pointer dereference | expand

Commit Message

Atul Gupta May 2, 2019, 10:46 a.m. UTC
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>
---
 drivers/crypto/chelsio/chcr_ipsec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Herbert Xu May 9, 2019, 5:24 a.m. UTC | #1
On Thu, May 02, 2019 at 03:46:55AM -0700, Atul Gupta wrote:
> 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>
> ---
>  drivers/crypto/chelsio/chcr_ipsec.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

All applied.  Thanks.
diff mbox series

Patch

diff --git a/drivers/crypto/chelsio/chcr_ipsec.c b/drivers/crypto/chelsio/chcr_ipsec.c
index 2f60049..f429aae 100644
--- a/drivers/crypto/chelsio/chcr_ipsec.c
+++ b/drivers/crypto/chelsio/chcr_ipsec.c
@@ -575,7 +575,8 @@  inline void *chcr_crypto_wreq(struct sk_buff *skb,
 	if (unlikely(credits < ETHTXQ_STOP_THRES)) {
 		netif_tx_stop_queue(q->txq);
 		q->q.stops++;
-		wr_mid |= FW_WR_EQUEQ_F | FW_WR_EQUIQ_F;
+		if (!q->dbqt)
+			wr_mid |= FW_WR_EQUEQ_F | FW_WR_EQUIQ_F;
 	}
 	wr_mid |= FW_ULPTX_WR_DATA_F;
 	wr->wreq.flowid_len16 = htonl(wr_mid);