From: kernel test robot <lkp@intel.com>
To: Matthew Brost <matthew.brost@intel.com>
Cc: oe-kbuild-all@lists.linux.dev,
"Linux Memory Management List" <linux-mm@kvack.org>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Nirmoy Das" <nirmoy.das@intel.com>
Subject: [linux-next:master 653/1162] drivers/gpu/drm/xe/xe_sync.c:58:21-27: ERROR: application of sizeof to pointer
Date: Tue, 30 Jul 2024 04:53:42 +0800 [thread overview]
Message-ID: <202407300421.IBkAja96-lkp@intel.com> (raw)
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
reply other threads:[~2024-07-29 20:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202407300421.IBkAja96-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-mm@kvack.org \
--cc=matthew.brost@intel.com \
--cc=nirmoy.das@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=thomas.hellstrom@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox