[PATCH 1/3] drm: add DRM_SET_NAME ioctl
kernel test robot
lkp at intel.com
Fri Sep 13 23:06:21 UTC 2024
Hi Pierre-Eric,
kernel test robot noticed the following build warnings:
[auto build test WARNING on drm-exynos/exynos-drm-next]
[also build test WARNING on drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-misc/drm-misc-next drm-tip/drm-tip linus/master v6.11-rc7 next-20240913]
[cannot apply to drm/drm-next]
[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/Pierre-Eric-Pelloux-Prayer/drm-use-drm_file-name-in-fdinfo/20240911-230058
base: https://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git exynos-drm-next
patch link: https://lore.kernel.org/r/20240911145836.734080-1-pierre-eric.pelloux-prayer%40amd.com
patch subject: [PATCH 1/3] drm: add DRM_SET_NAME ioctl
config: x86_64-randconfig-121-20240913 (https://download.01.org/0day-ci/archive/20240914/202409140642.ZDKf0cja-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240914/202409140642.ZDKf0cja-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409140642.ZDKf0cja-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/drm_ioctl.c:553:18: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *user_ptr @@ got void [noderef] __user * @@
drivers/gpu/drm/drm_ioctl.c:553:18: sparse: expected void *user_ptr
drivers/gpu/drm/drm_ioctl.c:553:18: sparse: got void [noderef] __user *
>> drivers/gpu/drm/drm_ioctl.c:555:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user * @@ got void *user_ptr @@
drivers/gpu/drm/drm_ioctl.c:555:36: sparse: expected void const [noderef] __user *
drivers/gpu/drm/drm_ioctl.c:555:36: sparse: got void *user_ptr
vim +553 drivers/gpu/drm/drm_ioctl.c
542
543 static int drm_set_name(struct drm_device *dev, void *data,
544 struct drm_file *file_priv)
545 {
546 struct drm_set_name *name = data;
547 void *user_ptr;
548 char *new_name;
549
550 if (name->name_len >= NAME_MAX)
551 return -EINVAL;
552
> 553 user_ptr = u64_to_user_ptr(name->name);
554
> 555 new_name = memdup_user_nul(user_ptr, name->name_len);
556
557 if (IS_ERR(new_name))
558 return PTR_ERR(new_name);
559
560 mutex_lock(&file_priv->name_lock);
561 if (file_priv->name)
562 kvfree(file_priv->name);
563 file_priv->name = new_name;
564 mutex_unlock(&file_priv->name_lock);
565
566 return 0;
567 }
568
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the dri-devel
mailing list