diff mbox series

crypto: testmgr - Initialise full_sgl properly

Message ID Z-ULBwaDsgWpYzmU@gondor.apana.org.au
State New
Headers show
Series crypto: testmgr - Initialise full_sgl properly | expand

Commit Message

Herbert Xu March 27, 2025, 8:23 a.m. UTC
On Thu, Mar 27, 2025 at 01:45:55PM +0530, Manorit Chawdhry wrote:
>
> [   33.040345] sa_run: 1182: req->size: 40187, src: 00000000f1859ae0
> [   33.046426] sa_run: 1183: sgl: 00000000f1859ae0, orig_nents: -22

Thanks for the info! The filler SG initialisation was broken:

---8<---
Initialise the whole full_sgl array rather than the first entry.

Fixes: 8b54e6a8f415 ("crypto: testmgr - Add multibuffer hash testing")
Reported-by: Manorit Chawdhry <m-chawdhry@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
diff mbox series

Patch

diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 74b3cadc0d40..455ce6e434fd 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -689,7 +689,7 @@  static int build_test_sglist(struct test_sglist *tsgl,
 
 	sg_init_table(tsgl->full_sgl, XBUFSIZE);
 	for (i = 0; i < XBUFSIZE; i++)
-		sg_set_buf(tsgl->full_sgl, tsgl->bufs[i], PAGE_SIZE * 2);
+		sg_set_buf(&tsgl->full_sgl[i], tsgl->bufs[i], PAGE_SIZE * 2);
 
 	return 0;
 }