[linux-next:master 3297/12941] drivers/gpu/drm/msm/msm_fence.c:24:9: warning: 'strncpy' specified bound 32 equals destination size
From: kernel test robot <hidden>
Date: 2021-11-02 21:20:13
Also in:
oe-kbuild-all
Hi Christian, First bad commit (maybe != root cause): tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 9150de4aac1eb6e6441b2b086f6ca8132aaea040 commit: b3ed524f84f573ece1aa2f26e9db3c34a593e0d1 [3297/12941] drm/msm: allow compile_test on !ARM config: alpha-randconfig-r002-20211103 (attached as .config) compiler: alpha-linux-gcc (GCC) 11.2.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/next/linux-next.git/commit/?id=b3ed524f84f573ece1aa2f26e9db3c34a593e0d1 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout b3ed524f84f573ece1aa2f26e9db3c34a593e0d1 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=alpha If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <redacted> All warnings (new ones prefixed by >>): drivers/gpu/drm/msm/msm_fence.c: In function 'msm_fence_context_alloc':
quoted
drivers/gpu/drm/msm/msm_fence.c:24:9: warning: 'strncpy' specified bound 32 equals destination size [-Wstringop-truncation]
24 | strncpy(fctx->name, name, sizeof(fctx->name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/strncpy +24 drivers/gpu/drm/msm/msm_fence.c
fde5de6cb4617a1 Rob Clark 2016-03-15 11
ca762a8ae7f4539 Rob Clark 2016-03-15 12
ca762a8ae7f4539 Rob Clark 2016-03-15 13 struct msm_fence_context *
da3d378dec86348 Rob Clark 2021-07-26 14 msm_fence_context_alloc(struct drm_device *dev, volatile uint32_t *fenceptr,
da3d378dec86348 Rob Clark 2021-07-26 15 const char *name)
ca762a8ae7f4539 Rob Clark 2016-03-15 16 {
ca762a8ae7f4539 Rob Clark 2016-03-15 17 struct msm_fence_context *fctx;
ca762a8ae7f4539 Rob Clark 2016-03-15 18
ca762a8ae7f4539 Rob Clark 2016-03-15 19 fctx = kzalloc(sizeof(*fctx), GFP_KERNEL);
ca762a8ae7f4539 Rob Clark 2016-03-15 20 if (!fctx)
ca762a8ae7f4539 Rob Clark 2016-03-15 21 return ERR_PTR(-ENOMEM);
ca762a8ae7f4539 Rob Clark 2016-03-15 22
ca762a8ae7f4539 Rob Clark 2016-03-15 23 fctx->dev = dev;
f97decac5f4c2d8 Jordan Crouse 2017-10-20 @24 strncpy(fctx->name, name, sizeof(fctx->name));
f54d1867005c332 Chris Wilson 2016-10-25 25 fctx->context = dma_fence_context_alloc(1);
da3d378dec86348 Rob Clark 2021-07-26 26 fctx->fenceptr = fenceptr;
b6295f9a38fc3f7 Rob Clark 2016-03-15 27 spin_lock_init(&fctx->spinlock);
ca762a8ae7f4539 Rob Clark 2016-03-15 28
ca762a8ae7f4539 Rob Clark 2016-03-15 29 return fctx;
ca762a8ae7f4539 Rob Clark 2016-03-15 30 }
ca762a8ae7f4539 Rob Clark 2016-03-15 31
:::::: The code at line 24 was first introduced by commit
:::::: f97decac5f4c2d862e5b848694e3ffb29fc8acdd drm/msm: Support multiple ringbuffers
:::::: TO: Jordan Crouse [off-list ref]
:::::: CC: Rob Clark [off-list ref]
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Attachments
- .config.gz [application/gzip] 35031 bytes