diff options
author | Oded Gabbay <oded.gabbay@gmail.com> | 2020-06-01 09:56:48 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-06-01 09:08:10 +0200 |
commit | 05c8a4fc44a916dd897769ca69b42381f9177ec4 (patch) | |
tree | 2510a1432b5b02260cd14945de1eb40152f9b6f3 /drivers | |
parent | c68f1baeaff4b21976191ba929f5ae26e1037a0a (diff) | |
download | linux-05c8a4fc44a916dd897769ca69b42381f9177ec4.tar.gz linux-05c8a4fc44a916dd897769ca69b42381f9177ec4.tar.bz2 linux-05c8a4fc44a916dd897769ca69b42381f9177ec4.zip |
habanalabs: correctly cast u64 to void*
Use the u64_to_user_ptr(x) kernel macro to correctly cast u64 to void*
Reported-by: kbuild test robot <lkp@intel.com>
Reviewed-by: Omer Shpigelman <oshpigelman@habana.ai>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Link: https://lore.kernel.org/r/20200601065648.8775-2-oded.gabbay@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/misc/habanalabs/command_submission.c | 2 |
1 files changed, 1 insertions, 1 deletions
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"); |