rpms/blcr-kmod/devel put_fs_struct.patch00, NONE, 1.1 blcr-kmod.spec, 1.14, 1.15

Neal Becker nbecker at rpmfusion.org
Sun Jun 7 15:29:01 CEST 2009


Author: nbecker

Update of /cvs/free/rpms/blcr-kmod/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv8573

Modified Files:
	blcr-kmod.spec 
Added Files:
	put_fs_struct.patch00 
Log Message:
Add patch for 2.6.29.x



--- NEW FILE put_fs_struct.patch00 ---
This file is a patch against BLCR-0.8.1 to resolve the following error,
reported by Neal Becker, that is seen with the 2.6.29.x kernels used in fc11:

  CC [M]  
/builddir/build/BUILD/blcr-0.8.1/_kmod_build_2.6.29.3-140.fc11.i686.PAE/cr_module/kbuild/cr_dest_file.o
/builddir/build/BUILD/blcr-0.8.1/_kmod_build_2.6.29.3-140.fc11.i686.PAE/cr_module/kbuild/cr_dest_file.c: 
In function 'cr_loc_free':
/builddir/build/BUILD/blcr-0.8.1/_kmod_build_2.6.29.3-140.fc11.i686.PAE/cr_module/kbuild/cr_dest_file.c:189: 
error: implicit declaration of function 'put_fs_struct'


It is my intention that if a 0.8.2 release of BLCR is made, this fix will
be included.  However, it is possible that this may not appear in an
official BLCR release until 0.9.0 in the Fall.

- Paul H. Hargrove

Signed-off-by: Paul H. Hargrove <PHHargrove at lbl.gov>

Index: acinclude.m4
===================================================================
RCS file: /var/local/cvs/lbnl_cr/acinclude.m4,v
retrieving revision 1.177.14.1
diff -u -r1.177.14.1 acinclude.m4
--- acinclude.m4	14 Feb 2009 01:48:55 -0000	1.177.14.1
+++ acinclude.m4	5 Jun 2009 23:49:40 -0000
@@ -1116,7 +1116,7 @@
 # If not found, leave CR_K${TYPE}_${symbol} undefined
 # If found to be exported, "#define CR_K${TYPE}_${symbol} 0"
 # If found not to be exported, "#define CR_K${TYPE}_${symbol} 0x<value>"
-# On return, cr_addr is set (or undefined) the same way.
+# On return, cr_addr is set (or empty) the same way.
 AC_DEFUN([CR_FIND_KSYM],[
   AC_REQUIRE([CR_LINUX_SYMTAB])
   AC_MSG_CHECKING([[kernel symbol table for $1]])
@@ -1135,6 +1135,7 @@
       ],[int x = sizeof(&$1);],[cr_cvname="Y$cr_cvname"],[cr_cvname="N$cr_cvname"])
     fi
   ])
+  cr_addr=''
   if test -z "$cr_cvname"; then
     cr_result='not found'
   else
Index: configure.ac
===================================================================
RCS file: /var/local/cvs/lbnl_cr/configure.ac,v
retrieving revision 1.410.2.6
diff -u -r1.410.2.6 configure.ac
--- configure.ac	25 Mar 2009 21:44:17 -0000	1.410.2.6
+++ configure.ac	5 Jun 2009 23:49:40 -0000
@@ -1472,9 +1472,17 @@
 CR_FIND_KSYM([sys_prctl],[CODE],
 	[extern asmlinkage long sys_prctl(int option, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5);])
 
+CR_FIND_KSYM([copy_fs_struct],[CODE])
+CR_FIND_KSYM([put_fs_struct],[CODE])
+if test -z "$cr_addr"; then
+  CR_FIND_KSYM([free_fs_struct],[CODE])
+  if test -z "$cr_addr"; then
+    AC_MSG_ERROR([failed to find either symbol put_fs_struct or free_fs_struct])
+  fi
+fi
+
 # For blcr
 CR_FIND_KSYM([set_fs_pwd],[CODE])
