Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1907123ybm; Sun, 31 May 2020 02:21:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIyFuGBnGyTpp7RLtV+U+i4a/hQmuxAQnWNx2VTPuUIhQAliV0T7Mp+cPffhiar4coxYNm X-Received: by 2002:a17:906:5243:: with SMTP id y3mr15728798ejm.193.1590916901438; Sun, 31 May 2020 02:21:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590916901; cv=none; d=google.com; s=arc-20160816; b=pZs+s9wjD0p6Qu+d3pzNOY8D/3Ryn4mkUphBrQqhtqSIEA5eYdBV0+n1eHNh+kt5CK FEbWXWlL+oV/csnkGUH5m38rYxnGLo03+pUfq0P8r8UObOgi865yWKhISrw4vRFUjpL+ P/HGFm4Iktg7we2kPU0n/pClnNorrOdokAofhIOkIjhI5MbjAIVcsdfF5aRdZOPDLK4R FXafKCEw74MMOoz/J9em2vrjTSyQ0+fVNFwx7ZU1/Ylh/gSeb8+M1EM3lpu+kN9WfCgN i0hNMM11e9j/r8ZmuNh3iWopqeC+MFQRAN0ecUBCECc7g+h0hAZcaVhZhHRJ0atKNW1C rAww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=3LV+Def1c7T48ZEneRWvSMkP3WD/su3mbckNwtB8Qdo=; b=YSWRAtebfZFWuhIgdxWLMh30F/zrxdb1o8TsJwYEVtZG8uYH96AYX09Zme721YFw9k ril9SlneJgWTWrUP4NVX6JB3JW9lm29o87aBdGfGoa5EEgA7UTb3Xrz2b28H11bil2qR o7VRYe3d6GRq8uVrJ+xrpMcJ88CcMAlM0ptrg32Q/JcFJBWGTCYKuavPSPF8klMUmyiB 26+vB+sDFIhkFOwC+Dawlvc3fMwQ20WPp1uXFPSFfxxmiTN6/Z3utSKFYG8kshlQggmx C00fZjWMpLfzqlgbbz/WyKp408hmr16HRIfUsll9jkCiwMNSMrRSbgSAqD02H/8xLW/i 0ISA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EAvigIBG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v15si5774955edq.373.2020.05.31.02.21.18; Sun, 31 May 2020 02:21:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EAvigIBG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727926AbgEaJTA (ORCPT + 99 others); Sun, 31 May 2020 05:19:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725860AbgEaJS7 (ORCPT ); Sun, 31 May 2020 05:18:59 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27B6DC061A0E for ; Sun, 31 May 2020 02:18:58 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id u26so9905776wmn.1 for ; Sun, 31 May 2020 02:18:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=3LV+Def1c7T48ZEneRWvSMkP3WD/su3mbckNwtB8Qdo=; b=EAvigIBGYEjOeLH0Mzn2G2eCzmfNfnX+Vvk0fDFDMdDXude50AJxuihlltZ6i0Hb/T EtUPDbYvZiWDVoAmuLyEYRMrhd10C/rs1Xd8VUs7lx78Isfdsxk7TP2xlUuF/XGxAquQ Ru58g/HdDAIhsr5WPzTWHc4LRcIwTwbOiHkg6KDmjU5UiySXtZ1y0xH43Jw1bobyqGU4 TPgTCI+p9VNEItkwHB6t93SQVcwJ4KIpykcAVOBV+LsrMZxrL7wUdAphN1zj3f+NFu4+ p6zhcGeUTnMiH6PTGG9adfyHW6hIieDd/CobJxs0gGxGHNmJYN23tbbHCvThQepxyIyH eHIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3LV+Def1c7T48ZEneRWvSMkP3WD/su3mbckNwtB8Qdo=; b=idzUryLbyZ6eA+67V5ksgs8di0ofbP4d7CWtTdl02ss5YdxOktAeFF/+1SL1r3ySHW 7ko1XVSFafHTq5s1sQtcU7JV4JSGbqhaEUfvF2V+oBq+8s6drzK34oEvP3QdRIIKykep IqquEoHnR3CP4+7A1BREW7nW1mb4QQlcTS9m0UWIxwFDk2QdvciXMGvWpPn4eP5i7IgD JWo//8cI+lNVmEGMtVVSVFAKcSexRYvM5ycYeXtPxkv78e5bEl6sUQuiBAtSumbzgZBI e3oJO69ka3/zy9Zp3mHg5NbGpcenzIcmt9hoPcRFeqUcWcWSi483v/kWjWCUMIwpGGzy WG4w== X-Gm-Message-State: AOAM531DA74CD73UOi8Cd4dwRwQzgPsW4ahU9zWk6uOSrHNgD05syrdV DEiQ6M5GEwoqeWUwp0dIDJrD1I2W X-Received: by 2002:a1c:3281:: with SMTP id y123mr16565627wmy.30.1590916736523; Sun, 31 May 2020 02:18:56 -0700 (PDT) Received: from ogabbay-VM.habana-labs.com ([31.154.190.6]) by smtp.gmail.com with ESMTPSA id s2sm6411867wmh.11.2020.05.31.02.18.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 May 2020 02:18:55 -0700 (PDT) From: Oded Gabbay To: linux-kernel@vger.kernel.org, SW_Drivers@habana.ai Cc: gregkh@linuxfoundation.org Subject: [PATCH] habanalabs: correctly cast u64 to void* Date: Sun, 31 May 2020 12:15:47 +0300 Message-Id: <20200531091547.6868-1-oded.gabbay@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the u64_to_user_ptr(x) kernel macro to correctly cast u64 to void* Reported-by: kbuild test robot Signed-off-by: Oded Gabbay --- 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