linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 653/1162] drivers/gpu/drm/xe/xe_sync.c:58:21-27: ERROR: application of sizeof to pointer
@ 2024-07-29 20:53 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-07-29 20:53 UTC (permalink / raw)
  To: Matthew Brost
  Cc: oe-kbuild-all, Linux Memory Management List,
	Thomas Hellström, Nirmoy Das

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   931a3b3bccc96e7708c82b30b2b5fa82dfd04890
commit: 0fde907da2d5fd4da68845e96c6842497159c858 [653/1162] drm/xe: Validate user fence during creation
config: sh-randconfig-r051-20240729 (https://download.01.org/0day-ci/archive/20240730/202407300421.IBkAja96-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 14.1.0

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/202407300421.IBkAja96-lkp@intel.com/

cocci warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/xe/xe_sync.c:58:21-27: ERROR: application of sizeof to pointer

vim +58 drivers/gpu/drm/xe/xe_sync.c

    51	
    52	static struct xe_user_fence *user_fence_create(struct xe_device *xe, u64 addr,
    53						       u64 value)
    54	{
    55		struct xe_user_fence *ufence;
    56		u64 __user *ptr = u64_to_user_ptr(addr);
    57	
  > 58		if (!access_ok(ptr, sizeof(ptr)))
    59			return ERR_PTR(-EFAULT);
    60	
    61		ufence = kmalloc(sizeof(*ufence), GFP_KERNEL);
    62		if (!ufence)
    63			return ERR_PTR(-ENOMEM);
    64	
    65		ufence->xe = xe;
    66		kref_init(&ufence->refcount);
    67		ufence->addr = ptr;
    68		ufence->value = value;
    69		ufence->mm = current->mm;
    70		mmgrab(ufence->mm);
    71	
    72		return ufence;
    73	}
    74	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-07-29 20:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-29 20:53 [linux-next:master 653/1162] drivers/gpu/drm/xe/xe_sync.c:58:21-27: ERROR: application of sizeof to pointer kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox