[openib-general] new sparse warnings

Roland Dreier roland at topspin.com
Wed Dec 15 15:36:30 PST 2004


I have no x86_64 sparse setup to test with, but does this kernel patch fix it?

Index: linux-bk/include/asm-x86_64/uaccess.h
===================================================================
--- linux-bk.orig/include/asm-x86_64/uaccess.h	2004-12-11 15:16:44.000000000 -0800
+++ linux-bk/include/asm-x86_64/uaccess.h	2004-12-15 15:35:47.482091664 -0800
@@ -172,7 +172,7 @@
 
 /* FIXME: this hack is definitely wrong -AK */
 struct __large_struct { unsigned long buf[100]; };
-#define __m(x) (*(struct __large_struct *)(x))
+#define __m(x) (*(struct __large_struct __user *)(x))
 
 /*
  * Tell gcc we read from memory instead of writing: this is because




More information about the general mailing list