On Thu, Aug 25, 2022 at 09:24:15AM +0200, Jack Wang wrote: > Hi, all, > > While working on a bugfix on RTRS[1], I noticed there are quite a few other > drivers have the same problem, due to the fact dma_map_sg return 0 on error, > not like most of the cases, return negative value for error. > > I "grep -A 5 dma_map_sg' in kernel tree, and audit/fix the one I feel is buggy, > hence this patchset. As suggested by Christoph Hellwig, I now send the patches per > subsystem, this is for crypto subsystem. > > Thanks! > > [1] https://lore.kernel.org/linux-rdma/20220818105355.110344-1-haris.iqbal@xxxxxxxxx/T/#t > > > Jack Wang (6): > crypto: gemin: Fix error check for dma_map_sg > crypto: sahara: Fix error check for dma_map_sg > crypto: qce: Fix dma_map_sg error check > crypto: amlogic: Fix dma_map_sg error check > crypto: allwinner: Fix dma_map_sg error check > crypto: ccree: Fix dma_map_sg error check > > 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 +- > drivers/crypto/amlogic/amlogic-gxl-cipher.c | 6 +++--- > drivers/crypto/ccree/cc_buffer_mgr.c | 2 +- > drivers/crypto/gemini/sl3516-ce-cipher.c | 6 +++--- > drivers/crypto/qce/aead.c | 4 ++-- > drivers/crypto/qce/sha.c | 8 +++++--- > drivers/crypto/qce/skcipher.c | 8 ++++---- > drivers/crypto/sahara.c | 4 ++-- > 11 files changed, 27 insertions(+), 25 deletions(-) These patches have already been applied to cryptodev. However, upon further reflection I have decided to revert two of the patches which actually made the code less robust. Thanks, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt