[OpenAFS] openafs 1.4.1 does not compile on several Linux 2.6 kernels despite patches to osi_probe.c

Rainer Toebbicke rtb@pclella.cern.ch
Thu, 27 Apr 2006 16:23:24 +0200


This is a multi-part message in MIME format.
--------------010608020702040204030206
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Even after applying patches to osi_probe.c openafs 1.4.1 did not 
compile on Linux 2.6.9-34 kernels (and others).

The reason: a NULL is passed to the module_param_array macro which 
then attempts to take the address of that NULL.

The attached patch defines a correctly typed static zero and passes 
that one instead.


(Bcc'ed to openafs-bugs)
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rainer Toebbicke
European Laboratory for Particle Physics(CERN) - Geneva, Switzerland
Phone: +41 22 767 8985       Fax: +41 22 767 7155

--------------010608020702040204030206
Content-Type: text/plain;
 name="patch_osi_probe"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="patch_osi_probe"

--- openafs/src/afs/LINUX/osi_probe.c.o141	2006-04-27 09:32:32.000000000 +0200
+++ openafs/src/afs/LINUX/osi_probe.c	2006-04-27 14:53:47.000000000 +0200
@@ -117,8 +117,9 @@
 
 /* Allow the user to specify sys_call_table addresses */
 static unsigned long sys_call_table_addr[4] = { 0,0,0,0 };
+static unsigned int uintZero = 0;
 #ifdef module_param_array
-module_param_array(sys_call_table_addr, long, NULL, 0);
+module_param_array(sys_call_table_addr, long, uintZero, 0);
 #else
 MODULE_PARM(sys_call_table_addr, "1-4l");
 #endif
@@ -135,7 +136,7 @@
 
 static int probe_ignore_syscalls[8] = { -1, -1, -1, -1, -1, -1, -1, -1 };
 #ifdef module_param_array
-module_param_array(probe_ignore_syscalls, int, NULL, 0);
+module_param_array(probe_ignore_syscalls, int, uintZero, 0);
 #else
 MODULE_PARM(probe_ignore_syscalls, "1-8i");
 #endif

--------------010608020702040204030206--