-CR_FIND_KSYM([put_fs_struct],[CODE])
 # For vmadump4
 CR_FIND_KSYM([sys_mremap],[CODE],
 	[extern asmlinkage unsigned long sys_mremap(unsigned long addr, unsigned long old_len, unsigned long new_len, unsigned long flags, unsigned long new_addr);])
Index: cr_module/cr_dest_file.c
===================================================================
RCS file: /var/local/cvs/lbnl_cr/cr_module/cr_dest_file.c,v
retrieving revision 1.27
diff -u -r1.27 cr_dest_file.c
--- cr_module/cr_dest_file.c	23 Nov 2008 20:29:14 -0000	1.27
+++ cr_module/cr_dest_file.c	5 Jun 2009 23:49:40 -0000
@@ -186,7 +186,7 @@
 
 	// For directory:
 	if (loc->fs) {
-		put_fs_struct(loc->fs);
+		cr_free_fs_struct(loc->fs);
 	}
 }
 
Index: cr_module/cr_kcompat.h
===================================================================
RCS file: /var/local/cvs/lbnl_cr/cr_module/cr_kcompat.h,v
retrieving revision 1.247.8.1
diff -u -r1.247.8.1 cr_kcompat.h
--- cr_module/cr_kcompat.h	7 Feb 2009 00:15:57 -0000	1.247.8.1
+++ cr_module/cr_kcompat.h	5 Jun 2009 23:49:40 -0000
@@ -556,4 +556,15 @@
   #define cr_task_cred(_t)	(_t)
 #endif
 
+#if defined(CR_KCODE_put_fs_struct)
+  static __inline__ void cr_free_fs_struct(struct fs_struct *fs) {
+    CRI_ASSERT(atomic_read(&fs->count) == 1);
+    put_fs_struct(fs);
+  }
+#elif defined(CR_KCODE_free_fs_struct)
+  #define cr_free_fs_struct free_fs_struct
+#else
+ #error "no cr_free_fs_struct() definition"
+#endif
+
 #endif /* _CR_KCOMPAT_H */


Index: blcr-kmod.spec
===================================================================
RCS file: /cvs/free/rpms/blcr-kmod/devel/blcr-kmod.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- blcr-kmod.spec	28 May 2009 05:30:55 -0000	1.14
+++ blcr-kmod.spec	7 Jun 2009 13:29:01 -0000	1.15
@@ -7,7 +7,7 @@
 
 Name:           blcr-kmod
 Version:        0.8.1
-Release:        1%{?dist}.7
+Release:        2%{?dist}.7
 Summary:        Kernel module (kmod) for Berkeley Lab Checkpoint/Restart for Linux
 
 %define distname blcr-%{version}
@@ -16,10 +16,8 @@
 License:        GPLv2+
 URL:            http://www.blcr.org/
 Source0:        http://ftg.lbl.gov/CheckpointRestart/downloads/%{distname}.tar.gz
-# Patch0 is to remove -fno-stack-protector (provided by upstream)
-# Patch0 requires running autoreconf
-#Patch0:		blcr-stackcheck.patch
-#Patch1:		linux_2.6.29-rc3.patch00
+# Patch to build on 2.6.29.x
+Patch0:		put_fs_struct.patch00
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 #Generic i386 is NOT supported
@@ -48,11 +46,11 @@
 
 %setup -q -c -T -a 0 -n %{distname}
 # apply patches and do other stuff here
-#pushd %{distname}
-#%patch1 -p0
+pushd %{distname}
+%patch0 -p0
 # patch changed configure.ac
 #autoreconf --force --install
-#popd
+popd
 
 for kernel_version  in %{?kernel_versions} ; do
     cp -a %{distname} _kmod_build_${kernel_version%%___*}



More information about the rpmfusion-commits mailing list