rpms/kernel/devel linux-2.6-skb_copy_and_csum_datagram_iovec.patch, NONE, 1.1 linux-2.6-x86-fix-hang-on-C7.patch, NONE, 1.1 linux-2.6-xen-fix-bootup.patch, NONE, 1.1 kernel.spec, 1.149, 1.150

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Thu Sep 6 19:41:59 UTC 2007


Author: cebbert

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

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-skb_copy_and_csum_datagram_iovec.patch 
	linux-2.6-x86-fix-hang-on-C7.patch 
	linux-2.6-xen-fix-bootup.patch 
Log Message:
* Thu Sep 06 2007 Chuck Ebbert <cebbert at redhat.com>
- fix Xen boot problem
- fix boot hang on Via C7 CPU
- Fix oops in networking code


linux-2.6-skb_copy_and_csum_datagram_iovec.patch:

--- NEW FILE linux-2.6-skb_copy_and_csum_datagram_iovec.patch ---
[NET]: Do not dereference iov if length is zero

When msg_iovlen is zero we shouldn't try to dereference
msg_iov.  Right now the only thing that tries to do so
is skb_copy_and_csum_datagram_iovec.  Since the total
length should also be zero if msg_iovlen is zero, it's
sufficient to check the total length there and simply
return if it's zero.

Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
---
diff --git a/net/core/datagram.c b/net/core/datagram.c
--- a/net/core/datagram.c
+++ b/net/core/datagram.c
@@ -450,6 +450,9 @@ int skb_copy_and_csum_datagram_iovec(str
 	__wsum csum;
 	int chunk = skb->len - hlen;
 
+	if (!chunk)
+		return 0;
+
 	/* Skip filled elements.
 	 * Pretty silly, look at memcpy_toiovec, though 8)
 	 */

linux-2.6-x86-fix-hang-on-C7.patch:

--- NEW FILE linux-2.6-x86-fix-hang-on-C7.patch ---
The CLFLUSH for the modified code line in text_poke was supposed
to speed up CPU recovery. Unfortunately it seems to cause hangs
on some VIA C3s (at least on VIA Esther Model 10 Stepping 9)
Remove it.

Thanks to Stefan Becker for reporting/testing.

Signed-off-by: Andi Kleen <ak at suse.de>

---
 arch/i386/kernel/alternative.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Index: linux/arch/i386/kernel/alternative.c
===================================================================
--- linux.orig/arch/i386/kernel/alternative.c
+++ linux/arch/i386/kernel/alternative.c
@@ -445,8 +445,6 @@ void __kprobes text_poke(void *addr, uns
 {
 	memcpy(addr, opcode, len);
 	sync_core();
-	/* Not strictly needed, but can speed CPU recovery up. Ignore cross cacheline
-	   case. */
-	if (cpu_has_clflush)
-		asm("clflush (%0) " :: "r" (addr) : "memory");
+	/* Could also do a CLFLUSH here to speed up CPU recovery; but
+	   that causes hangs on some VIA CPUs. */
 }

linux-2.6-xen-fix-bootup.patch:

--- NEW FILE linux-2.6-xen-fix-bootup.patch ---
commit 92ea189254b87727d6be407558d9c18fed0937bb
Author: Christian Ehrhardt <lk at c--e.de>
Date:   Mon Sep 3 20:32:38 2007 +0200

    [x86 setup] Work around bug in Xen HVM
    
    Apparently XEN does not keep the contents of the 48-bit gdt_48 data
    structure that is passed to lgdt in the XEN machine state. Instead it
    appears to save the _address_ of the 48-bit descriptor
    somewhere. Unfortunately this data happens to reside on the stack and
    is probably no longer availiable at the time of the actual protected
    mode jump.
    
    This is Xen bug but given that there is a one-line patch to work
    around this problem, the linux kernel should probably do this.  My fix
    is to make the gdt_48 description in setup_gdt static (in setup_idt
    this is already the case). This allows the kernel to boot under
    Xen HVM again.
    
    Signed-off-by: Christian Ehrhardt <lk at c--e.de>
    Signed-off-by: H. Peter Anvin <hpa at zytor.com>

diff --git a/arch/i386/boot/pm.c b/arch/i386/boot/pm.c
index 6be9ca8..f7958f1 100644
--- a/arch/i386/boot/pm.c
+++ b/arch/i386/boot/pm.c
@@ -122,7 +122,7 @@ static void setup_gdt(void)
 		/* DS: data, read/write, 4 GB, base 0 */
 		[GDT_ENTRY_BOOT_DS] = GDT_ENTRY(0xc093, 0, 0xfffff),
 	};
-	struct gdt_ptr gdt;
+	static struct gdt_ptr gdt;
 
 	gdt.len = sizeof(boot_gdt)-1;
 	gdt.ptr = (u32)&boot_gdt + (ds() << 4);


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -r1.149 -r1.150
--- kernel.spec	6 Sep 2007 17:34:27 -0000	1.149
+++ kernel.spec	6 Sep 2007 19:41:27 -0000	1.150
@@ -667,6 +667,9 @@
 Patch1506: linux-2.6-xfs-fix-filestreams-free-func-cast.patch
 Patch1508: linux-2.6-firewire-multi-lun.patch
 Patch1515: linux-2.6-lirc.patch
+Patch1520: linux-2.6-xen-fix-bootup.patch
+Patch1525: linux-2.6-skb_copy_and_csum_datagram_iovec.patch
+Patch1530: linux-2.6-x86-fix-hang-on-C7.patch
 
 %endif
 
@@ -1190,6 +1193,14 @@
 # http://www.lirc.org/
 ApplyPatch linux-2.6-lirc.patch
 
+# Fix Xen bootup
+ApplyPatch linux-2.6-xen-fix-bootup.patch
+
+# fix oops in with sunrpc
+ApplyPatch linux-2.6-skb_copy_and_csum_datagram_iovec.patch
+
+# fix hang on C7 CPU
+ApplyPatch linux-2.6-x86-fix-hang-on-C7.patch
 
 # END OF PATCH APPLICATIONS
 
@@ -1783,6 +1794,11 @@
 
 %changelog
 * Thu Sep 06 2007 Chuck Ebbert <cebbert at redhat.com>
+- fix Xen boot problem
+- fix boot hang on Via C7 CPU
+- Fix oops in networking code
+
+* Thu Sep 06 2007 Chuck Ebbert <cebbert at redhat.com>
 - exec-shield: enable interrupts in do_iret_error()
 
 * Wed Sep 05 2007 Chuck Ebbert <cebbert at redhat.com>




More information about the fedora-extras-commits mailing list