* [PATCH] habanalabs: correctly cast u64 to void*
@ 2020-05-31 9:15 Oded Gabbay
2020-05-31 10:14 ` Omer Shpigelman
0 siblings, 1 reply; 2+ messages in thread
From: Oded Gabbay @ 2020-05-31 9:15 UTC (permalink / raw)
To: linux-kernel, SW_Drivers; +Cc: gregkh
Use the u64_to_user_ptr(x) kernel macro to correctly cast u64 to void*
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
---
drivers/misc/habanalabs/command_submission.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/habanalabs/command_submission.c b/drivers/misc/habanalabs/command_submission.c
index 75d8302352e5..f82974a916c3 100644
--- a/drivers/misc/habanalabs/command_submission.c
+++ b/drivers/misc/habanalabs/command_submission.c
@@ -789,7 +789,7 @@ static int cs_ioctl_signal_wait(struct hl_fpriv *hpriv, enum hl_cs_type cs_type,
size_to_copy = chunk->num_signal_seq_arr *
sizeof(*signal_seq_arr);
if (copy_from_user(signal_seq_arr,
- (void __user *) chunk->signal_seq_arr,
+ u64_to_user_ptr(chunk->signal_seq_arr),
size_to_copy)) {
dev_err(hdev->dev,
"Failed to copy signal seq array from user\n");
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCH] habanalabs: correctly cast u64 to void*
2020-05-31 9:15 [PATCH] habanalabs: correctly cast u64 to void* Oded Gabbay
@ 2020-05-31 10:14 ` Omer Shpigelman
0 siblings, 0 replies; 2+ messages in thread
From: Omer Shpigelman @ 2020-05-31 10:14 UTC (permalink / raw)
To: Oded Gabbay, linux-kernel, SW_Drivers; +Cc: gregkh
On Sun, May 31, 2020 at 12:16 PM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
> Use the u64_to_user_ptr(x) kernel macro to correctly cast u64 to void*
>
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: Omer Shpigelman <oshpigelman@habana.ai>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-31 10:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-31 9:15 [PATCH] habanalabs: correctly cast u64 to void* Oded Gabbay
2020-05-31 10:14 ` Omer Shpigelman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®