rpms/kernel-xen-2.6/F-7 linux-2.6-xen-privcmd-use-nopfn.patch, NONE, 1.1 kernel-xen.spec, 1.52, 1.53

Eduardo Habkost (ehabkost) fedora-extras-commits at redhat.com
Mon Oct 8 13:39:53 UTC 2007


Author: ehabkost

Update of /cvs/pkgs/rpms/kernel-xen-2.6/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19265

Modified Files:
	kernel-xen.spec 
Added Files:
	linux-2.6-xen-privcmd-use-nopfn.patch 
Log Message:
Add patch to fix BUG_ON() Oops caused by privcmd (bug #323031)


linux-2.6-xen-privcmd-use-nopfn.patch:

--- NEW FILE linux-2.6-xen-privcmd-use-nopfn.patch ---
From: Eduardo Habkost <ehabkost at redhat.com>
Subject: Use the nopfn() handler where nopage() was being used on privcmd

This patch changes the privcmd mmap vma to use nopfn(), that is supposed
to be used for VM_PFNMAP vmas.

This should make the program receive a SIGBUS (as the original nopage() handler
was supposed to do) instead of causing an Oops.

Signed-off-by: Eduardo Habkost <ehabkost at redhat.com
---
Index: linux-2.6.21-xen-3.1.0/drivers/xen/privcmd/privcmd.c
===================================================================
--- linux-2.6.21-xen-3.1.0.orig/drivers/xen/privcmd/privcmd.c
+++ linux-2.6.21-xen-3.1.0/drivers/xen/privcmd/privcmd.c
@@ -216,15 +216,14 @@ static int privcmd_ioctl(struct inode *i
 }
 
 #ifndef HAVE_ARCH_PRIVCMD_MMAP
-static struct page *privcmd_nopage(struct vm_area_struct *vma,
-				   unsigned long address,
-				   int *type)
+unsigned long privcmd_nopfn(struct vm_area_struct *vma,
+				unsigned long address)
 {
-	return NOPAGE_SIGBUS;
+	return NOPFN_SIGBUS;
 }
 
 static struct vm_operations_struct privcmd_vm_ops = {
-	.nopage = privcmd_nopage
+	.nopfn = privcmd_nopfn
 };
 
 static int privcmd_mmap(struct file * file, struct vm_area_struct * vma)


Index: kernel-xen.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/F-7/kernel-xen.spec,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- kernel-xen.spec	28 Sep 2007 14:31:49 -0000	1.52
+++ kernel-xen.spec	8 Oct 2007 13:39:18 -0000	1.53
@@ -412,6 +412,8 @@
 Patch965: linux-2.6-xen-sleazy-fpu-i386.patch
 Patch966: linux-2.6-xen-sleazy-fpu-x86_64.patch
 
+# Fix VM_PFNMAP BUG_ON()
+Patch967: linux-2.6-xen-privcmd-use-nopfn.patch
 
 
 #
@@ -953,6 +955,7 @@
 %patch964 -p1
 %patch965 -p1
 %patch966 -p1
+%patch967 -p1
 %endif
 
 #
@@ -2076,6 +2079,9 @@
 #  - tux.
 
 %changelog
+* Mon Oct 08 2007 Eduardo Habkost <ehabkost at redhat.com>
+- Add patch to fix BUG_ON() Oops caused by privcmd (bug #323031)
+
 * Thu Sep 27 2007 Eduardo Habkost <ehabkost at redhat.com>
 - Fix 3w-9xxx to use PCI resources properly and work under Xen (bug #309611)
 




More information about the fedora-extras-commits mailing list