* [PATCH v1 07/19] crypto: gemin: Fix error check for dma_map_sg
[not found] <20220819060801.10443-1-jinpu.wang@ionos.com>
@ 2022-08-19 6:07 ` Jack Wang
2022-08-26 8:13 ` Linus Walleij
` (2 more replies)
2022-08-19 6:07 ` [PATCH v1 08/19] crypto: sahara: " Jack Wang
` (4 subsequent siblings)
5 siblings, 3 replies; 12+ messages in thread
From: Jack Wang @ 2022-08-19 6:07 UTC (permalink / raw)
To: linux-kernel
Cc: Corentin Labbe, Hans Ulli Kroll, Linus Walleij, Herbert Xu,
David S. Miller, linux-crypto, linux-arm-kernel
dma_map_sg return 0 on error.
Cc: Corentin Labbe <clabbe@baylibre.com>
Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
---
drivers/crypto/gemini/sl3516-ce-cipher.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/gemini/sl3516-ce-cipher.c b/drivers/crypto/gemini/sl3516-ce-cipher.c
index 14d0d83d388d..34fea8aa91b6 100644
--- a/drivers/crypto/gemini/sl3516-ce-cipher.c
+++ b/drivers/crypto/gemini/sl3516-ce-cipher.c
@@ -149,7 +149,7 @@ static int sl3516_ce_cipher(struct skcipher_request *areq)
if (areq->src == areq->dst) {
nr_sgs = dma_map_sg(ce->dev, areq->src, sg_nents(areq->src),
DMA_BIDIRECTIONAL);
- if (nr_sgs <= 0 || nr_sgs > MAXDESC / 2) {
+ if (!nr_sgs || nr_sgs > MAXDESC / 2) {
dev_err(ce->dev, "Invalid sg number %d\n", nr_sgs);
err = -EINVAL;
goto theend;
@@ -158,14 +158,14 @@ static int sl3516_ce_cipher(struct skcipher_request *areq)
} else {
nr_sgs = dma_map_sg(ce->dev, areq->src, sg_nents(areq->src),
DMA_TO_DEVICE);
- if (nr_sgs <= 0 || nr_sgs > MAXDESC / 2) {
+ if (!nr_sgs || nr_sgs > MAXDESC / 2) {
dev_err(ce->dev, "Invalid sg number %d\n", nr_sgs);
err = -EINVAL;
goto theend;
}
nr_sgd = dma_map_sg(ce->dev, areq->dst, sg_nents(areq->dst),
DMA_FROM_DEVICE);
- if (nr_sgd <= 0 || nr_sgd > MAXDESC) {
+ if (!nr_sgd || nr_sgd > MAXDESC) {
dev_err(ce->dev, "Invalid sg number %d\n", nr_sgd);
err = -EINVAL;
goto theend_sgs;
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v1 08/19] crypto: sahara: Fix error check for dma_map_sg
[not found] <20220819060801.10443-1-jinpu.wang@ionos.com>
2022-08-19 6:07 ` [PATCH v1 07/19] crypto: gemin: Fix error check for dma_map_sg Jack Wang
@ 2022-08-19 6:07 ` Jack Wang
2022-08-19 6:07 ` [PATCH v1 09/19] crypto: qce: Fix dma_map_sg error check Jack Wang
` (3 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Jack Wang @ 2022-08-19 6:07 UTC (permalink / raw)
To: linux-kernel; +Cc: Herbert Xu, David S. Miller, linux-crypto
dma_map_sg return 0 on error, it returns the number of
DMA address segments mapped (this may be shorter
than <nents> passed in if some elements of the scatter/gather
list are physically or virtually adjacent and an IOMMU maps
them with a single entry).
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
---
drivers/crypto/sahara.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c
index 457084b344c1..bb71aac30e2c 100644
--- a/drivers/crypto/sahara.c
+++ b/drivers/crypto/sahara.c
@@ -487,13 +487,13 @@ static int sahara_hw_descriptor_create(struct sahara_dev *dev)
ret = dma_map_sg(dev->device, dev->in_sg, dev->nb_in_sg,
DMA_TO_DEVICE);
- if (ret != dev->nb_in_sg) {
+ if (!ret) {
dev_err(dev->device, "couldn't map in sg\n");
goto unmap_in;
}
ret = dma_map_sg(dev->device, dev->out_sg, dev->nb_out_sg,
DMA_FROM_DEVICE);
- if (ret != dev->nb_out_sg) {
+ if (!ret) {
dev_err(dev->device, "couldn't map out sg\n");
goto unmap_out;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v1 09/19] crypto: qce: Fix dma_map_sg error check
[not found] <20220819060801.10443-1-jinpu.wang@ionos.com>
2022-08-19 6:07 ` [PATCH v1 07/19] crypto: gemin: Fix error check for dma_map_sg Jack Wang
2022-08-19 6:07 ` [PATCH v1 08/19] crypto: sahara: " Jack Wang
@ 2022-08-19 6:07 ` Jack Wang
2022-08-19 6:07 ` [PATCH v1 10/19] crypto: amlogic: " Jack Wang
` (2 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Jack Wang @ 2022-08-19 6:07 UTC (permalink / raw)
To: linux-kernel
Cc: Thara Gopinath, Herbert Xu, David S. Miller, linux-crypto,
linux-arm-msm
dma_map_sg return 0 on error, fix the error check and return -EIO to
caller.
Cc: Thara Gopinath <thara.gopinath@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
---
drivers/crypto/qce/aead.c | 4 ++--
drivers/crypto/qce/sha.c | 8 +++++---
drivers/crypto/qce/skcipher.c | 8 ++++----
3 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/drivers/crypto/qce/aead.c b/drivers/crypto/qce/aead.c
index 97a530171f07..6eb4d2e35629 100644
--- a/drivers/crypto/qce/aead.c
+++ b/drivers/crypto/qce/aead.c
@@ -450,8 +450,8 @@ qce_aead_async_req_handle(struct crypto_async_request *async_req)
if (ret)
return ret;
dst_nents = dma_map_sg(qce->dev, rctx->dst_sg, rctx->dst_nents, dir_dst);
- if (dst_nents < 0) {
- ret = dst_nents;
+ if (!dst_nents) {
+ ret = -EIO;
goto error_free;
}
diff --git a/drivers/crypto/qce/sha.c b/drivers/crypto/qce/sha.c
index 59159f5e64e5..37bafd7aeb79 100644
--- a/drivers/crypto/qce/sha.c
+++ b/drivers/crypto/qce/sha.c
@@ -97,14 +97,16 @@ static int qce_ahash_async_req_handle(struct crypto_async_request *async_req)
}
ret = dma_map_sg(qce->dev, req->src, rctx->src_nents, DMA_TO_DEVICE);
- if (ret < 0)
- return ret;
+ if (!ret)
+ return -EIO;
sg_init_one(&rctx->result_sg, qce->dma.result_buf, QCE_RESULT_BUF_SZ);
ret = dma_map_sg(qce->dev, &rctx->result_sg, 1, DMA_FROM_DEVICE);
- if (ret < 0)
+ if (!ret) {
+ ret = -EIO;
goto error_unmap_src;
+ }
ret = qce_dma_prep_sgs(&qce->dma, req->src, rctx->src_nents,
&rctx->result_sg, 1, qce_ahash_done, async_req);
diff --git a/drivers/crypto/qce/skcipher.c b/drivers/crypto/qce/skcipher.c
index 3d27cd5210ef..5b493fdc1e74 100644
--- a/drivers/crypto/qce/skcipher.c
+++ b/drivers/crypto/qce/skcipher.c
@@ -124,15 +124,15 @@ qce_skcipher_async_req_handle(struct crypto_async_request *async_req)
rctx->dst_sg = rctx->dst_tbl.sgl;
dst_nents = dma_map_sg(qce->dev, rctx->dst_sg, rctx->dst_nents, dir_dst);
- if (dst_nents < 0) {
- ret = dst_nents;
+ if (!dst_nents) {
+ ret = -EIO;
goto error_free;
}
if (diff_dst) {
src_nents = dma_map_sg(qce->dev, req->src, rctx->src_nents, dir_src);
- if (src_nents < 0) {
- ret = src_nents;
+ if (!src_nents) {
+ ret = -EIO;
goto error_unmap_dst;
}
rctx->src_sg = req->src;
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v1 10/19] crypto: amlogic: Fix dma_map_sg error check
[not found] <20220819060801.10443-1-jinpu.wang@ionos.com>
` (2 preceding siblings ...)
2022-08-19 6:07 ` [PATCH v1 09/19] crypto: qce: Fix dma_map_sg error check Jack Wang
@ 2022-08-19 6:07 ` Jack Wang
2022-08-26 12:46 ` LABBE Corentin
2022-08-19 6:07 ` [PATCH v1 11/19] crypto: allwinner: " Jack Wang
2022-08-19 6:07 ` [PATCH v1 12/19] crypto: ccree: " Jack Wang
5 siblings, 1 reply; 12+ messages in thread
From: Jack Wang @ 2022-08-19 6:07 UTC (permalink / raw)
To: linux-kernel
Cc: Corentin Labbe, Herbert Xu, David S. Miller, linux-crypto,
linux-amlogic
dma_map_sg return 0 on error.
Cc: Corentin Labbe <clabbe@baylibre.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org
Cc: linux-amlogic@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
---
drivers/crypto/amlogic/amlogic-gxl-cipher.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/amlogic/amlogic-gxl-cipher.c b/drivers/crypto/amlogic/amlogic-gxl-cipher.c
index e79514fce731..af017a087ebf 100644
--- a/drivers/crypto/amlogic/amlogic-gxl-cipher.c
+++ b/drivers/crypto/amlogic/amlogic-gxl-cipher.c
@@ -177,7 +177,7 @@ static int meson_cipher(struct skcipher_request *areq)
if (areq->src == areq->dst) {
nr_sgs = dma_map_sg(mc->dev, areq->src, sg_nents(areq->src),
DMA_BIDIRECTIONAL);
- if (nr_sgs < 0) {
+ if (!nr_sgs) {
dev_err(mc->dev, "Invalid SG count %d\n", nr_sgs);
err = -EINVAL;
goto theend;
@@ -186,14 +186,14 @@ static int meson_cipher(struct skcipher_request *areq)
} else {
nr_sgs = dma_map_sg(mc->dev, areq->src, sg_nents(areq->src),
DMA_TO_DEVICE);
- if (nr_sgs < 0 || nr_sgs > MAXDESC - 3) {
+ if (!nr_sgs || nr_sgs > MAXDESC - 3) {
dev_err(mc->dev, "Invalid SG count %d\n", nr_sgs);
err = -EINVAL;
goto theend;
}
nr_sgd = dma_map_sg(mc->dev, areq->dst, sg_nents(areq->dst),
DMA_FROM_DEVICE);
- if (nr_sgd < 0 || nr_sgd > MAXDESC - 3) {
+ if (!nr_sgd || nr_sgd > MAXDESC - 3) {
dev_err(mc->dev, "Invalid SG count %d\n", nr_sgd);
err = -EINVAL;
goto theend;
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v1 11/19] crypto: allwinner: Fix dma_map_sg error check
[not found] <20220819060801.10443-1-jinpu.wang@ionos.com>
` (3 preceding siblings ...)
2022-08-19 6:07 ` [PATCH v1 10/19] crypto: amlogic: " Jack Wang
@ 2022-08-19 6:07 ` Jack Wang
2022-08-19 6:07 ` [PATCH v1 12/19] crypto: ccree: " Jack Wang
5 siblings, 0 replies; 12+ messages in thread
From: Jack Wang @ 2022-08-19 6:07 UTC (permalink / raw)
To: linux-kernel
Cc: Corentin Labbe, Herbert Xu, David S. Miller, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Dan Carpenter, Minghao Chi,
Peng Wu, Alexey Khoroshilov, linux-crypto, linux-arm-kernel,
linux-sunxi
dma_map_sg return 0 on error.
Cc: Corentin Labbe <clabbe.montjoie@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: Samuel Holland <samuel@sholland.org>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Minghao Chi <chi.minghao@zte.com.cn>
Cc: Peng Wu <wupeng58@huawei.com>
Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: linux-crypto@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-sunxi@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
---
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 6 +++---
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c | 2 +-
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c | 4 ++--
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
index 74b4e910a38d..be7f46faef7e 100644
--- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
+++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c
@@ -208,7 +208,7 @@ static int sun8i_ce_cipher_prepare(struct crypto_engine *engine, void *async_req
if (areq->src == areq->dst) {
nr_sgs = dma_map_sg(ce->dev, areq->src, ns, DMA_BIDIRECTIONAL);
- if (nr_sgs <= 0 || nr_sgs > MAX_SG) {
+ if (!nr_sgs || nr_sgs > MAX_SG) {
dev_err(ce->dev, "Invalid sg number %d\n", nr_sgs);
err = -EINVAL;
goto theend_iv;
@@ -216,13 +216,13 @@ static int sun8i_ce_cipher_prepare(struct crypto_engine *engine, void *async_req
nr_sgd = nr_sgs;
} else {
nr_sgs = dma_map_sg(ce->dev, areq->src, ns, DMA_TO_DEVICE);
- if (nr_sgs <= 0 || nr_sgs > MAX_SG) {
+ if (!nr_sgs || nr_sgs > MAX_SG) {
dev_err(ce->dev, "Invalid sg number %d\n", nr_sgs);
err = -EINVAL;
goto theend_iv;
}
nr_sgd = dma_map_sg(ce->dev, areq->dst, nd, DMA_FROM_DEVICE);
- if (nr_sgd <= 0 || nr_sgd > MAX_SG) {
+ if (!nr_sgd || nr_sgd > MAX_SG) {
dev_err(ce->dev, "Invalid sg number %d\n", nr_sgd);
err = -EINVAL;
goto theend_sgs;
diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c
index 8b5b9b9d04c3..0e6843ec197f 100644
--- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c
+++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c
@@ -389,7 +389,7 @@ int sun8i_ce_hash_run(struct crypto_engine *engine, void *breq)
cet->t_asym_ctl = 0;
nr_sgs = dma_map_sg(ce->dev, areq->src, ns, DMA_TO_DEVICE);
- if (nr_sgs <= 0 || nr_sgs > MAX_SG) {
+ if (!nr_sgs || nr_sgs > MAX_SG) {
dev_err(ce->dev, "Invalid sg number %d\n", nr_sgs);
err = -EINVAL;
goto theend;
diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c
index 910d6751644c..fdcc98cdecaa 100644
--- a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c
+++ b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c
@@ -232,13 +232,13 @@ static int sun8i_ss_cipher(struct skcipher_request *areq)
nr_sgd = nr_sgs;
} else {
nr_sgs = dma_map_sg(ss->dev, areq->src, nsgs, DMA_TO_DEVICE);
- if (nr_sgs <= 0 || nr_sgs > 8) {
+ if (!nr_sgs || nr_sgs > 8) {
dev_err(ss->dev, "Invalid sg number %d\n", nr_sgs);
err = -EINVAL;
goto theend_iv;
}
nr_sgd = dma_map_sg(ss->dev, areq->dst, nsgd, DMA_FROM_DEVICE);
- if (nr_sgd <= 0 || nr_sgd > 8) {
+ if (!nr_sgd || nr_sgd > 8) {
dev_err(ss->dev, "Invalid sg number %d\n", nr_sgd);
err = -EINVAL;
goto theend_sgs;
diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
index 36a82b22953c..fcb8c41cc957 100644
--- a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
+++ b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
@@ -527,7 +527,7 @@ int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq)
rctx->method = ss->variant->alg_hash[algt->ss_algo_id];
nr_sgs = dma_map_sg(ss->dev, areq->src, sg_nents(areq->src), DMA_TO_DEVICE);
- if (nr_sgs <= 0 || nr_sgs > MAX_SG) {
+ if (!nr_sgs || nr_sgs > MAX_SG) {
dev_err(ss->dev, "Invalid sg number %d\n", nr_sgs);
err = -EINVAL;
goto theend;
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v1 12/19] crypto: ccree: Fix dma_map_sg error check
[not found] <20220819060801.10443-1-jinpu.wang@ionos.com>
` (4 preceding siblings ...)
2022-08-19 6:07 ` [PATCH v1 11/19] crypto: allwinner: " Jack Wang
@ 2022-08-19 6:07 ` Jack Wang
2022-08-21 9:44 ` Gilad Ben-Yossef
5 siblings, 1 reply; 12+ messages in thread
From: Jack Wang @ 2022-08-19 6:07 UTC (permalink / raw)
To: linux-kernel; +Cc: Gilad Ben-Yossef, Herbert Xu, David S. Miller, linux-crypto
dma_map_sg return 0 on error, and dma_map_error is not supposed to use
here.
Cc: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
---
drivers/crypto/ccree/cc_buffer_mgr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/ccree/cc_buffer_mgr.c b/drivers/crypto/ccree/cc_buffer_mgr.c
index 6140e4927322..9efd88f871d1 100644
--- a/drivers/crypto/ccree/cc_buffer_mgr.c
+++ b/drivers/crypto/ccree/cc_buffer_mgr.c
@@ -274,7 +274,7 @@ static int cc_map_sg(struct device *dev, struct scatterlist *sg,
}
ret = dma_map_sg(dev, sg, *nents, direction);
- if (dma_mapping_error(dev, ret)) {
+ if (!ret) {
*nents = 0;
dev_err(dev, "dma_map_sg() sg buffer failed %d\n", ret);
return -ENOMEM;
--
2.34.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v1 12/19] crypto: ccree: Fix dma_map_sg error check
2022-08-19 6:07 ` [PATCH v1 12/19] crypto: ccree: " Jack Wang
@ 2022-08-21 9:44 ` Gilad Ben-Yossef
0 siblings, 0 replies; 12+ messages in thread
From: Gilad Ben-Yossef @ 2022-08-21 9:44 UTC (permalink / raw)
To: Jack Wang
Cc: Linux kernel mailing list, Herbert Xu, David S. Miller,
Linux Crypto Mailing List
Hi Jack,
On Fri, Aug 19, 2022 at 9:08 AM Jack Wang <jinpu.wang@ionos.com> wrote:
>
> dma_map_sg return 0 on error, and dma_map_error is not supposed to use
> here.
>
> Cc: Gilad Ben-Yossef <gilad@benyossef.com>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: linux-crypto@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
>
> Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
> ---
> drivers/crypto/ccree/cc_buffer_mgr.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/ccree/cc_buffer_mgr.c b/drivers/crypto/ccree/cc_buffer_mgr.c
> index 6140e4927322..9efd88f871d1 100644
> --- a/drivers/crypto/ccree/cc_buffer_mgr.c
> +++ b/drivers/crypto/ccree/cc_buffer_mgr.c
> @@ -274,7 +274,7 @@ static int cc_map_sg(struct device *dev, struct scatterlist *sg,
> }
>
> ret = dma_map_sg(dev, sg, *nents, direction);
> - if (dma_mapping_error(dev, ret)) {
> + if (!ret) {
> *nents = 0;
> dev_err(dev, "dma_map_sg() sg buffer failed %d\n", ret);
> return -ENOMEM;
> --
> 2.34.1
>
Good catch!
Thank you for the patch.
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Gilad
--
Gilad Ben-Yossef
Chief Coffee Drinker
values of β will give rise to dom!
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v1 07/19] crypto: gemin: Fix error check for dma_map_sg
2022-08-19 6:07 ` [PATCH v1 07/19] crypto: gemin: Fix error check for dma_map_sg Jack Wang
@ 2022-08-26 8:13 ` Linus Walleij
2022-08-26 11:06 ` Herbert Xu
2022-08-26 12:04 ` LABBE Corentin
2 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2022-08-26 8:13 UTC (permalink / raw)
To: Jack Wang
Cc: linux-kernel, Corentin Labbe, Hans Ulli Kroll, Herbert Xu,
David S. Miller, linux-crypto, linux-arm-kernel
On Fri, Aug 19, 2022 at 8:08 AM Jack Wang <jinpu.wang@ionos.com> wrote:
> dma_map_sg return 0 on error.
>
> Cc: Corentin Labbe <clabbe@baylibre.com>
> Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: linux-crypto@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
Good catch!
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v1 07/19] crypto: gemin: Fix error check for dma_map_sg
2022-08-19 6:07 ` [PATCH v1 07/19] crypto: gemin: Fix error check for dma_map_sg Jack Wang
2022-08-26 8:13 ` Linus Walleij
@ 2022-08-26 11:06 ` Herbert Xu
2022-08-26 12:04 ` LABBE Corentin
2 siblings, 0 replies; 12+ messages in thread
From: Herbert Xu @ 2022-08-26 11:06 UTC (permalink / raw)
To: Jack Wang
Cc: linux-kernel, Corentin Labbe, Hans Ulli Kroll, Linus Walleij,
David S. Miller, linux-crypto, linux-arm-kernel
On Fri, Aug 19, 2022 at 08:07:49AM +0200, Jack Wang wrote:
> dma_map_sg return 0 on error.
>
> Cc: Corentin Labbe <clabbe@baylibre.com>
> Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: linux-crypto@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
> ---
> drivers/crypto/gemini/sl3516-ce-cipher.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Patches 7-12 applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v1 07/19] crypto: gemin: Fix error check for dma_map_sg
2022-08-19 6:07 ` [PATCH v1 07/19] crypto: gemin: Fix error check for dma_map_sg Jack Wang
2022-08-26 8:13 ` Linus Walleij
2022-08-26 11:06 ` Herbert Xu
@ 2022-08-26 12:04 ` LABBE Corentin
2022-08-26 12:08 ` Jinpu Wang
2 siblings, 1 reply; 12+ messages in thread
From: LABBE Corentin @ 2022-08-26 12:04 UTC (permalink / raw)
To: Jack Wang
Cc: linux-kernel, Hans Ulli Kroll, Linus Walleij, Herbert Xu,
David S. Miller, linux-crypto, linux-arm-kernel
Le Fri, Aug 19, 2022 at 08:07:49AM +0200, Jack Wang a écrit :
> dma_map_sg return 0 on error.
>
> Cc: Corentin Labbe <clabbe@baylibre.com>
> Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: linux-crypto@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
> ---
> drivers/crypto/gemini/sl3516-ce-cipher.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
Hello
There is a typo in subject gemin -> gemini.
Acked-by: Corentin Labbe <clabbe@baylibre.com>
Tested-by: Corentin Labbe <clabbe@baylibre.com>
Thanks
Regards
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v1 07/19] crypto: gemin: Fix error check for dma_map_sg
2022-08-26 12:04 ` LABBE Corentin
@ 2022-08-26 12:08 ` Jinpu Wang
0 siblings, 0 replies; 12+ messages in thread
From: Jinpu Wang @ 2022-08-26 12:08 UTC (permalink / raw)
To: LABBE Corentin, Herbert Xu
Cc: linux-kernel, Hans Ulli Kroll, Linus Walleij, David S. Miller,
linux-crypto, linux-arm-kernel
On Fri, Aug 26, 2022 at 2:04 PM LABBE Corentin <clabbe@baylibre.com> wrote:
>
> Le Fri, Aug 19, 2022 at 08:07:49AM +0200, Jack Wang a écrit :
> > dma_map_sg return 0 on error.
> >
> > Cc: Corentin Labbe <clabbe@baylibre.com>
> > Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > Cc: Herbert Xu <herbert@gondor.apana.org.au>
> > Cc: "David S. Miller" <davem@davemloft.net>
> > Cc: linux-crypto@vger.kernel.org
> > Cc: linux-arm-kernel@lists.infradead.org
> > Cc: linux-kernel@vger.kernel.org
> > Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
> > ---
> > drivers/crypto/gemini/sl3516-ce-cipher.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
>
> Hello
>
> There is a typo in subject gemin -> gemini.
indeed, maybe Herbert can fix the subject in his tree.
>
> Acked-by: Corentin Labbe <clabbe@baylibre.com>
> Tested-by: Corentin Labbe <clabbe@baylibre.com>
>
> Thanks
> Regards
Thx!
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v1 10/19] crypto: amlogic: Fix dma_map_sg error check
2022-08-19 6:07 ` [PATCH v1 10/19] crypto: amlogic: " Jack Wang
@ 2022-08-26 12:46 ` LABBE Corentin
0 siblings, 0 replies; 12+ messages in thread
From: LABBE Corentin @ 2022-08-26 12:46 UTC (permalink / raw)
To: Jack Wang
Cc: linux-kernel, Herbert Xu, David S. Miller, linux-crypto,
linux-amlogic
Le Fri, Aug 19, 2022 at 08:07:52AM +0200, Jack Wang a écrit :
> dma_map_sg return 0 on error.
>
> Cc: Corentin Labbe <clabbe@baylibre.com>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: linux-crypto@vger.kernel.org
> Cc: linux-amlogic@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
>
> Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
> ---
> drivers/crypto/amlogic/amlogic-gxl-cipher.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
Hello
Tested-by: Corentin Labbe <clabbe@baylibre.com>
Acked-by: Corentin Labbe <clabbe@baylibre.com>
Thanks
Regards
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-08-26 12:46 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20220819060801.10443-1-jinpu.wang@ionos.com>
2022-08-19 6:07 ` [PATCH v1 07/19] crypto: gemin: Fix error check for dma_map_sg Jack Wang
2022-08-26 8:13 ` Linus Walleij
2022-08-26 11:06 ` Herbert Xu
2022-08-26 12:04 ` LABBE Corentin
2022-08-26 12:08 ` Jinpu Wang
2022-08-19 6:07 ` [PATCH v1 08/19] crypto: sahara: " Jack Wang
2022-08-19 6:07 ` [PATCH v1 09/19] crypto: qce: Fix dma_map_sg error check Jack Wang
2022-08-19 6:07 ` [PATCH v1 10/19] crypto: amlogic: " Jack Wang
2022-08-26 12:46 ` LABBE Corentin
2022-08-19 6:07 ` [PATCH v1 11/19] crypto: allwinner: " Jack Wang
2022-08-19 6:07 ` [PATCH v1 12/19] crypto: ccree: " Jack Wang
2022-08-21 9:44 ` Gilad Ben-Yossef
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox