DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] crypto/cnxk: fix RISC-V compilation
@ 2023-10-11  7:18 Tejasree Kondoj
  2023-10-11  8:03 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Tejasree Kondoj @ 2023-10-11  7:18 UTC (permalink / raw)
  To: Akhil Goyal
  Cc: Anoob Joseph, Thomas Monjalon, Aakash Sasidharan,
	Gowrishankar Muthukrishnan, Vidya Sagar Velumuri, dev

Fixing RISC-V compilation failure by adding check
for NULL pointer.

Fixes: 905537accdd1 ("crypto/cnxk: support raw APIs")

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
---
 drivers/crypto/cnxk/cnxk_se.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h
index 5d138163f0..c2a807fa94 100644
--- a/drivers/crypto/cnxk/cnxk_se.h
+++ b/drivers/crypto/cnxk/cnxk_se.h
@@ -1834,6 +1834,10 @@ cpt_kasumi_enc_prep(uint32_t req_flags, uint64_t d_offs, uint64_t d_lens,
 	cpt_inst_w4.s.param2 = auth_data_len;
 
 	inst->w4.u64 = cpt_inst_w4.u64;
+
+	if (unlikely(iv_s == NULL))
+		return -1;
+
 	if (is_sg_ver2)
 		sg2_inst_prep(params, inst, offset_ctrl, iv_s, iv_len, 0, 0, inputlen, outputlen, 0,
 			      req_flags, 0, 0);
@@ -1890,6 +1894,10 @@ cpt_kasumi_dec_prep(uint64_t d_offs, uint64_t d_lens, struct roc_se_fc_params *p
 	}
 
 	inst->w4.u64 = cpt_inst_w4.u64;
+
+	if (unlikely(params->iv_buf == NULL))
+		return -1;
+
 	if (is_sg_ver2)
 		sg2_inst_prep(params, inst, offset_ctrl, params->iv_buf, iv_len, 0, 0, inputlen,
 			      outputlen, 0, 0, 0, 1);
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] crypto/cnxk: fix RISC-V compilation
  2023-10-11  7:18 [PATCH] crypto/cnxk: fix RISC-V compilation Tejasree Kondoj
@ 2023-10-11  8:03 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2023-10-11  8:03 UTC (permalink / raw)
  To: Akhil Goyal, Tejasree Kondoj
  Cc: Anoob Joseph, Aakash Sasidharan, Gowrishankar Muthukrishnan,
	Vidya Sagar Velumuri, dev

11/10/2023 09:18, Tejasree Kondoj:
> Fixing RISC-V compilation failure by adding check
> for NULL pointer.
> 
> Fixes: 905537accdd1 ("crypto/cnxk: support raw APIs")
> 
> Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>

Squashed in "crypto/cnxk: support raw APIs", thank you.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-11  8:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-11  7:18 [PATCH] crypto/cnxk: fix RISC-V compilation Tejasree Kondoj
2023-10-11  8:03 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).