tree:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
linux-5.4.y
head: e72abf1f11a982a2a3fb555b5a9bd2eb2011dee8
commit: 6b47a3043a24a25e9bf4c9e8a65be2803ecd1ca9 [1/3868] Bluetooth: Fix invalid-free in
bcsp_close()
config: ia64-randconfig-r024-20210617 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gi...
git remote add linux-stable-rc
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-5.4.y
git checkout 6b47a3043a24a25e9bf4c9e8a65be2803ecd1ca9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/nvme/target/discovery.c: In function
'nvmet_execute_identify_disc_ctrl':
> drivers/nvme/target/discovery.c:243:2: warning: 'strncpy'
output truncated copying 8 bytes from a string of length 27 [-Wstringop-truncation]
243 | strncpy((char *)id->fr, UTS_RELEASE, sizeof(id->fr));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +243 drivers/nvme/target/discovery.c
a07b4970f464f1 Christoph Hellwig 2016-06-21 229
a07b4970f464f1 Christoph Hellwig 2016-06-21 230 static void
nvmet_execute_identify_disc_ctrl(struct nvmet_req *req)
a07b4970f464f1 Christoph Hellwig 2016-06-21 231 {
a07b4970f464f1 Christoph Hellwig 2016-06-21 232 struct nvmet_ctrl *ctrl =
req->sq->ctrl;
a07b4970f464f1 Christoph Hellwig 2016-06-21 233 struct nvme_id_ctrl *id;
a07b4970f464f1 Christoph Hellwig 2016-06-21 234 u16 status = 0;
a07b4970f464f1 Christoph Hellwig 2016-06-21 235
a07b4970f464f1 Christoph Hellwig 2016-06-21 236 id = kzalloc(sizeof(*id), GFP_KERNEL);
a07b4970f464f1 Christoph Hellwig 2016-06-21 237 if (!id) {
a07b4970f464f1 Christoph Hellwig 2016-06-21 238 status = NVME_SC_INTERNAL;
a07b4970f464f1 Christoph Hellwig 2016-06-21 239 goto out;
a07b4970f464f1 Christoph Hellwig 2016-06-21 240 }
a07b4970f464f1 Christoph Hellwig 2016-06-21 241
a07b4970f464f1 Christoph Hellwig 2016-06-21 242 memset(id->fr, ' ',
sizeof(id->fr));
a07b4970f464f1 Christoph Hellwig 2016-06-21 @243 strncpy((char *)id->fr, UTS_RELEASE,
sizeof(id->fr));
a07b4970f464f1 Christoph Hellwig 2016-06-21 244
a07b4970f464f1 Christoph Hellwig 2016-06-21 245 /* no limit on data transfer sizes for
now */
a07b4970f464f1 Christoph Hellwig 2016-06-21 246 id->mdts = 0;
a07b4970f464f1 Christoph Hellwig 2016-06-21 247 id->cntlid =
cpu_to_le16(ctrl->cntlid);
a07b4970f464f1 Christoph Hellwig 2016-06-21 248 id->ver =
cpu_to_le32(ctrl->subsys->ver);
a07b4970f464f1 Christoph Hellwig 2016-06-21 249 id->lpa = (1 << 2);
a07b4970f464f1 Christoph Hellwig 2016-06-21 250
a07b4970f464f1 Christoph Hellwig 2016-06-21 251 /* no enforcement soft-limit for maxcmd
- pick arbitrary high value */
a07b4970f464f1 Christoph Hellwig 2016-06-21 252 id->maxcmd =
cpu_to_le16(NVMET_MAX_CMD);
a07b4970f464f1 Christoph Hellwig 2016-06-21 253
a07b4970f464f1 Christoph Hellwig 2016-06-21 254 id->sgls = cpu_to_le32(1 <<
0); /* we always support SGLs */
a07b4970f464f1 Christoph Hellwig 2016-06-21 255 if (ctrl->ops->has_keyed_sgls)
a07b4970f464f1 Christoph Hellwig 2016-06-21 256 id->sgls |= cpu_to_le32(1 <<
2);
0d5ee2b2ab4f67 Steve Wise 2018-06-20 257 if (req->port->inline_data_size)
a07b4970f464f1 Christoph Hellwig 2016-06-21 258 id->sgls |= cpu_to_le32(1 <<
20);
a07b4970f464f1 Christoph Hellwig 2016-06-21 259
b662a078576e7d Jay Sternberg 2018-11-12 260 id->oaes =
cpu_to_le32(NVMET_DISC_AEN_CFG_OPTIONAL);
b662a078576e7d Jay Sternberg 2018-11-12 261
5eadc9cce17100 Bart Van Assche 2018-10-08 262 strlcpy(id->subnqn,
ctrl->subsys->subsysnqn, sizeof(id->subnqn));
a07b4970f464f1 Christoph Hellwig 2016-06-21 263
a07b4970f464f1 Christoph Hellwig 2016-06-21 264 status = nvmet_copy_to_sgl(req, 0, id,
sizeof(*id));
a07b4970f464f1 Christoph Hellwig 2016-06-21 265
a07b4970f464f1 Christoph Hellwig 2016-06-21 266 kfree(id);
a07b4970f464f1 Christoph Hellwig 2016-06-21 267 out:
a07b4970f464f1 Christoph Hellwig 2016-06-21 268 nvmet_req_complete(req, status);
a07b4970f464f1 Christoph Hellwig 2016-06-21 269 }
a07b4970f464f1 Christoph Hellwig 2016-06-21 270
:::::: The code at line 243 was first introduced by commit
:::::: a07b4970f464f13640e28e16dad6cfa33647cc99 nvmet: add a generic NVMe target
:::::: TO: Christoph Hellwig <hch(a)lst.de>
:::::: CC: Jens Axboe <axboe(a)fb.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org