From: kernel test robot <lkp@intel.com>
To: "Guangshuo Li" <lgs201920130244@gmail.com>,
"Horia Geantă" <horia.geanta@nxp.com>,
"Pankaj Gupta" <pankaj.gupta@nxp.com>,
"Gaurav Jain" <gaurav.jain@nxp.com>,
"Herbert Xu" <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
"Victoria Milhoan (b42089)" <vicki.milhoan@freescale.com>,
"Meenakshi Aggarwal" <meenakshi.aggarwal@nxp.com>,
"Dan Douglass" <dan.douglass@nxp.com>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, netdev@vger.kernel.org,
Guangshuo Li <lgs201920130244@gmail.com>,
stable@vger.kernel.org
Subject: Re: [PATCH v2] crypto: caam: Add check for kcalloc() in test_len()
Date: Tue, 23 Sep 2025 18:56:21 +0800 [thread overview]
Message-ID: <202509231807.ZFBBKMM4-lkp@intel.com> (raw)
In-Reply-To: <20250922155322.1825714-1-lgs201920130244@gmail.com>
Hi Guangshuo,
kernel test robot noticed the following build errors:
[auto build test ERROR on herbert-cryptodev-2.6/master]
[also build test ERROR on herbert-crypto-2.6/master linus/master v6.17-rc7 next-20250922]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Guangshuo-Li/crypto-caam-Add-check-for-kcalloc-in-test_len/20250922-235723
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
patch link: https://lore.kernel.org/r/20250922155322.1825714-1-lgs201920130244%40gmail.com
patch subject: [PATCH v2] crypto: caam: Add check for kcalloc() in test_len()
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20250923/202509231807.ZFBBKMM4-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250923/202509231807.ZFBBKMM4-lkp@intel.com/reproduce)
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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509231807.ZFBBKMM4-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/crypto/caam/caamrng.c: In function 'test_len':
>> drivers/crypto/caam/caamrng.c:186:24: error: 'return' with a value, in function returning void [-Wreturn-mismatch]
186 | return -ENOMEM;
| ^
drivers/crypto/caam/caamrng.c:176:20: note: declared here
176 | static inline void test_len(struct hwrng *rng, size_t len, bool wait)
| ^~~~~~~~
vim +/return +186 drivers/crypto/caam/caamrng.c
174
175 #ifdef CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_TEST
176 static inline void test_len(struct hwrng *rng, size_t len, bool wait)
177 {
178 u8 *buf;
179 int read_len;
180 struct caam_rng_ctx *ctx = to_caam_rng_ctx(rng);
181 struct device *dev = ctx->ctrldev;
182
183 buf = kcalloc(CAAM_RNG_MAX_FIFO_STORE_SIZE, sizeof(u8), GFP_KERNEL);
184
185 if (!buf) {
> 186 return -ENOMEM;
187 }
188 while (len > 0) {
189 read_len = rng->read(rng, buf, len, wait);
190
191 if (read_len < 0 || (read_len == 0 && wait)) {
192 dev_err(dev, "RNG Read FAILED received %d bytes\n",
193 read_len);
194 kfree(buf);
195 return;
196 }
197
198 print_hex_dump_debug("random bytes@: ",
199 DUMP_PREFIX_ADDRESS, 16, 4,
200 buf, read_len, 1);
201
202 len = len - read_len;
203 }
204
205 kfree(buf);
206 }
207
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2025-09-23 10:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-22 15:53 [PATCH v2] crypto: caam: Add check for kcalloc() in test_len() Guangshuo Li
2025-09-23 9:20 ` kernel test robot
2025-09-23 10:56 ` kernel test robot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202509231807.ZFBBKMM4-lkp@intel.com \
--to=lkp@intel.com \
--cc=dan.douglass@nxp.com \
--cc=davem@davemloft.net \
--cc=gaurav.jain@nxp.com \
--cc=herbert@gondor.apana.org.au \
--cc=horia.geanta@nxp.com \
--cc=lgs201920130244@gmail.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=meenakshi.aggarwal@nxp.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pankaj.gupta@nxp.com \
--cc=stable@vger.kernel.org \
--cc=vicki.milhoan@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox