[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202511191706.iBCITtX2-lkp@intel.com>
Date: Wed, 19 Nov 2025 14:39:20 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: oe-kbuild@...ts.linux.dev, Haotian Zhang <vulab@...as.ac.cn>,
herbert@...dor.apana.org.au, davem@...emloft.net
Cc: lkp@...el.com, oe-kbuild-all@...ts.linux.dev,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
Haotian Zhang <vulab@...as.ac.cn>
Subject: Re: [PATCH v2] crypto: sa2ul: Add error handling for DMA metadata
retrieval
Hi Haotian,
kernel test robot noticed the following build warnings:
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Haotian-Zhang/crypto-sa2ul-Add-error-handling-for-DMA-metadata-retrieval/20251117-103258
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
patch link: https://lore.kernel.org/r/20251117023117.90-1-vulab%40iscas.ac.cn
patch subject: [PATCH v2] crypto: sa2ul: Add error handling for DMA metadata retrieval
config: m68k-randconfig-r073-20251119 (https://download.01.org/0day-ci/archive/20251119/202511191706.iBCITtX2-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 11.5.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
| Closes: https://lore.kernel.org/r/202511191706.iBCITtX2-lkp@intel.com/
smatch warnings:
drivers/crypto/sa2ul.c:1064 sa_aes_dma_in_callback() warn: 'mdptr' can also be NULL
drivers/crypto/sa2ul.c:1394 sa_sha_dma_in_callback() warn: 'mdptr' can also be NULL
drivers/crypto/sa2ul.c:1709 sa_aead_dma_in_callback() warn: 'mdptr' can also be NULL
vim +/mdptr +1064 drivers/crypto/sa2ul.c
7694b6ca649fea Keerthy 2020-07-13 1039 static void sa_aes_dma_in_callback(void *data)
7694b6ca649fea Keerthy 2020-07-13 1040 {
aedf818b1f1965 Yu Zhe 2023-03-17 1041 struct sa_rx_data *rxd = data;
7694b6ca649fea Keerthy 2020-07-13 1042 struct skcipher_request *req;
7694b6ca649fea Keerthy 2020-07-13 1043 u32 *result;
7694b6ca649fea Keerthy 2020-07-13 1044 __be32 *mdptr;
7694b6ca649fea Keerthy 2020-07-13 1045 size_t ml, pl;
7694b6ca649fea Keerthy 2020-07-13 1046 int i;
7694b6ca649fea Keerthy 2020-07-13 1047
00c9211f60db2d Peter Ujfalusi 2020-09-23 1048 sa_sync_from_device(rxd);
7694b6ca649fea Keerthy 2020-07-13 1049 req = container_of(rxd->req, struct skcipher_request, base);
7694b6ca649fea Keerthy 2020-07-13 1050
7694b6ca649fea Keerthy 2020-07-13 1051 if (req->iv) {
7694b6ca649fea Keerthy 2020-07-13 1052 mdptr = (__be32 *)dmaengine_desc_get_metadata_ptr(rxd->tx_in, &pl,
7694b6ca649fea Keerthy 2020-07-13 1053 &ml);
The Kconfig file should probably enforce that CONFIG_DMA_ENGINE
is set. Otherwise dmaengine_desc_get_metadata_ptr() returns NULL.
90d79e983588a8 Haotian Zhang 2025-11-17 1054 if (IS_ERR(mdptr)) {
90d79e983588a8 Haotian Zhang 2025-11-17 1055 dev_err(rxd->ddev, "Failed to get AES RX metadata pointer: %ld\n",
90d79e983588a8 Haotian Zhang 2025-11-17 1056 PTR_ERR(mdptr));
90d79e983588a8 Haotian Zhang 2025-11-17 1057 sa_free_sa_rx_data(rxd);
90d79e983588a8 Haotian Zhang 2025-11-17 1058 skcipher_request_complete(req, PTR_ERR(mdptr));
90d79e983588a8 Haotian Zhang 2025-11-17 1059 return;
90d79e983588a8 Haotian Zhang 2025-11-17 1060 }
7694b6ca649fea Keerthy 2020-07-13 1061 result = (u32 *)req->iv;
7694b6ca649fea Keerthy 2020-07-13 1062
7694b6ca649fea Keerthy 2020-07-13 1063 for (i = 0; i < (rxd->enc_iv_size / 4); i++)
7694b6ca649fea Keerthy 2020-07-13 @1064 result[i] = be32_to_cpu(mdptr[i + rxd->iv_idx]);
7694b6ca649fea Keerthy 2020-07-13 1065 }
7694b6ca649fea Keerthy 2020-07-13 1066
00c9211f60db2d Peter Ujfalusi 2020-09-23 1067 sa_free_sa_rx_data(rxd);
7694b6ca649fea Keerthy 2020-07-13 1068
7694b6ca649fea Keerthy 2020-07-13 1069 skcipher_request_complete(req, 0);
7694b6ca649fea Keerthy 2020-07-13 1070 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists