## Automatically generated incremental diff
## From:   linux-2.4.25-rc3
## To:     linux-2.4.25-rc4
## Robot:  $Id: make-incremental-diff,v 1.12 2004/01/06 07:19:36 hpa Exp $

diff -urN linux-2.4.25-rc3/Makefile linux-2.4.25-rc4/Makefile
--- linux-2.4.25-rc3/Makefile	2004-02-17 20:13:55.000000000 -0800
+++ linux-2.4.25-rc4/Makefile	2004-02-17 20:14:03.000000000 -0800
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 25
-EXTRAVERSION = -rc3
+EXTRAVERSION = -rc4
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux-2.4.25-rc3/arch/sparc64/kernel/sys_sparc32.c linux-2.4.25-rc4/arch/sparc64/kernel/sys_sparc32.c
--- linux-2.4.25-rc3/arch/sparc64/kernel/sys_sparc32.c	2003-11-28 10:26:19.000000000 -0800
+++ linux-2.4.25-rc4/arch/sparc64/kernel/sys_sparc32.c	2004-02-17 20:14:10.000000000 -0800
@@ -4454,6 +4454,9 @@
 
 extern asmlinkage long sys32_sysctl(struct __sysctl_args32 *args)
 {
+#ifndef CONFIG_SYSCTL
+	return -ENOSYS;
+#else
 	struct __sysctl_args32 tmp;
 	int error;
 	size_t oldlen, *oldlenp = NULL;
@@ -4488,4 +4491,5 @@
 		copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused));
 	}
 	return error;
+#endif
 }
diff -urN linux-2.4.25-rc3/mm/mremap.c linux-2.4.25-rc4/mm/mremap.c
--- linux-2.4.25-rc3/mm/mremap.c	2004-01-05 05:53:56.000000000 -0800
+++ linux-2.4.25-rc4/mm/mremap.c	2004-02-17 20:14:21.000000000 -0800
@@ -258,16 +258,20 @@
 		if ((addr <= new_addr) && (addr+old_len) > new_addr)
 			goto out;
 
-		do_munmap(current->mm, new_addr, new_len);
+		ret = do_munmap(current->mm, new_addr, new_len);
+		if (ret && new_len)
+			goto out;
 	}
 
 	/*
 	 * Always allow a shrinking remap: that just unmaps
 	 * the unnecessary pages..
 	 */
-	ret = addr;
 	if (old_len >= new_len) {
-		do_munmap(current->mm, addr+new_len, old_len - new_len);
+		ret = do_munmap(current->mm, addr+new_len, old_len - new_len);
+		if (ret && old_len != new_len)
+			goto out;
+		ret = addr;
 		if (!(flags & MREMAP_FIXED) || (new_addr == addr))
 			goto out;
 	}
diff -urN linux-2.4.25-rc3/net/ipv4/netfilter/ip_tables.c linux-2.4.25-rc4/net/ipv4/netfilter/ip_tables.c
--- linux-2.4.25-rc3/net/ipv4/netfilter/ip_tables.c	2004-02-17 20:13:59.000000000 -0800
+++ linux-2.4.25-rc4/net/ipv4/netfilter/ip_tables.c	2004-02-17 20:14:22.000000000 -0800
@@ -1476,7 +1476,8 @@
 
 	duprintf("tcp_match: finding option\n");
 	/* If we don't have the whole header, drop packet. */
-	if (tcp->doff * 4 > datalen) {
+	if (tcp->doff * 4 < sizeof(struct tcphdr) ||
+	    tcp->doff * 4 > datalen) {
 		*hotdrop = 1;
 		return 0;
 	}
diff -urN linux-2.4.25-rc3/net/ipv6/netfilter/ip6_tables.c linux-2.4.25-rc4/net/ipv6/netfilter/ip6_tables.c
--- linux-2.4.25-rc3/net/ipv6/netfilter/ip6_tables.c	2003-08-25 04:44:44.000000000 -0700
+++ linux-2.4.25-rc4/net/ipv6/netfilter/ip6_tables.c	2004-02-17 20:14:22.000000000 -0800
@@ -1543,7 +1543,8 @@
 
 	duprintf("tcp_match: finding option\n");
 	/* If we don't have the whole header, drop packet. */
-	if (tcp->doff * 4 > datalen) {
+	if (tcp->doff * 4 < sizeof(struct tcphdr) ||
+	    tcp->doff * 4 > datalen) {
 		*hotdrop = 1;
 		return 0;
 	}
