From patchwork Thu Mar 21 17:24:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10864137 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7E90D1823 for ; Thu, 21 Mar 2019 17:24:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 593DC2A252 for ; Thu, 21 Mar 2019 17:24:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D8022A256; Thu, 21 Mar 2019 17:24:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD6082A247 for ; Thu, 21 Mar 2019 17:24:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728480AbfCURY1 (ORCPT ); Thu, 21 Mar 2019 13:24:27 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:38330 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725985AbfCURY1 (ORCPT ); Thu, 21 Mar 2019 13:24:27 -0400 Received: by mail-pf1-f195.google.com with SMTP id 10so4737780pfo.5 for ; Thu, 21 Mar 2019 10:24:25 -0700 (PDT) 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=y78fKo222UcUuThLkloCtmOynPtshzSYt5UKAVfU9/E=; b=TYIL2YbfE8VWVPDYi6YStdnECITNVzc+4HkjhUnPAI1vojBjBSTj8IJl7m0iJk/JYB fb2q5HHG7++P8GBq10Ii3TbcNqD529f9On1cflMkgYi74SfC/9kfyrU9fZ3+aBj9NAt7 MKph5dNbGeFmDQmsX4cS7Src/+EfmunJt5Vp9tK4TVhLITTOZPInDFd/wk16ySek3JgA +lPUv6ePgkX8JUYm/Shb2sHj1DHehJirS8jlia4N3IPkGwpg92Sa4KchN6JBsFTJ//mo ruKZfV/L/Nr/Jv5nnsJBRkd6DkqRfV2/s2ENGtOATDzNgcfxoD4G6BGGtH/8t/qbA7L5 x6DA== X-Gm-Message-State: APjAAAUdt+szA8g+dJ2KBV7wa5yQ2RUsqqFPm6s6MZavwOKMlAM4ZBmD +vhe/jbFqvGyxbNcMi3O6cU= X-Google-Smtp-Source: APXvYqwjGqkINB18EDkNPlNHZvhr6lAx541ZCh1ZOgXRTiXZOwjqupgjyEQ/3s4ASIiXqHbcWOdeuQ== X-Received: by 2002:a17:902:8e8b:: with SMTP id bg11mr4520800plb.328.1553189065055; Thu, 21 Mar 2019 10:24:25 -0700 (PDT) Received: from desktop-bart.svl.corp.google.com ([2620:15c:2cd:203:5cdc:422c:7b28:ebb5]) by smtp.gmail.com with ESMTPSA id s184sm7528549pfb.1.2019.03.21.10.24.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Mar 2019 10:24:24 -0700 (PDT) From: Bart Van Assche To: Jason Gunthorpe Cc: Leon Romanovsky , Doug Ledford , linux-rdma@vger.kernel.org, Bart Van Assche Subject: [PATCH 1/8] RDMA/uverbs: Add a __user annotation to a pointer Date: Thu, 21 Mar 2019 10:24:10 -0700 Message-Id: <20190321172417.77869-2-bvanassche@acm.org> X-Mailer: git-send-email 2.20.GIT In-Reply-To: <20190321172417.77869-1-bvanassche@acm.org> References: <20190321172417.77869-1-bvanassche@acm.org> MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch avoids that sparse and smatch report the following: warning: cast removes address space of expression Fixes: 3a6532c9af1a ("RDMA/uverbs: Use uverbs_attr_bundle to pass udata for write") # v5.0. Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky --- drivers/infiniband/core/uverbs_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c index 70b7d80431a9..b8fc5a329e21 100644 --- a/drivers/infiniband/core/uverbs_main.c +++ b/drivers/infiniband/core/uverbs_main.c @@ -720,7 +720,7 @@ static ssize_t ib_uverbs_write(struct file *filp, const char __user *buf, * then the command request structure starts * with a '__aligned u64 response' member. */ - ret = get_user(response, (const u64 *)buf); + ret = get_user(response, (const u64 __user *)buf); if (ret) goto out_unlock;