All of lore.kernel.org
 help / color / mirror / Atom feed
* [lustre-devel] [PATCH] staging: lustre: lnet: specify address space
@ 2017-05-16 20:56 Paolo Cretaro
  2017-05-17  9:34 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Cretaro @ 2017-05-16 20:56 UTC (permalink / raw)
  To: lustre-devel

Fix warning issued by sparse:
incorrect type in assignment (different address spaces).

Signed-off-by: Paolo Cretaro <melko@frugalware.org>
---
 drivers/staging/lustre/lnet/lnet/lib-socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lnet/lnet/lib-socket.c b/drivers/staging/lustre/lnet/lnet/lib-socket.c
index 9fca8d225ee0..e5e5213b4da0 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-socket.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-socket.c
@@ -181,7 +181,7 @@ lnet_ipif_enumerate(char ***namesp)
 			goto out0;
 		}
 
-		ifc.ifc_buf = (char *)ifr;
+		ifc.ifc_buf = (char __user *)ifr;
 		ifc.ifc_len = nalloc * sizeof(*ifr);
 
 		rc = lnet_sock_ioctl(SIOCGIFCONF, (unsigned long)&ifc);
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [lustre-devel] [PATCH] staging: lustre: lnet: specify address space
  2017-05-16 20:56 [lustre-devel] [PATCH] staging: lustre: lnet: specify address space Paolo Cretaro
@ 2017-05-17  9:34 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2017-05-17  9:34 UTC (permalink / raw)
  To: lustre-devel

On Tue, May 16, 2017 at 10:56:10PM +0200, Paolo Cretaro wrote:
> Fix warning issued by sparse:
> incorrect type in assignment (different address spaces).
> 
> Signed-off-by: Paolo Cretaro <melko@frugalware.org>
> ---
>  drivers/staging/lustre/lnet/lnet/lib-socket.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lnet/lnet/lib-socket.c b/drivers/staging/lustre/lnet/lnet/lib-socket.c
> index 9fca8d225ee0..e5e5213b4da0 100644
> --- a/drivers/staging/lustre/lnet/lnet/lib-socket.c
> +++ b/drivers/staging/lustre/lnet/lnet/lib-socket.c
> @@ -181,7 +181,7 @@ lnet_ipif_enumerate(char ***namesp)
>  			goto out0;
>  		}
>  
> -		ifc.ifc_buf = (char *)ifr;
> +		ifc.ifc_buf = (char __user *)ifr;

But it's not a __user pointer so this is wrong.  You have deleted a
valuable warning message which is there to inform us about important
bugs.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-17  9:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-16 20:56 [lustre-devel] [PATCH] staging: lustre: lnet: specify address space Paolo Cretaro
2017-05-17  9:34 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.