tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
pending-5.4
head: 9abaf80794abb88da5762d707a0e27a6fd466846
commit: cd5714a2440505504ce96dcecc4950078ceeef94 [1/83] Revert "ACPICA: Fix memory
leak caused by _CID repair function"
config: openrisc-randconfig-r023-20210809 (attached as .config)
compiler: or1k-linux-gcc (GCC) 10.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/sashal/linux-stable.git/c...
git remote add sashal-linux-stable
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable pending-5.4
git checkout cd5714a2440505504ce96dcecc4950078ceeef94
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=openrisc
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 before terminating nul copying 8 bytes from a string of the same length
[-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