From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757807AbcB1Ord (ORCPT ); Sun, 28 Feb 2016 09:47:33 -0500 Received: from aibo.runbox.com ([91.220.196.211]:45483 "EHLO aibo.runbox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757463AbcB1Orc (ORCPT ); Sun, 28 Feb 2016 09:47:32 -0500 X-Greylist: delayed 1229 seconds by postgrey-1.27 at vger.kernel.org; Sun, 28 Feb 2016 09:47:32 EST From: "M. Vefa Bicakci" To: linux-kernel@vger.kernel.org Cc: Oleg Drokin , Andreas Dilger , Greg Kroah-Hartman , "M. Vefa Bicakci" Subject: [PATCH 2/2] staging: lustre: Use __user for a pointer to a user space address Date: Sun, 28 Feb 2016 09:26:22 -0500 Message-Id: <1456669582-16318-3-git-send-email-m.v.b@runbox.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1456669582-16318-1-git-send-email-m.v.b@runbox.com> References: <1456669582-16318-1-git-send-email-m.v.b@runbox.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This commit corrects two sparse warnings caused by the lack of a __user annotation for the third argument of the libcfs_ioctl_handle function. module.c:165:68: warning: incorrect type in argument 1 (different address spaces) module.c:165:68: expected void [noderef] *arg module.c:165:68: got void *arg module.c:209:47: warning: incorrect type in argument 3 (different address spaces) module.c:209:47: expected void *arg module.c:209:47: got void [noderef] *arg The need to have the __user annotation is supported by the fact that libcfs_ioctl_handle passes its third argument to a helper function (libcfs_ioctl_popdata) which also has a __user annotation for its corresponding argument. Signed-off-by: M. Vefa Bicakci --- drivers/staging/lustre/lustre/libcfs/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c index 05e2c5625220..f3845dcee259 100644 --- a/drivers/staging/lustre/lustre/libcfs/module.c +++ b/drivers/staging/lustre/lustre/libcfs/module.c @@ -120,7 +120,7 @@ int libcfs_deregister_ioctl(struct libcfs_ioctl_handler *hand) EXPORT_SYMBOL(libcfs_deregister_ioctl); static int libcfs_ioctl_handle(struct cfs_psdev_file *pfile, unsigned long cmd, - void *arg, struct libcfs_ioctl_hdr *hdr) + void __user *arg, struct libcfs_ioctl_hdr *hdr) { struct libcfs_ioctl_data *data = NULL; int err = -EINVAL; -- 2.5.0