rpms/kernel-xen-2.6/devel linux-2.6-xen-privcmd-use-nopfn.patch, NONE, 1.1 kernel-xen.spec, 1.63, 1.64

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


Author: ehabkost

Update of /cvs/pkgs/rpms/kernel-xen-2.6/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19369

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/devel/kernel-xen.spec,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- kernel-xen.spec	28 Sep 2007 15:32:34 -0000	1.63
+++ kernel-xen.spec	8 Oct 2007 13:42:25 -0000	1.64
@@ -470,6 +470,9 @@
 Patch963: linux-2.6-xen-sleazy-fpu-i386.patch
 Patch964: linux-2.6-xen-sleazy-fpu-x86_64.patch
 
+# Fix VM_PFNMAP BUG_ON()
+Patch965: linux-2.6-xen-privcmd-use-nopfn.patch
+
 #
 # Patches 1000 to 5000 are reserved for bugfixes to drivers and filesystems
 #
@@ -960,6 +963,7 @@
 %patch962 -p1
 %patch963 -p1
 %patch964 -p1
+%patch965 -p1
 %endif
 
 
@@ -2366,6 +2370,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