Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] drm/xe/eustall: Use copy_from_user() instead of __copy_from_user()
@ 2025-04-30  5:11 Harish Chegondi
  2025-04-30  7:00 ` ✓ CI.Patch_applied: success for series starting with [1/1] " Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Harish Chegondi @ 2025-04-30  5:11 UTC (permalink / raw)
  To: intel-xe; +Cc: ashutosh.dixit, kees, Harish Chegondi

copy_from_user() has more checks and is more safer than
__copy_from_user()

Fixes: 1537ec85ebd7 ("drm/xe/uapi: Introduce API for EU stall sampling")
Signed-off-by: Harish Chegondi <harish.chegondi@intel.com>
---
 drivers/gpu/drm/xe/xe_eu_stall.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_eu_stall.c b/drivers/gpu/drm/xe/xe_eu_stall.c
index e2bb156c71fb..96732613b4b7 100644
--- a/drivers/gpu/drm/xe/xe_eu_stall.c
+++ b/drivers/gpu/drm/xe/xe_eu_stall.c
@@ -283,7 +283,7 @@ static int xe_eu_stall_user_ext_set_property(struct xe_device *xe, u64 extension
 	int err;
 	u32 idx;
 
-	err = __copy_from_user(&ext, address, sizeof(ext));
+	err = copy_from_user(&ext, address, sizeof(ext));
 	if (XE_IOCTL_DBG(xe, err))
 		return -EFAULT;
 
@@ -313,7 +313,7 @@ static int xe_eu_stall_user_extensions(struct xe_device *xe, u64 extension,
 	if (XE_IOCTL_DBG(xe, ext_number >= MAX_USER_EXTENSIONS))
 		return -E2BIG;
 
-	err = __copy_from_user(&ext, address, sizeof(ext));
+	err = copy_from_user(&ext, address, sizeof(ext));
 	if (XE_IOCTL_DBG(xe, err))
 		return -EFAULT;
 
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-05-06  7:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-30  5:11 [PATCH 1/1] drm/xe/eustall: Use copy_from_user() instead of __copy_from_user() Harish Chegondi
2025-04-30  7:00 ` ✓ CI.Patch_applied: success for series starting with [1/1] " Patchwork
2025-04-30  7:01 ` ✓ CI.checkpatch: " Patchwork
2025-04-30  7:02 ` ✓ CI.KUnit: " Patchwork
2025-04-30  7:10 ` ✓ CI.Build: " Patchwork
2025-04-30  7:12 ` ✓ CI.Hooks: " Patchwork
2025-04-30  7:14 ` ✓ CI.checksparse: " Patchwork
2025-04-30 12:09 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-30 18:51 ` [PATCH 1/1] " Kees Cook
2025-04-30 22:49   ` Dixit, Ashutosh
2025-05-06  7:55 ` ✗ Xe.CI.BAT: failure for series starting with [1/1] " Patchwork

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