Skip to contentSkip to conversation

staging: lustre: lnet: specify address space

PATCH New Paolo Cretaro 2 participants 2 messages May 16, 2017 – May 17, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: lustre: lnet: specify address space

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

---
 drivers/staging/lustre/lnet/lnet/lib-socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lnet/lnet/lib-socket.c +1 -1
index 9fca8d225ee0..e5e5213b4da0 100644
@@ -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);
Signature · 1 line
2.13.0
#1 lore raw

PATCH 1/1 staging: lustre: lnet: specify address space

Quoted 13 lines · Paolo Cretaro

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

---
 drivers/staging/lustre/lnet/lnet/lib-socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lnet/lnet/lib-socket.c +0 -0
index 9fca8d225ee0..e5e5213b4da0 100644

drivers/staging/lustre/lnet/lnet/lib-socket.c lnet_ipif_enumerate(char ***namesp) · line 184

Quoted 5 lines
drivers/staging/lustre/lnet/lnet/lib-socket.c +1 -1
@@ -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