arla 0.35.5 and Linux 2.4.7 problems

Assar Westerlund assar at stacken.kth.se
Thu Jul 26 02:21:24 CEST 2001


Stefan Stonjek <stefan at zenith102.desy.de> writes:
> Today I tried to compile arla 0.35.5 for a Linux 2.4.7 kernel and
> encounterd a problem.
> 
> In xfs/linux/xfs_dev.c arla want's to write to:
> 
> current->dumpable = 1;
> 
> This staement does not compile with the new Linux kernel since
> 
> linux/include/linux/sched.h
> 
> is changed. The variable "dumpable" moved from "task_struct" to
> "mm_struct". Since "task_struct" includes two pointers to "mm_struct" it
> is not clear to me which "dumpable" variable will take over.

Thanks for noting this problem.  I think we should simply start using
the prctl() syscall instead, thereby hopefully being less dependent on
the kernel versions.  A patch for doing that is included below.
You'll need to re-run autoheader and autoconf after having applied it.

/assar



Index: configure.in
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/configure.in,v
retrieving revision 1.496
diff -u -w -r1.496 configure.in
--- configure.in	2001/07/15 01:07:54	1.496
+++ configure.in	2001/07/26 00:13:42
@@ -708,6 +708,7 @@
 		sys/mutex.h			\
 		sys/param.h			\
 		sys/poll.h			\
+		sys/prctl.h			\
 		sys/proc.h			\
 		sys/queue.h			\
 		sys/resource.h			\
Index: arlad/arla_local.h
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/arlad/arla_local.h,v
retrieving revision 1.63
diff -u -w -r1.63 arla_local.h
--- arlad/arla_local.h	2001/04/30 00:04:18	1.63
+++ arlad/arla_local.h	2001/07/26 00:14:11
@@ -78,6 +78,9 @@
 #ifdef HAVE_SYS_MOUNT_H
 #include <sys/mount.h>
 #endif
+#ifdef HAVE_SYS_PRCTL_H
+#include <sys/prctl.h>
+#endif
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <netdb.h>
Index: arlad/arlad.c
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/arlad/arlad.c,v
retrieving revision 1.9
diff -u -w -r1.9 arlad.c
--- arlad/arlad.c	2001/04/30 00:04:21	1.9
+++ arlad/arlad.c	2001/07/26 00:14:16
@@ -148,6 +148,10 @@
     signal (SIGHUP, sighup);
     umask (S_IRWXG|S_IRWXO); /* 077 */
 
+#if defined(HAVE_SYS_PRCTL_H) && defined(PR_SET_DUMPABLE)
+    prctl(PR_SET_DUMPABLE, 1);
+#endif
+
     xfs_message_init ();
     kernel_opendevice (device_file);
     
Index: xfs/linux/xfs_dev.c
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/xfs/linux/xfs_dev.c,v
retrieving revision 1.80
diff -u -w -r1.80 xfs_dev.c
--- xfs/linux/xfs_dev.c	2001/05/15 04:23:22	1.80
+++ xfs/linux/xfs_dev.c	2001/07/26 00:05:03
@@ -420,8 +420,6 @@
 
     XFSDEB(XDEBDEV, ("xfs_devwrite\n"));
     
-    current->dumpable = 1;
-
     if (count > MAX_XMSG_SIZE)
 	count = MAX_XMSG_SIZE;
     copy_from_user(chan->message_buffer, buf, count);





More information about the Arla-drinkers mailing list