linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ralf@linux-mips.org
Date: Tue, 05 Apr 2005 20:10:06 +0100
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ralf@ftp.linux-mips.org 05/04/05 20:09:59

Modified files:
        .              : Tag: linux_2_4 MAINTAINERS Makefile 
        Documentation  : Tag: linux_2_4 Changes 
        arch/i386/kernel: Tag: linux_2_4 Makefile earlyquirk.c i387.c 
        arch/ia64      : Tag: linux_2_4 defconfig vmlinux.lds.S 
        arch/ia64/configs: Tag: linux_2_4 dig generic numa ski zx1 
        arch/ia64/hp/common: Tag: linux_2_4 sba_iommu.c 
        arch/ia64/kernel: Tag: linux_2_4 entry.S ivt.S palinfo.c 
                          process.c unwind.c 
        arch/sparc     : Tag: linux_2_4 Makefile 
        arch/sparc/boot: Tag: linux_2_4 Makefile 
        arch/sparc/kernel: Tag: linux_2_4 sun4d_smp.c 
        arch/sparc/mm  : Tag: linux_2_4 io-unit.c 
        arch/sparc/prom: Tag: linux_2_4 ranges.c 
        arch/sparc64/kernel: Tag: linux_2_4 sys_sparc32.c 
        arch/x86_64/ia32: Tag: linux_2_4 fpu32.c 
        drivers/char   : Tag: linux_2_4 pty.c softdog.c 
        drivers/char/agp: Tag: linux_2_4 agp.h agpgart_be.c 
        drivers/md     : Tag: linux_2_4 raid1.c 
        drivers/net    : Tag: linux_2_4 eepro100.c ppp_async.c tg3.c 
                         tg3.h tun.c 
        drivers/sbus   : Tag: linux_2_4 sbus.c 
        drivers/sbus/char: Tag: linux_2_4 zs.c 
        drivers/usb/serial: Tag: linux_2_4 mct_u232.c usbserial.c 
        fs             : Tag: linux_2_4 binfmt_elf.c namei.c 
        fs/ext2        : Tag: linux_2_4 dir.c 
        fs/ext3        : Tag: linux_2_4 fsync.c super.c 
        fs/hpfs        : Tag: linux_2_4 hpfs.h hpfs_fn.h 
        fs/isofs       : Tag: linux_2_4 inode.c rock.c 
        fs/jbd         : Tag: linux_2_4 commit.c journal.c transaction.c 
        fs/jfs         : Tag: linux_2_4 inode.c namei.c 
        fs/lockd       : Tag: linux_2_4 svclock.c 
        include/asm-i386: Tag: linux_2_4 acpi.h 
        include/asm-ia64: Tag: linux_2_4 pgtable.h 
        include/asm-sparc: Tag: linux_2_4 asi.h oplib.h winmacro.h 
        include/linux  : Tag: linux_2_4 agp_backend.h jbd.h kernel.h 
        include/linux/netfilter_ipv4: Tag: linux_2_4 ip_conntrack.h 
                                      ip_tables.h 
        include/linux/netfilter_ipv6: Tag: linux_2_4 ip6_tables.h 
        mm             : Tag: linux_2_4 filemap.c memory.c page_alloc.c 
        net/atm        : Tag: linux_2_4 addr.c addr.h 
        net/bluetooth  : Tag: linux_2_4 af_bluetooth.c 
        net/ipv4       : Tag: linux_2_4 tcp_input.c 
        net/ipv4/ipvs  : Tag: linux_2_4 ip_vs_core.c ip_vs_wrr.c 
        net/ipv4/netfilter: Tag: linux_2_4 ip_conntrack_core.c 
                            ip_conntrack_standalone.c ip_nat_core.c 
                            ip_nat_helper.c ip_tables.c ipt_LOG.c 
                            ipt_MASQUERADE.c ipt_recent.c 
        net/ipv6/netfilter: Tag: linux_2_4 ip6_tables.c 
        net/netlink    : Tag: linux_2_4 af_netlink.c 

Log message:
        Merge with Linux 2.4.30.

diff -urN linux/MAINTAINERS linux/MAINTAINERS
--- linux/MAINTAINERS   2005/03/18 12:13:19     1.76.2.32
+++ linux/MAINTAINERS   2005/04/05 19:09:54     1.76.2.33
@@ -531,11 +531,10 @@
 S:     Maintained
 
 CRYPTO API
-P:     James Morris
-M:     jmorris@intercode.com.au
+P:     Herbert Xu
+M:     herbert@gondor.apana.org.au
 P:     David S. Miller
 M:     davem@davemloft.net
-W      http://samba.org/~jamesm/crypto/
 L:     linux-kernel@vger.kernel.org
 S:     Maintained
 
diff -urN linux/Makefile linux/Makefile
--- linux/Makefile      2005/03/18 12:13:19     1.119.2.34
+++ linux/Makefile      2005/04/05 19:09:54     1.119.2.35
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 30
-EXTRAVERSION = -pre3
+EXTRAVERSION =
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux/Documentation/Changes linux/Documentation/Changes
--- linux/Documentation/Changes 2005/03/18 12:13:19     1.49.2.7
+++ linux/Documentation/Changes 2005/04/05 19:09:54     1.49.2.8
@@ -52,7 +52,7 @@
 o  Gnu make               3.77                    # make --version
 o  binutils               2.9.1.0.25              # ld -v
 o  util-linux             2.10o                   # fdformat --version
-o  modutils               2.4.10                   # insmod -V
+o  modutils               2.4.14                   # insmod -V
 o  e2fsprogs              1.25                    # tune2fs
 o  jfsutils               1.0.12                  # fsck.jfs -V
 o  reiserfsprogs          3.6.3                   # reiserfsck -V 2>&1|grep 
reiserfsprogs
diff -urN linux/arch/i386/kernel/Makefile linux/arch/i386/kernel/Makefile
--- linux/arch/i386/kernel/Makefile     2005/03/18 12:13:20     1.26.2.4
+++ linux/arch/i386/kernel/Makefile     2005/04/05 19:09:54     1.26.2.5
@@ -36,11 +36,11 @@
 obj-$(CONFIG_X86_CPUID)                += cpuid.o
 obj-$(CONFIG_MICROCODE)                += microcode.o
 obj-$(CONFIG_APM)              += apm.o
-obj-$(CONFIG_ACPI_BOOT)                += acpi.o
+obj-$(CONFIG_ACPI_BOOT)                += acpi.o earlyquirk.o
 obj-$(CONFIG_ACPI_SLEEP)       += acpi_wakeup.o
 obj-$(CONFIG_SMP)              += smp.o smpboot.o trampoline.o
 obj-$(CONFIG_X86_LOCAL_APIC)   += mpparse.o apic.o nmi.o
-obj-$(CONFIG_X86_IO_APIC)      += io_apic.o earlyquirk.o
+obj-$(CONFIG_X86_IO_APIC)      += io_apic.o 
 obj-$(CONFIG_X86_VISWS_APIC)   += visws_apic.o
 obj-$(CONFIG_EDD)              += edd.o
 
diff -urN linux/arch/i386/kernel/earlyquirk.c 
linux/arch/i386/kernel/earlyquirk.c
--- linux/arch/i386/kernel/Attic/earlyquirk.c   2005/03/18 12:13:20     1.1.2.1
+++ linux/arch/i386/kernel/Attic/earlyquirk.c   2005/04/05 19:09:54     1.1.2.2
@@ -8,7 +8,7 @@
 #include <asm/pci-direct.h>
 #include <asm/acpi.h>
 
-#ifdef CONFIG_ACPI
+#ifdef CONFIG_ACPI_BOOT
 static int __init check_bridge(int vendor, int device) 
 {
        /* According to Nvidia all timer overrides are bogus. Just ignore
diff -urN linux/arch/i386/kernel/i387.c linux/arch/i386/kernel/i387.c
--- linux/arch/i386/kernel/i387.c       2003/08/13 17:19:08     1.6.2.2
+++ linux/arch/i386/kernel/i387.c       2005/04/05 19:09:54     1.6.2.3
@@ -128,16 +128,17 @@
 static inline unsigned long twd_fxsr_to_i387( struct i387_fxsave_struct 
*fxsave )
 {
        struct _fpxreg *st = NULL;
+       unsigned long tos = (fxsave->swd >> 11) & 7;
        unsigned long twd = (unsigned long) fxsave->twd;
        unsigned long tag;
        unsigned long ret = 0xffff0000;
        int i;
 
-#define FPREG_ADDR(f, n)       ((char *)&(f)->st_space + (n) * 16);
+#define FPREG_ADDR(f, n)       ((void *)&(f)->st_space + (n) * 16);
 
        for ( i = 0 ; i < 8 ; i++ ) {
                if ( twd & 0x1 ) {
-                       st = (struct _fpxreg *) FPREG_ADDR( fxsave, i );
+                       st = FPREG_ADDR( fxsave, (i - tos) & 7 );
 
                        switch ( st->exponent & 0x7fff ) {
                        case 0x7fff:
diff -urN linux/arch/ia64/defconfig linux/arch/ia64/defconfig
--- linux/arch/ia64/defconfig   2004/11/19 00:28:31     1.9.2.10
+++ linux/arch/ia64/defconfig   2005/04/05 19:09:54     1.9.2.11
@@ -125,11 +125,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
@@ -174,6 +169,7 @@
 # CONFIG_CISS_MONITOR_THREAD is not set
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_SX8 is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
@@ -232,10 +228,12 @@
 #
 # CONFIG_BLK_DEV_HD_IDE is not set
 # CONFIG_BLK_DEV_HD is not set
+# CONFIG_BLK_DEV_IDE_SATA is not set
 CONFIG_BLK_DEV_IDEDISK=y
 CONFIG_IDEDISK_MULTI_MODE=y
 # CONFIG_IDEDISK_STROKE is not set
 # CONFIG_BLK_DEV_IDECS is not set
+# CONFIG_BLK_DEV_DELKIN is not set
 CONFIG_BLK_DEV_IDECD=y
 # CONFIG_BLK_DEV_IDETAPE is not set
 CONFIG_BLK_DEV_IDEFLOPPY=y
@@ -347,6 +345,18 @@
 # CONFIG_SCSI_AM53C974 is not set
 # CONFIG_SCSI_MEGARAID is not set
 # CONFIG_SCSI_MEGARAID2 is not set
+# CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_SATA_AHCI is not set
+# CONFIG_SCSI_SATA_SVW is not set
+# CONFIG_SCSI_ATA_PIIX is not set
+# CONFIG_SCSI_SATA_NV is not set
+# CONFIG_SCSI_SATA_PROMISE is not set
+# CONFIG_SCSI_SATA_SX4 is not set
+# CONFIG_SCSI_SATA_SIL is not set
+# CONFIG_SCSI_SATA_SIS is not set
+# CONFIG_SCSI_SATA_ULI is not set
+# CONFIG_SCSI_SATA_VIA is not set
+# CONFIG_SCSI_SATA_VITESSE is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
diff -urN linux/arch/ia64/vmlinux.lds.S linux/arch/ia64/vmlinux.lds.S
--- linux/arch/ia64/Attic/vmlinux.lds.S 2003/08/13 17:19:08     1.8.2.4
+++ linux/arch/ia64/Attic/vmlinux.lds.S 2005/04/05 19:09:54     1.8.2.5
@@ -7,6 +7,10 @@
 OUTPUT_FORMAT("elf64-ia64-little")
 OUTPUT_ARCH(ia64)
 ENTRY(phys_start)
+PHDRS {
+  code   PT_LOAD;
+  data   PT_LOAD;
+}
 SECTIONS
 {
   /* Sections to be discarded */
@@ -23,6 +27,7 @@
   v = PAGE_OFFSET;     /* this symbol is here to make debugging easier... */
   phys_start = _start - PAGE_OFFSET;
 
+  code : { } :code
   . = KERNEL_START;
 
   _text = .;
@@ -142,6 +147,7 @@
   .kstrtab : AT(ADDR(.kstrtab) - PAGE_OFFSET)
        { *(.kstrtab) }
 
+  data : { } :data
   .data : AT(ADDR(.data) - PAGE_OFFSET)
        { *(.data) *(.gnu.linkonce.d*) CONSTRUCTORS }
 
@@ -165,6 +171,7 @@
   . = ALIGN(64 / 8);
   _end = .;
 
+  code : { } :code
   /* Stabs debugging sections.  */
   .stab 0 : { *(.stab) }
   .stabstr 0 : { *(.stabstr) }
diff -urN linux/arch/ia64/configs/dig linux/arch/ia64/configs/dig
--- linux/arch/ia64/configs/Attic/dig   2004/08/14 18:38:45     1.1.2.6
+++ linux/arch/ia64/configs/Attic/dig   2005/04/05 19:09:54     1.1.2.7
@@ -125,11 +125,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
@@ -174,6 +169,7 @@
 # CONFIG_CISS_MONITOR_THREAD is not set
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_SX8 is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
@@ -232,10 +228,12 @@
 #
 # CONFIG_BLK_DEV_HD_IDE is not set
 # CONFIG_BLK_DEV_HD is not set
+# CONFIG_BLK_DEV_IDE_SATA is not set
 CONFIG_BLK_DEV_IDEDISK=y
 CONFIG_IDEDISK_MULTI_MODE=y
 # CONFIG_IDEDISK_STROKE is not set
 # CONFIG_BLK_DEV_IDECS is not set
+# CONFIG_BLK_DEV_DELKIN is not set
 CONFIG_BLK_DEV_IDECD=y
 # CONFIG_BLK_DEV_IDETAPE is not set
 CONFIG_BLK_DEV_IDEFLOPPY=y
@@ -346,6 +344,18 @@
 # CONFIG_SCSI_AM53C974 is not set
 # CONFIG_SCSI_MEGARAID is not set
 # CONFIG_SCSI_MEGARAID2 is not set
+# CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_SATA_AHCI is not set
+# CONFIG_SCSI_SATA_SVW is not set
+# CONFIG_SCSI_ATA_PIIX is not set
+# CONFIG_SCSI_SATA_NV is not set
+# CONFIG_SCSI_SATA_PROMISE is not set
+# CONFIG_SCSI_SATA_SX4 is not set
+# CONFIG_SCSI_SATA_SIL is not set
+# CONFIG_SCSI_SATA_SIS is not set
+# CONFIG_SCSI_SATA_ULI is not set
+# CONFIG_SCSI_SATA_VIA is not set
+# CONFIG_SCSI_SATA_VITESSE is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
diff -urN linux/arch/ia64/configs/generic linux/arch/ia64/configs/generic
--- linux/arch/ia64/configs/Attic/generic       2004/08/14 18:38:45     1.1.2.6
+++ linux/arch/ia64/configs/Attic/generic       2005/04/05 19:09:54     1.1.2.7
@@ -125,11 +125,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
@@ -174,6 +169,7 @@
 # CONFIG_CISS_MONITOR_THREAD is not set
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_SX8 is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
@@ -232,10 +228,12 @@
 #
 # CONFIG_BLK_DEV_HD_IDE is not set
 # CONFIG_BLK_DEV_HD is not set
+# CONFIG_BLK_DEV_IDE_SATA is not set
 CONFIG_BLK_DEV_IDEDISK=y
 CONFIG_IDEDISK_MULTI_MODE=y
 # CONFIG_IDEDISK_STROKE is not set
 # CONFIG_BLK_DEV_IDECS is not set
+# CONFIG_BLK_DEV_DELKIN is not set
 CONFIG_BLK_DEV_IDECD=y
 # CONFIG_BLK_DEV_IDETAPE is not set
 CONFIG_BLK_DEV_IDEFLOPPY=y
@@ -347,6 +345,18 @@
 # CONFIG_SCSI_AM53C974 is not set
 # CONFIG_SCSI_MEGARAID is not set
 # CONFIG_SCSI_MEGARAID2 is not set
+# CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_SATA_AHCI is not set
+# CONFIG_SCSI_SATA_SVW is not set
+# CONFIG_SCSI_ATA_PIIX is not set
+# CONFIG_SCSI_SATA_NV is not set
+# CONFIG_SCSI_SATA_PROMISE is not set
+# CONFIG_SCSI_SATA_SX4 is not set
+# CONFIG_SCSI_SATA_SIL is not set
+# CONFIG_SCSI_SATA_SIS is not set
+# CONFIG_SCSI_SATA_ULI is not set
+# CONFIG_SCSI_SATA_VIA is not set
+# CONFIG_SCSI_SATA_VITESSE is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
diff -urN linux/arch/ia64/configs/numa linux/arch/ia64/configs/numa
--- linux/arch/ia64/configs/Attic/numa  2004/08/14 18:38:45     1.1.2.4
+++ linux/arch/ia64/configs/Attic/numa  2005/04/05 19:09:54     1.1.2.5
@@ -127,11 +127,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
@@ -176,6 +171,7 @@
 # CONFIG_CISS_MONITOR_THREAD is not set
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_SX8 is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
@@ -234,10 +230,12 @@
 #
 # CONFIG_BLK_DEV_HD_IDE is not set
 # CONFIG_BLK_DEV_HD is not set
+# CONFIG_BLK_DEV_IDE_SATA is not set
 CONFIG_BLK_DEV_IDEDISK=y
 CONFIG_IDEDISK_MULTI_MODE=y
 # CONFIG_IDEDISK_STROKE is not set
 # CONFIG_BLK_DEV_IDECS is not set
+# CONFIG_BLK_DEV_DELKIN is not set
 CONFIG_BLK_DEV_IDECD=y
 # CONFIG_BLK_DEV_IDETAPE is not set
 CONFIG_BLK_DEV_IDEFLOPPY=y
@@ -349,6 +347,18 @@
 # CONFIG_SCSI_AM53C974 is not set
 # CONFIG_SCSI_MEGARAID is not set
 # CONFIG_SCSI_MEGARAID2 is not set
+# CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_SATA_AHCI is not set
+# CONFIG_SCSI_SATA_SVW is not set
+# CONFIG_SCSI_ATA_PIIX is not set
+# CONFIG_SCSI_SATA_NV is not set
+# CONFIG_SCSI_SATA_PROMISE is not set
+# CONFIG_SCSI_SATA_SX4 is not set
+# CONFIG_SCSI_SATA_SIL is not set
+# CONFIG_SCSI_SATA_SIS is not set
+# CONFIG_SCSI_SATA_ULI is not set
+# CONFIG_SCSI_SATA_VIA is not set
+# CONFIG_SCSI_SATA_VITESSE is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
diff -urN linux/arch/ia64/configs/ski linux/arch/ia64/configs/ski
--- linux/arch/ia64/configs/Attic/ski   2004/08/14 18:38:45     1.1.2.5
+++ linux/arch/ia64/configs/Attic/ski   2005/04/05 19:09:54     1.1.2.6
@@ -92,11 +92,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
@@ -166,6 +161,18 @@
 # CONFIG_SCSI_AM53C974 is not set
 # CONFIG_SCSI_MEGARAID is not set
 # CONFIG_SCSI_MEGARAID2 is not set
+# CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_SATA_AHCI is not set
+# CONFIG_SCSI_SATA_SVW is not set
+# CONFIG_SCSI_ATA_PIIX is not set
+# CONFIG_SCSI_SATA_NV is not set
+# CONFIG_SCSI_SATA_PROMISE is not set
+# CONFIG_SCSI_SATA_SX4 is not set
+# CONFIG_SCSI_SATA_SIL is not set
+# CONFIG_SCSI_SATA_SIS is not set
+# CONFIG_SCSI_SATA_ULI is not set
+# CONFIG_SCSI_SATA_VIA is not set
+# CONFIG_SCSI_SATA_VITESSE is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_DTC3280 is not set
diff -urN linux/arch/ia64/configs/zx1 linux/arch/ia64/configs/zx1
--- linux/arch/ia64/configs/Attic/zx1   2004/08/14 18:38:45     1.1.2.6
+++ linux/arch/ia64/configs/Attic/zx1   2005/04/05 19:09:54     1.1.2.7
@@ -126,11 +126,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
@@ -175,6 +170,7 @@
 # CONFIG_CISS_MONITOR_THREAD is not set
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_SX8 is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_RAM is not set
@@ -233,10 +229,12 @@
 #
 # CONFIG_BLK_DEV_HD_IDE is not set
 # CONFIG_BLK_DEV_HD is not set
+# CONFIG_BLK_DEV_IDE_SATA is not set
 CONFIG_BLK_DEV_IDEDISK=y
 CONFIG_IDEDISK_MULTI_MODE=y
 # CONFIG_IDEDISK_STROKE is not set
 # CONFIG_BLK_DEV_IDECS is not set
+# CONFIG_BLK_DEV_DELKIN is not set
 CONFIG_BLK_DEV_IDECD=y
 # CONFIG_BLK_DEV_IDETAPE is not set
 CONFIG_BLK_DEV_IDEFLOPPY=y
@@ -347,6 +345,18 @@
 # CONFIG_SCSI_AM53C974 is not set
 # CONFIG_SCSI_MEGARAID is not set
 # CONFIG_SCSI_MEGARAID2 is not set
+# CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_SATA_AHCI is not set
+# CONFIG_SCSI_SATA_SVW is not set
+# CONFIG_SCSI_ATA_PIIX is not set
+# CONFIG_SCSI_SATA_NV is not set
+# CONFIG_SCSI_SATA_PROMISE is not set
+# CONFIG_SCSI_SATA_SX4 is not set
+# CONFIG_SCSI_SATA_SIL is not set
+# CONFIG_SCSI_SATA_SIS is not set
+# CONFIG_SCSI_SATA_ULI is not set
+# CONFIG_SCSI_SATA_VIA is not set
+# CONFIG_SCSI_SATA_VITESSE is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
diff -urN linux/arch/ia64/hp/common/sba_iommu.c 
linux/arch/ia64/hp/common/sba_iommu.c
--- linux/arch/ia64/hp/common/sba_iommu.c       2004/02/20 01:22:12     1.6.2.6
+++ linux/arch/ia64/hp/common/sba_iommu.c       2005/04/05 19:09:54     1.6.2.7
@@ -447,6 +447,14 @@
 
        ASSERT(((unsigned long) ioc->res_hint & (sizeof(unsigned long) - 1UL)) 
== 0);
        ASSERT(res_ptr < res_end);
+
+       /*
+        * N.B.  REO/Grande defect AR2305 can cause TLB fetch timeouts
+        * if a TLB entry is purged while in use.  sba_mark_invalid()
+        * purges IOTLB entries in power-of-two sizes, so we also
+        * allocate IOVA space in power-of-two sizes.
+        */
+       bits_wanted = 1UL << get_iovp_order(bits_wanted << PAGE_SHIFT);
        if (bits_wanted > (BITS_PER_LONG/2)) {
                /* Search word at a time - no mask needed */
                for(; res_ptr < res_end; ++res_ptr) {
@@ -583,6 +591,7 @@
        unsigned long *res_ptr = (unsigned long *) &((ioc)->res_map[ridx & 
~RESMAP_IDX_MASK]);
 
        int bits_not_wanted = size >> iovp_shift;
+       bits_not_wanted = 1UL << get_iovp_order(bits_not_wanted << PAGE_SHIFT);
 
        /* 3-bits "bit" address plus 2 (or 3) bits for "byte" == bit in word */
        unsigned long m = RESMAP_MASK(bits_not_wanted) << (pide & 
(BITS_PER_LONG - 1));
diff -urN linux/arch/ia64/kernel/entry.S linux/arch/ia64/kernel/entry.S
--- linux/arch/ia64/kernel/entry.S      2003/11/17 01:07:31     1.15.2.5
+++ linux/arch/ia64/kernel/entry.S      2005/04/05 19:09:54     1.15.2.6
@@ -49,8 +49,11 @@
         * setup a null register window frame.
         */
 ENTRY(ia64_execve)
-       .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(3)
-       alloc loc1=ar.pfs,3,2,4,0
+       /*
+        * Allocate 8 input registers since ptrace() may clobber them
+        */
+       .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)
+       alloc loc1=ar.pfs,8,2,4,0
        /* Leave from kernel and restore all pt_regs to correspending 
registers. This is special 
         * because ia32 application needs scratch registers after return from 
execve.
         */
@@ -94,8 +97,11 @@
 END(ia64_execve)
 
 GLOBAL_ENTRY(sys_clone2)
-       .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2)
-       alloc r16=ar.pfs,3,2,4,0
+       /*
+        * Allocate 8 input registers since ptrace() may clobber them
+        */
+       .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)
+       alloc r16=ar.pfs,8,2,4,0
        DO_SAVE_SWITCH_STACK
        mov loc0=rp
        mov loc1=r16                            // save ar.pfs across do_fork
@@ -113,8 +119,11 @@
 END(sys_clone2)
 
 GLOBAL_ENTRY(sys_clone)
-       .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2)
-       alloc r16=ar.pfs,2,2,4,0
+       /*
+        * Allocate 8 input registers since ptrace() may clobber them
+        */
+       .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)
+       alloc r16=ar.pfs,8,2,4,0
        DO_SAVE_SWITCH_STACK
        mov loc0=rp
        mov loc1=r16                            // save ar.pfs across do_fork
@@ -1091,7 +1100,10 @@
 
 ENTRY(sys_rt_sigreturn)
        PT_REGS_UNWIND_INFO(0)
-       alloc r2=ar.pfs,0,0,1,0
+       /*
+        * Allocate 8 input registers since ptrace() may clobber them
+        */
+       alloc r2=ar.pfs,8,0,1,0
        .prologue
        PT_REGS_SAVES(16)
        adds sp=-16,sp
@@ -1443,3 +1455,4 @@
        data8 ia64_ni_syscall
        data8 ia64_ni_syscall
        data8 ia64_ni_syscall
+       data8 ia64_ni_syscall
diff -urN linux/arch/ia64/kernel/ivt.S linux/arch/ia64/kernel/ivt.S
--- linux/arch/ia64/kernel/ivt.S        2004/02/20 01:22:12     1.11.2.4
+++ linux/arch/ia64/kernel/ivt.S        2005/04/05 19:09:54     1.11.2.5
@@ -48,6 +48,7 @@
 #include <asm/ptrace.h>
 #include <asm/system.h>
 #include <asm/unistd.h>
+#include <asm/errno.h>
 
 #if 1
 # define PSR_DEFAULT_BITS      psr.ac
@@ -678,15 +679,29 @@
        mov r1=IA64_KR(CURRENT);                /* r1 = current (physical) */
        ;;
        invala;
+
+       /* adjust return address so we skip over the break instruction: */
+
+       extr.u r8=r29,41,2                      // extract ei field from cr.ipsr
        extr.u r16=r29,32,2;                    /* extract psr.cpl */
        ;;
+       cmp.eq p6,p7=2,r8                       // isr.ei==2?
        cmp.eq pKern,pUser=r0,r16;              /* are we in kernel mode 
already? (psr.cpl==0) */
-       /* switch from user to kernel RBS: */
        ;;
+(p6)   mov r8=0                                // clear ei to 0
+(p6)   adds r28=16,r28                         // switch cr.iip to next bundle 
cr.ipsr.ei wrapped
+(p7)   adds r8=1,r8                            // increment ei to next slot
+       ;;
+       dep r29=r8,r29,41,2                     // insert new ei into cr.ipsr
+       ;;
+
+       /* switch from user to kernel RBS: */
        mov r30=r0
        MINSTATE_START_SAVE_MIN_VIRT
        br.call.sptk.many b7=ia64_syscall_setup
        ;;
+       // p10==true means out registers are more than 8 or r15's Nat is true
+(p10)  br.cond.spnt.many ia64_ret_from_syscall
        mov r3=255
        adds r15=-1024,r15                      // r15 contains the syscall 
number---subtract 1024
        adds r2=IA64_TASK_PTRACE_OFFSET,r13     // r2 = &current->ptrace
@@ -704,28 +719,9 @@
        ld8 r2=[r2]                             // r2 = current->ptrace
        mov b6=r16
 
-       // arrange things so we skip over break instruction when returning:
-
-       adds r16=PT(CR_IPSR)+16,sp                      // get pointer to 
cr_ipsr
-       adds r17=PT(CR_IIP)+16,sp                       // get pointer to cr_iip
        ;;
-       ld8 r18=[r16]                           // fetch cr_ipsr
        tbit.z p8,p0=r2,PT_TRACESYS_BIT         // (current->ptrace & 
PF_TRACESYS) == 0?
        ;;
-       ld8 r19=[r17]                           // fetch cr_iip
-       extr.u r20=r18,41,2                     // extract ei field
-       ;;
-       cmp.eq p6,p7=2,r20                      // isr.ei==2?
-       adds r19=16,r19                         // compute address of next 
bundle
-       ;;
-(p6)   mov r20=0                               // clear ei to 0
-(p7)   adds r20=1,r20                          // increment ei to next slot
-       ;;
-(p6)   st8 [r17]=r19                           // store new cr.iip if 
cr.isr.ei wrapped around
-       dep r18=r20,r18,41,2                    // insert new ei into cr.isr
-       ;;
-       st8 [r16]=r18                           // store new value for cr.isr
-
 (p8)   br.call.sptk.many b6=b6                 // ignore this return addr
 
        br.cond.sptk ia64_trace_syscall
@@ -807,8 +803,11 @@
         *      - psr.ic enabled, interrupts restored
         *      -  r1: kernel's gp
         *      -  r3: preserved (same as on entry)
+        *      -  r8: -EINVAL if p10 is true
         *      - r12: points to kernel stack
         *      - r13: points to current task
+        *      - p10: TRUE if syscall is invoked with more than 8 out
+        *             registers or r15's Nat is true
         *      - p15: TRUE if interrupts need to be re-enabled
         *      - ar.fpsr: set to kernel settings
         */
@@ -825,12 +824,15 @@
        st8 [r17]=r28,16;       /* save cr.iip */
        mov r28=b0;                   
 (pKern) mov r18=r0;             /* make sure r18 isn't NaT */
+       extr.u r11=r19,7,7      /* get sol of ar.pfs */
+       and r8=0x7f,r19         /* get sof of ar.pfs */
        ;;
 (p9)   mov in1=-1
        tnat.nz p10,p0=in2
        st8 [r16]=r30,16;       /* save cr.ifs */
        st8 [r17]=r25,16;       /* save ar.unat */
 (pUser) sub r18=r18,r22;       /* r18=RSE.ndirty*8 */
+       add r11=8,r11
        ;;
        st8 [r16]=r26,16;       /* save ar.pfs */
        st8 [r17]=r27,16;       /* save ar.rsc */
@@ -870,12 +872,13 @@
 .mem.offset 8,0;                st8.spill [r17]=r15,16;
        adds r12=-16,r1;        /* switch to kernel memory stack (with 16 bytes 
of scratch) */
        ;;
+       cmp.lt p10,p9=r11,r8    /* frame size can't be more than local+8 */
        mov r13=IA64_KR(CURRENT);       /* establish `current' */
        movl r1=__gp;           /* establish kernel global pointer */
        ;;
        MINSTATE_END_SAVE_MIN_VIRT
 
-       tnat.nz p9,p0=r15
+(p9)   tnat.nz p10,p0=r15
 (p8)   mov in7=-1
        ssm psr.ic | PSR_DEFAULT_BITS
        movl r17=FPSR_DEFAULT
@@ -883,10 +886,10 @@
        ;;
        srlz.i                                  // guarantee that interruption 
collection is on
        cmp.eq pSys,pNonSys=r0,r0               // set pSys=1, pNonSys=0
-(p9)   mov r15=-1
 (p15)  ssm psr.i               // restore psr.i
        mov.m ar.fpsr=r17
        stf8 [r8]=f1            // ensure pt_regs.r8 != 0 (see 
handle_syscall_error)
+(p10)  mov r8=-EINVAL
        br.ret.sptk.many b7
 END(ia64_syscall_setup)
 
diff -urN linux/arch/ia64/kernel/palinfo.c linux/arch/ia64/kernel/palinfo.c
--- linux/arch/ia64/kernel/palinfo.c    2004/08/14 18:38:45     1.6.2.5
+++ linux/arch/ia64/kernel/palinfo.c    2005/04/05 19:09:54     1.6.2.6
@@ -473,7 +473,7 @@
        "Enable CMCI promotion",
        "Enable MCA to BINIT promotion",
        "Enable MCA promotion",
-       "Enable BEER promotion"
+       "Enable BERR promotion"
 };
 
 
diff -urN linux/arch/ia64/kernel/process.c linux/arch/ia64/kernel/process.c
--- linux/arch/ia64/kernel/process.c    2003/11/17 01:07:31     1.13.2.6
+++ linux/arch/ia64/kernel/process.c    2005/04/05 19:09:54     1.13.2.7
@@ -485,7 +485,7 @@
        return 1;       /* f0-f31 are always valid so we always return 1 */
 }
 
-asmlinkage long
+long
 sys_execve (char *filename, char **argv, char **envp, struct pt_regs *regs)
 {
        int error;
diff -urN linux/arch/ia64/kernel/unwind.c linux/arch/ia64/kernel/unwind.c
--- linux/arch/ia64/kernel/unwind.c     2004/08/14 18:38:46     1.10.2.7
+++ linux/arch/ia64/kernel/unwind.c     2005/04/05 19:09:54     1.10.2.8
@@ -48,6 +48,8 @@
 
 #define MIN(a,b)       ((a) < (b) ? (a) : (b))
 #define p5             5
+#define PRED_USER_STACK pUser
+#define p3             3       /* for pUser */
 
 #define UNW_LOG_CACHE_SIZE     7       /* each unw_script is ~256 bytes in 
size */
 #define UNW_CACHE_SIZE         (1 << UNW_LOG_CACHE_SIZE)
@@ -1916,24 +1918,30 @@
 int
 unw_unwind_to_user (struct unw_frame_info *info)
 {
-       unsigned long ip;
+       unsigned long ip, sp, pr = 0;
 
        while (unw_unwind(info) >= 0) {
-               if (unw_get_rp(info, &ip) < 0) {
-                       unw_get_ip(info, &ip);
-                       UNW_DPRINT(0, "unwind.%s: failed to read return pointer 
(ip=0x%lx)\n",
-                                  __FUNCTION__, ip);
-                       return -1;
+               unw_get_sp(info, &sp);
+               if ((long)((unsigned long)info->task + IA64_STK_OFFSET - sp)
+                   < IA64_PT_REGS_SIZE) {
+                       UNW_DPRINT(0, "unwind.%s: ran off the top of the kernel 
stack\n",
+                                  __FUNCTION__);
+                       break;
                }
-               /*
-                * We don't have unwind info for the gate page, so we consider 
that part
-                * of user-space for the purpose of unwinding.
-                */
-               if (ip < GATE_ADDR + PAGE_SIZE)
+               if (unw_is_intr_frame(info) &&
+                   (pr & (1UL << PRED_USER_STACK)))
                        return 0;
+               if (unw_get_pr (info, &pr) < 0) {
+                       unw_get_rp(info, &ip);
+                       UNW_DPRINT(0, "unwind.%s: failed to read "
+                                  "predicate register (ip=0x%lx)\n",
+                               __FUNCTION__, ip);
+                       return -1;
+               }
        }
        unw_get_ip(info, &ip);
-       UNW_DPRINT(0, "unwind.%s: failed to unwind to user-level (ip=0x%lx)\n", 
__FUNCTION__, ip);
+       UNW_DPRINT(0, "unwind.%s: failed to unwind to user-level (ip=0x%lx)\n",
+                  __FUNCTION__, ip);
        return -1;
 }
 EXPORT_SYMBOL(unw_unwind_to_user);
diff -urN linux/arch/sparc/Makefile linux/arch/sparc/Makefile
--- linux/arch/sparc/Makefile   2004/08/14 18:38:47     1.14.2.1
+++ linux/arch/sparc/Makefile   2005/04/05 19:09:55     1.14.2.2
@@ -45,6 +45,7 @@
        $(TOPDIR)/arch/sparc/lib/lib.a
 
 # This one has to come last
+_dir_arch/sparc/boot : $(patsubst %, _dir_%, $(SUBDIRS))
 SUBDIRS += arch/sparc/boot
 CORE_FILES_NO_BTFIX := $(CORE_FILES)
 CORE_FILES += arch/sparc/boot/btfix.o
diff -urN linux/arch/sparc/boot/Makefile linux/arch/sparc/boot/Makefile
--- linux/arch/sparc/boot/Makefile      2002/06/26 22:35:28     1.6.4.1
+++ linux/arch/sparc/boot/Makefile      2005/04/05 19:09:55     1.6.4.2
@@ -26,11 +26,14 @@
 BTLIBS := $(CORE_FILES_NO_BTFIX) $(FILESYSTEMS) \
        $(DRIVERS) $(NETWORKS)
 
-# I wanted to make this depend upon BTOBJS so that a parallel
-# build would work, but this fails because $(HEAD) cannot work
-# properly as it will cause head.o to be built with the implicit
-# rules not the ones in kernel/Makefile.  Someone please fix. --DaveM
-vmlinux.o: dummy
+GENFILES := include/linux/version.h include/linux/compile.h $(foreach dirname, 
$(CORE_FILES_NO_BTFIX), _dir_$(dir $(dirname)))
+.PHONY : $(GENFILES)
+GENFILES += $(BTOBJS)
+
+$(GENFILES):
+       $(MAKE) -C $(TOPDIR) $@
+
+vmlinux.o: $(GENFILES)
        $(LD) -r $(patsubst %,$(TOPDIR)/%,$(BTOBJS)) \
                --start-group \
                $(patsubst %,$(TOPDIR)/%,$(BTLIBS)) \
diff -urN linux/arch/sparc/kernel/sun4d_smp.c 
linux/arch/sparc/kernel/sun4d_smp.c
--- linux/arch/sparc/kernel/sun4d_smp.c 2003/11/17 01:07:34     1.18.2.2
+++ linux/arch/sparc/kernel/sun4d_smp.c 2005/04/05 19:09:55     1.18.2.3
@@ -132,8 +132,7 @@
                
        /* Fix idle thread fields. */
        __asm__ __volatile__("ld [%0], %%g6\n\t"
-                            "sta %%g6, [%%g0] %1\n\t"
-                            : : "r" (&current_set[cpuid]), "i" 
(ASI_M_VIKING_TMP2)
+                            : : "r" (&current_set[cpuid])
                             : "memory" /* paranoid */);
 
        cpu_leds[cpuid] = 0x9;
@@ -494,25 +493,18 @@
 
 void __init smp4d_blackbox_current(unsigned *addr)
 {
-       /* We have a nice Linux current register :) */
-       int rd = addr[1] & 0x3e000000;
+       int rd = *addr & 0x3e000000;
        
-       addr[0] = 0x10800006;                   /* b .+24 */
-       addr[1] = 0xc0800820 | rd;              /* lda [%g0] ASI_M_VIKING_TMP2, 
reg */
+       addr[0] = 0xc0800800 | rd;              /* lda [%g0] ASI_M_VIKING_TMP1, 
reg */
+       addr[2] = 0x81282002 | rd | (rd >> 11); /* sll reg, 2, reg */
+       addr[4] = 0x01000000;                   /* nop */
 }
 
 void __init sun4d_init_smp(void)
 {
        int i;
-       extern unsigned int patchme_store_new_current[];
        extern unsigned int t_nmi[], linux_trap_ipi15_sun4d[], 
linux_trap_ipi15_sun4m[];
 
-       /* Store current into Linux current register :) */
-       __asm__ __volatile__("sta %%g6, [%%g0] %0" : : "i"(ASI_M_VIKING_TMP2));
-       
-       /* Patch switch_to */
-       patchme_store_new_current[0] = (patchme_store_new_current[0] & 
0x3e000000) | 0xc0a00820;
-       
        /* Patch ipi15 trap table */
        t_nmi[1] = t_nmi[1] + (linux_trap_ipi15_sun4d - linux_trap_ipi15_sun4m);
        
diff -urN linux/arch/sparc/mm/io-unit.c linux/arch/sparc/mm/io-unit.c
--- linux/arch/sparc/mm/io-unit.c       2003/01/11 17:53:11     1.11.2.1
+++ linux/arch/sparc/mm/io-unit.c       2005/04/05 19:09:55     1.11.2.2
@@ -188,7 +188,7 @@
                        pte_t *ptep;
                        long i;
 
-                       pgdp = pgd_offset(init_task.mm, addr);
+                       pgdp = pgd_offset(&init_mm, addr);
                        pmdp = pmd_offset(pgdp, addr);
                        ptep = pte_offset(pmdp, addr);
 
diff -urN linux/arch/sparc/prom/ranges.c linux/arch/sparc/prom/ranges.c
--- linux/arch/sparc/prom/ranges.c      2002/02/26 05:59:09     1.6.4.1
+++ linux/arch/sparc/prom/ranges.c      2005/04/05 19:09:55     1.6.4.2
@@ -34,7 +34,7 @@
        }
 }
 
-static void
+void
 prom_adjust_ranges(struct linux_prom_ranges *ranges1, int nranges1,
                   struct linux_prom_ranges *ranges2, int nranges2)
 {
diff -urN linux/arch/sparc64/kernel/sys_sparc32.c 
linux/arch/sparc64/kernel/sys_sparc32.c
--- linux/arch/sparc64/kernel/sys_sparc32.c     2005/03/18 12:13:24     
1.60.2.15
+++ linux/arch/sparc64/kernel/sys_sparc32.c     2005/04/05 19:09:55     
1.60.2.16
@@ -829,7 +829,7 @@
                                               (struct sembuf *)A(ptr),
                                               second,
                                               (const struct timespec32 *)
-                                              A(third));
+                                              A(fifth));
                case SEMGET:
                        err = sys_semget((key_t)first, (int)second,
                                         (int)third);
diff -urN linux/arch/x86_64/ia32/fpu32.c linux/arch/x86_64/ia32/fpu32.c
--- linux/arch/x86_64/ia32/fpu32.c      2003/07/05 03:23:35     1.1.2.3
+++ linux/arch/x86_64/ia32/fpu32.c      2005/04/05 19:09:55     1.1.2.4
@@ -28,16 +28,17 @@
 static inline unsigned long twd_fxsr_to_i387(struct i387_fxsave_struct *fxsave)
 {
        struct _fpxreg *st = NULL;
+       unsigned long tos = (fxsave->swd >> 11) & 7;
        unsigned long twd = (unsigned long) fxsave->twd;
        unsigned long tag;
        unsigned long ret = 0xffff0000;
        int i;
 
-#define FPREG_ADDR(f, n)       ((char *)&(f)->st_space + (n) * 16);
+#define FPREG_ADDR(f, n)       ((void *)&(f)->st_space + (n) * 16);
 
        for (i = 0 ; i < 8 ; i++) {
                if (twd & 0x1) {
-                       st = (struct _fpxreg *) FPREG_ADDR( fxsave, i );
+                       st = FPREG_ADDR( fxsave, (i - tos) & 7 );
 
                        switch (st->exponent & 0x7fff) {
                        case 0x7fff:
diff -urN linux/drivers/char/pty.c linux/drivers/char/pty.c
--- linux/drivers/char/pty.c    2004/12/27 04:13:43     1.16.2.3
+++ linux/drivers/char/pty.c    2005/04/05 19:09:55     1.16.2.4
@@ -218,13 +218,15 @@
 static int pty_chars_in_buffer(struct tty_struct *tty)
 {
        struct tty_struct *to = tty->link;
+       ssize_t (*chars_in_buffer)(struct tty_struct *);
        int count;
 
-       if (!to || !to->ldisc.chars_in_buffer)
+       /* We should get the line discipline lock for "tty->link" */
+       if (!to || !(chars_in_buffer = to->ldisc.chars_in_buffer))
                return 0;
 
        /* The ldisc must report 0 if no characters available to be read */
-       count = to->ldisc.chars_in_buffer(to);
+       count = chars_in_buffer(to);
 
        if (tty->driver.subtype == PTY_TYPE_SLAVE) return count;
 
diff -urN linux/drivers/char/softdog.c linux/drivers/char/softdog.c
--- linux/drivers/char/Attic/softdog.c  2003/11/17 01:07:36     1.18.2.4
+++ linux/drivers/char/Attic/softdog.c  2005/04/05 19:09:55     1.18.2.5
@@ -124,7 +124,7 @@
         *      Shut off the timer.
         *      Lock it in if it's a module and we set nowayout
         */
-       if (expect_close || nowayout == 0) {
+       if (expect_close && nowayout == 0) {
                del_timer(&watchdog_ticktock);
        } else {
                printk(KERN_CRIT "SOFTDOG: WDT device closed unexpectedly.  WDT 
will not stop!\n");
diff -urN linux/drivers/char/agp/agp.h linux/drivers/char/agp/agp.h
--- linux/drivers/char/agp/agp.h        2004/11/19 00:28:37     1.16.2.10
+++ linux/drivers/char/agp/agp.h        2005/04/05 19:09:55     1.16.2.11
@@ -217,6 +217,12 @@
 #ifndef PCI_DEVICE_ID_INTEL_915_G_1
 #define PCI_DEVICE_ID_INTEL_915_G_1    0x2582
 #endif
+#ifndef PCI_DEVICE_ID_INTEL_915_GM_0
+#define PCI_DEVICE_ID_INTEL_915_GM_0   0x2590
+#endif
+#ifndef PCI_DEVICE_ID_INTEL_915_GM_1
+#define PCI_DEVICE_ID_INTEL_915_GM_1   0x2592
+#endif
 #ifndef PCI_DEVICE_ID_INTEL_820_0
 #define PCI_DEVICE_ID_INTEL_820_0       0x2500
 #endif
diff -urN linux/drivers/char/agp/agpgart_be.c 
linux/drivers/char/agp/agpgart_be.c
--- linux/drivers/char/agp/Attic/agpgart_be.c   2004/11/19 00:28:37     
1.23.2.15
+++ linux/drivers/char/agp/Attic/agpgart_be.c   2005/04/05 19:09:55     
1.23.2.16
@@ -1170,14 +1170,14 @@
        {128, 32768, 5},
        /* The 64M mode still requires a 128k gatt */
        {64, 16384, 5},
-       /* For I915G */
+       /* For I915G/I915GM */
        {256, 65536, 6}
 };
 
 static struct _intel_i830_private {
        struct pci_dev *i830_dev;   /* device one */
        volatile u8 *registers;
-       volatile u32 *gtt;      /* I915G */
+       volatile u32 *gtt;      /* I915G/I915GM */
        int gtt_entries;
 } intel_i830_private;
 
@@ -1220,14 +1220,16 @@
                        break;
                case I915_GMCH_GMS_STOLEN_48M:
                        /* Check it's really I915 */
-                       if (agp_bridge.dev->device == 
PCI_DEVICE_ID_INTEL_915_G_0)
+                       if (agp_bridge.dev->device == 
PCI_DEVICE_ID_INTEL_915_G_0 ||
+                           agp_bridge.dev->device == 
PCI_DEVICE_ID_INTEL_915_GM_0)
                                gtt_entries = MB(48) - KB(size);
                        else
                                gtt_entries = 0;
                        break;
                case I915_GMCH_GMS_STOLEN_64M:
                        /* Check it's really I915 */
-                       if (agp_bridge.dev->device == 
PCI_DEVICE_ID_INTEL_915_G_0)
+                       if (agp_bridge.dev->device == 
PCI_DEVICE_ID_INTEL_915_G_0 ||
+                           agp_bridge.dev->device == 
PCI_DEVICE_ID_INTEL_915_GM_0)
                                gtt_entries = MB(64) - KB(size);
                        else
                                gtt_entries = 0;
@@ -1287,7 +1289,8 @@
        num_entries = size->num_entries;
        agp_bridge.gatt_table_real = 0;
 
-       if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0) {
+       if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0 ||
+           agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_GM_0) {
                pci_read_config_dword(intel_i830_private.i830_dev,
                                                        I915_MMADDR,&temp);
                pci_read_config_dword(intel_i830_private.i830_dev,
@@ -1331,7 +1334,8 @@
 
        values = A_SIZE_FIX(agp_bridge.aperture_sizes);
 
-       if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0) {
+       if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0 ||
+           agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_GM_0) {
                u32 temp, offset = 0;
                pci_read_config_dword(intel_i830_private.i830_dev,
                                                        I915_GMADDR,&temp);
@@ -1375,7 +1379,8 @@
 
        current_size = A_SIZE_FIX(agp_bridge.current_size);
 
-       if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0)
+       if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0 ||
+           agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_GM_0)
                pci_read_config_dword(intel_i830_private.i830_dev,
                                                        I915_GMADDR,&temp);
        else
@@ -1392,7 +1397,8 @@
        CACHE_FLUSH();
 
        if (agp_bridge.needs_scratch_page == TRUE) {
-               if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0) {
+               if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0 ||
+                   agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_GM_0) {
                        for (i = intel_i830_private.gtt_entries; i < 
current_size->num_entries; i++)
                                OUTREG32(intel_i830_private.gtt, i, 
agp_bridge.scratch_page);
                } else {
@@ -1406,7 +1412,8 @@
 
 static void intel_i830_cleanup(void)
 {
-       if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0)
+       if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0 ||
+           agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_GM_0)
                iounmap((void *)intel_i830_private.gtt);
 
        iounmap((void *) intel_i830_private.registers);
@@ -1441,7 +1448,8 @@
 
        CACHE_FLUSH();
 
-       if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0) {
+       if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0 ||
+           agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_GM_0) {
                for (i = 0, j = pg_start; i < mem->page_count; i++, j++)
                        OUTREG32(intel_i830_private.gtt, j, 
agp_bridge.mask_memory(mem->memory[i], mem->type));
        } else {
@@ -1467,7 +1475,8 @@
                return (-EINVAL);
        }
 
-       if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0) {
+       if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0 ||
+           agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_GM_0) {
                for (i = pg_start; i < (mem->page_count + pg_start); i++)
                        OUTREG32(intel_i830_private.gtt, i, 
agp_bridge.scratch_page);
        } else {
@@ -6270,6 +6279,13 @@
                "915G",
                 intel_845_setup },
 
+       { PCI_DEVICE_ID_INTEL_915_GM_0,
+               PCI_VENDOR_ID_INTEL,
+               INTEL_I915_GM,
+               "Intel(R)",
+               "915GM",
+                intel_845_setup },
+
        { PCI_DEVICE_ID_INTEL_840_0,
                PCI_VENDOR_ID_INTEL,
                INTEL_I840,
@@ -7021,6 +7037,33 @@
                        agp_bridge.type = INTEL_I810;
                        return intel_i830_setup(i810_dev);
 
+               case PCI_DEVICE_ID_INTEL_915_GM_0:
+                       i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL,
+                                       PCI_DEVICE_ID_INTEL_915_GM_1, NULL);
+                       if(i810_dev && PCI_FUNC(i810_dev->devfn) != 0) {
+                               i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL,
+                                       PCI_DEVICE_ID_INTEL_915_GM_1, i810_dev);
+                       }
+
+                       if (i810_dev == NULL) {
+                                /* 
+                                 * We probably have a 915GM chipset
+                                 * with an external graphics
+                                 * card. It will be initialized later 
+                                 */
+                               printk(KERN_ERR PFX "Detected an "
+                                      "Intel(R) 915GM, but could not"
+                                      " find the"
+                                      " secondary device. Assuming a "
+                                      "non-integrated video card.\n");
+                               agp_bridge.type = INTEL_I915_GM;
+                               break;
+                       }
+                       printk(KERN_INFO PFX "Detected an Intel(R) "
+                                  "915GM Chipset.\n");
+                       agp_bridge.type = INTEL_I810;
+                       return intel_i830_setup(i810_dev);
+
                default:
                        break;
                }
diff -urN linux/drivers/md/raid1.c linux/drivers/md/raid1.c
--- linux/drivers/md/raid1.c    2004/11/19 00:28:38     1.10.2.8
+++ linux/drivers/md/raid1.c    2005/04/05 19:09:56     1.10.2.9
@@ -891,6 +891,8 @@
        mdp_disk_t *failed_desc, *spare_desc, *added_desc;
        mdk_rdev_t *spare_rdev, *failed_rdev;
 
+       if (conf->resync_mirrors)
+               return 1; /* Cannot do any diskops during a resync */
 
        switch (state) {
        case DISKOP_SPARE_ACTIVE:
@@ -1333,6 +1335,8 @@
 
        up(&mddev->recovery_sem);
        raid1_shrink_buffers(conf);
+
+       md_recover_arrays(); /* incase we are degraded and a spare is available 
*/
 }
 
 /*
@@ -1741,10 +1745,6 @@
        conf->last_used = j;
 
 
-       if (conf->working_disks != sb->raid_disks) {
-               printk(KERN_ALERT "raid1: md%d, not all disks are operational 
-- trying to recover array\n", mdidx(mddev));
-               start_recovery = 1;
-       }
 
        {
                const char * name = "raid1d";
@@ -1756,7 +1756,7 @@
                }
        }
 
-       if (!start_recovery && !(sb->state & (1 << MD_SB_CLEAN)) &&
+       if (!(sb->state & (1 << MD_SB_CLEAN)) &&
            (conf->working_disks > 1)) {
                const char * name = "raid1syncd";
 
@@ -1769,6 +1769,9 @@
                printk(START_RESYNC, mdidx(mddev));
                conf->resync_mirrors = 1;
                md_wakeup_thread(conf->resync_thread);
+       } else if (conf->working_disks != sb->raid_disks) {
+               printk(KERN_ALERT "raid1: md%d, not all disks are operational 
-- trying to recover array\n", mdidx(mddev));
+               start_recovery = 1;
        }
 
        /*
diff -urN linux/drivers/net/eepro100.c linux/drivers/net/eepro100.c
--- linux/drivers/net/eepro100.c        2003/08/13 17:19:18     1.39.2.8
+++ linux/drivers/net/eepro100.c        2005/04/05 19:09:56     1.39.2.9
@@ -153,8 +153,8 @@
 MODULE_PARM_DESC(congenb, "Enable congestion control (1)");
 MODULE_PARM_DESC(txfifo, "Tx FIFO threshold in 4 byte units, (0-15)");
 MODULE_PARM_DESC(rxfifo, "Rx FIFO threshold in 4 byte units, (0-15)");
-MODULE_PARM_DESC(txdmaccount, "Tx DMA burst length; 128 - disable (0-128)");
-MODULE_PARM_DESC(rxdmaccount, "Rx DMA burst length; 128 - disable (0-128)");
+MODULE_PARM_DESC(txdmacount, "Tx DMA burst length; 128 - disable (0-128)");
+MODULE_PARM_DESC(rxdmacount, "Rx DMA burst length; 128 - disable (0-128)");
 MODULE_PARM_DESC(rx_copybreak, "copy breakpoint for copy-only-tiny-frames");
 MODULE_PARM_DESC(max_interrupt_work, "maximum events handled per interrupt");
 MODULE_PARM_DESC(multicast_filter_limit, "maximum number of filtered multicast 
addresses");
diff -urN linux/drivers/net/ppp_async.c linux/drivers/net/ppp_async.c
--- linux/drivers/net/ppp_async.c       2004/12/27 04:13:45     1.12.2.2
+++ linux/drivers/net/ppp_async.c       2005/04/05 19:09:56     1.12.2.3
@@ -996,7 +996,7 @@
        data += 4;
        dlen -= 4;
        /* data[0] is code, data[1] is length */
-       while (dlen >= 2 && dlen >= data[1]) {
+       while (dlen >= 2 && dlen >= data[1] && data[1] >= 2) {
                switch (data[0]) {
                case LCP_MRU:
                        val = (data[2] << 8) + data[3];
diff -urN linux/drivers/net/tg3.c linux/drivers/net/tg3.c
--- linux/drivers/net/tg3.c     2005/03/18 12:13:25     1.1.2.19
+++ linux/drivers/net/tg3.c     2005/04/05 19:09:56     1.1.2.20
@@ -4,6 +4,7 @@
  * Copyright (C) 2001, 2002, 2003, 2004 David S. Miller (davem@redhat.com)
  * Copyright (C) 2001, 2002, 2003 Jeff Garzik (jgarzik@pobox.com)
  * Copyright (C) 2004 Sun Microsystems Inc.
+ * Copyright (C) 2005 Broadcom Corporation.
  *
  * Firmware is:
  *     Copyright (C) 2000-2003 Broadcom Corporation.
@@ -59,8 +60,8 @@
 
 #define DRV_MODULE_NAME                "tg3"
 #define PFX DRV_MODULE_NAME    ": "
-#define DRV_MODULE_VERSION     "3.24"
-#define DRV_MODULE_RELDATE     "March 4, 2005"
+#define DRV_MODULE_VERSION     "3.25"
+#define DRV_MODULE_RELDATE     "March 24, 2005"
 
 #define TG3_DEF_MAC_MODE       0
 #define TG3_DEF_RX_MODE                0
@@ -102,9 +103,7 @@
  * replace things like '% foo' with '& (foo - 1)'.
  */
 #define TG3_RX_RCB_RING_SIZE(tp)       \
-       ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 || \
-         GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) ? \
-        512 : 1024)
+       ((tp->tg3_flags2 & TG3_FLG2_5705_PLUS) ?  512 : 1024)
 
 #define TG3_TX_RING_SIZE               512
 #define TG3_DEF_TX_RING_PENDING                (TG3_TX_RING_SIZE - 1)
@@ -452,8 +451,7 @@
                       0x1f);
        tp->pci_clock_ctrl = clock_ctrl;
 
-       if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
-           GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) {
+       if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) {
                if (orig_clock_ctrl & CLOCK_CTRL_625_CORE) {
                        tw32_f(TG3PCI_CLOCK_CTRL,
                               clock_ctrl | CLOCK_CTRL_625_CORE);
@@ -855,6 +853,19 @@
                    !tg3_readphy(tp, MII_TG3_AUX_CTRL, &phy_reg))
                        tg3_writephy(tp, MII_TG3_AUX_CTRL, phy_reg | 0x4000);
        }
+
+       /* Set phy register 0x10 bit 0 to high fifo elasticity to support
+        * jumbo frames transmission.
+        */
+       if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
+           GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) {
+               u32 phy_reg;
+
+               if (!tg3_readphy(tp, MII_TG3_EXT_CTRL, &phy_reg))
+                   tg3_writephy(tp, MII_TG3_EXT_CTRL,
+                                phy_reg | MII_TG3_EXT_CTRL_FIFO_ELASTIC);
+       }
+
        tg3_phy_set_wirespeed(tp);
        return 0;
 }
@@ -953,6 +964,7 @@
 #define RESET_KIND_SUSPEND     2
 
 static void tg3_write_sig_post_reset(struct tg3 *, int);
+static int tg3_halt_cpu(struct tg3 *, u32);
 
 static int tg3_set_power_state(struct tg3 *tp, int state)
 {
@@ -1077,8 +1089,7 @@
                                    CLOCK_CTRL_TXCLK_DISABLE |
                                    CLOCK_CTRL_ALTCLK);
                        newbits2 = newbits1 | CLOCK_CTRL_44MHZ_CORE;
-               } else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
-                          GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) {
+               } else if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) {
                        newbits1 = CLOCK_CTRL_625_CORE;
                        newbits2 = newbits1 | CLOCK_CTRL_ALTCLK;
                } else {
@@ -1092,8 +1103,7 @@
                tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits2);
                udelay(40);
 
-               if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
-                   GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) {
+               if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) {
                        u32 newbits3;
 
                        if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 
||
@@ -1113,6 +1123,17 @@
 
        tg3_frob_aux_power(tp);
 
+       /* Workaround for unstable PLL clock */
+       if ((GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5750_AX) ||
+           (GET_CHIP_REV(tp->pci_chip_rev_id) == CHIPREV_5750_BX)) {
+               u32 val = tr32(0x7d00);
+
+               val &= ~((1 << 16) | (1 << 4) | (1 << 2) | (1 << 1) | 1);
+               tw32(0x7d00, val);
+               if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF))
+                       tg3_halt_cpu(tp, RX_CPU_BASE);
+       }
+
        /* Finally, set the new power state. */
        pci_write_config_word(tp->pdev, pm + PCI_PM_CTRL, power_control);
 
@@ -2432,8 +2453,7 @@
                      (6 << TX_LENGTHS_IPG_SHIFT) |
                      (32 << TX_LENGTHS_SLOT_TIME_SHIFT)));
 
-       if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
-           GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) {
+       if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) {
                if (netif_carrier_ok(tp->dev)) {
                        tw32(HOSTCC_STAT_COAL_TICKS,
                             DEFAULT_STAT_COAL_TICKS);
@@ -2874,7 +2894,13 @@
 
        spin_lock_irqsave(&tp->lock, flags);
 
-       if (sblk->status & SD_STATUS_UPDATED) {
+       /* In INTx mode, it is possible for the interrupt to arrive at
+        * the CPU before the status block posted prior to the interrupt.
+        * Reading the PCI State register will confirm whether the
+        * interrupt is ours and will flush the status block.
+        */
+       if ((sblk->status & SD_STATUS_UPDATED) ||
+           !(tr32(TG3PCI_PCISTATE) & PCISTATE_INT_NOT_ACTIVE)) {
                /*
                 * writing any value to intr-mbox-0 clears PCI INTA# and
                 * chip-internal interrupt pending events.
@@ -2999,6 +3025,7 @@
                        tp->tx_buffers[entry].skb = NULL;
                }
                entry = NEXT_TX(entry);
+               i++;
        }
 
        dev_kfree_skb(skb);
@@ -3539,8 +3566,7 @@
        unsigned int i;
        u32 val;
 
-       if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
-           GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) {
+       if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) {
                switch (ofs) {
                case RCVLSC_MODE:
                case DMAC_MODE:
@@ -3782,8 +3808,7 @@
                }
        }
 
-       if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
-           GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)
+       if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS)
                val |= GRC_MISC_CFG_KEEP_GPHY_POWER;
        tw32(GRC_MISC_CFG, val);
 
@@ -4098,7 +4123,7 @@
        int i;
 
        if (offset == TX_CPU_BASE &&
-           GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705)
+           (tp->tg3_flags2 & TG3_FLG2_5705_PLUS))
                BUG();
 
        if (offset == RX_CPU_BASE) {
@@ -4152,14 +4177,14 @@
        void (*write_op)(struct tg3 *, u32, u32);
 
        if (cpu_base == TX_CPU_BASE &&
-           GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) {
+           (tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) {
                printk(KERN_ERR PFX "tg3_load_firmware_cpu: Trying to load "
                       "TX cpu firmware on %s which is 5705.\n",
                       tp->dev->name);
                return -EINVAL;
        }
 
-       if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705)
+       if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS)
                write_op = tg3_write_mem;
        else
                write_op = tg3_write_indirect_reg32;
@@ -4899,8 +4924,7 @@
                      (bdinfo_addr + TG3_BDINFO_MAXLEN_FLAGS),
                       maxlen_flags);
 
-       if ((GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) &&
-           (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750))
+       if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS))
                tg3_write_mem(tp,
                              (bdinfo_addr + TG3_BDINFO_NIC_ADDR),
                              nic_addr);
@@ -5078,8 +5102,7 @@
        /* Don't even try to program the JUMBO/MINI buffer descriptor
         * configs on 5705.
         */
-       if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
-           GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) {
+       if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) {
                tw32(RCVDBDI_STD_BD + TG3_BDINFO_MAXLEN_FLAGS,
                     RX_STD_MAX_SIZE_5705 << BDINFO_FLAGS_MAXLEN_SHIFT);
        } else {
@@ -5111,8 +5134,7 @@
        /* There is only one send ring on 5705/5750, no need to explicitly
         * disable the others.
         */
-       if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
-           GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) {
+       if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) {
                /* Clear out send RCB ring in SRAM. */
                for (i = NIC_SRAM_SEND_RCB; i < NIC_SRAM_RCV_RET_RCB; i += 
TG3_BDINFO_SIZE)
                        tg3_write_mem(tp, i + TG3_BDINFO_MAXLEN_FLAGS,
@@ -5133,8 +5155,7 @@
        /* There is only one receive return ring on 5705/5750, no need
         * to explicitly disable the others.
         */
-       if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
-           GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) {
+       if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) {
                for (i = NIC_SRAM_RCV_RET_RCB; i < NIC_SRAM_STATS_BLK;
                     i += TG3_BDINFO_SIZE) {
                        tg3_write_mem(tp, i + TG3_BDINFO_MAXLEN_FLAGS,
@@ -5233,8 +5254,7 @@
        tw32(HOSTCC_TXCOL_TICKS, LOW_TXCOL_TICKS);
        tw32(HOSTCC_RXMAX_FRAMES, 1);
        tw32(HOSTCC_TXMAX_FRAMES, LOW_RXMAX_FRAMES);
-       if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
-           GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) {
+       if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) {
                tw32(HOSTCC_RXCOAL_TICK_INT, 0);
                tw32(HOSTCC_TXCOAL_TICK_INT, 0);
        }
@@ -5247,8 +5267,7 @@
        tw32(HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_LOW,
             ((u64) tp->status_mapping & 0xffffffff));
 
-       if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
-           GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) {
+       if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) {
                /* Status/statistics block address.  See tg3_timer,
                 * the tg3_periodic_fetch_stats call there, and
                 * tg3_get_stats to see how this works for 5705/5750 chips.
@@ -5267,8 +5286,7 @@
 
        tw32(RCVCC_MODE, RCVCC_MODE_ENABLE | RCVCC_MODE_ATTN_ENABLE);
        tw32(RCVLPC_MODE, RCVLPC_MODE_ENABLE);
-       if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
-           GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750)
+       if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS))
                tw32(RCVLSC_MODE, RCVLSC_MODE_ENABLE | RCVLSC_MODE_ATTN_ENABLE);
 
        /* Clear statistics/status block in chip, and status block in ram. */
@@ -5295,8 +5313,7 @@
        tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0);
        tr32(MAILBOX_INTERRUPT_0);
 
-       if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
-           GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750) {
+       if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) {
                tw32_f(DMAC_MODE, DMAC_MODE_ENABLE);
                udelay(40);
        }
@@ -5343,8 +5360,7 @@
        udelay(40);
 
        tw32(RCVDCC_MODE, RCVDCC_MODE_ENABLE | RCVDCC_MODE_ATTN_ENABLE);
-       if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
-           GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5750)
+       if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS))
                tw32(MBFREE_MODE, MBFREE_MODE_ENABLE);
        tw32(SNDDATAC_MODE, SNDDATAC_MODE_ENABLE);
        tw32(SNDBDC_MODE, SNDBDC_MODE_ENABLE | SNDBDC_MODE_ATTN_ENABLE);
@@ -5448,8 +5464,7 @@
        tw32(MAC_RCV_RULE_1,  0x86000004 & RCV_RULE_DISABLE_MASK);
        tw32(MAC_RCV_VALUE_1, 0xffffffff & RCV_RULE_DISABLE_MASK);
 
-       if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
-           GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)
+       if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS)
                limit = 8;
        else
                limit = 16;
@@ -5593,8 +5608,7 @@
                return;
        }
 
-       if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
-           GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)
+       if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS)
                tg3_periodic_fetch_stats(tp);
 
        /* This part only runs once per second. */
@@ -6501,10 +6515,6 @@
 {
        struct tg3 *tp = netdev_priv(dev);
   
-       if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) ||
-                                       tp->link_config.phy_is_low_power)
-               return -EAGAIN;
-
        cmd->supported = (SUPPORTED_Autoneg);
 
        if (!(tp->tg3_flags & TG3_FLAG_10_100_ONLY))
@@ -6521,8 +6531,10 @@
                cmd->supported |= SUPPORTED_FIBRE;
   
        cmd->advertising = tp->link_config.advertising;
-       cmd->speed = tp->link_config.active_speed;
-       cmd->duplex = tp->link_config.active_duplex;
+       if (netif_running(dev)) {
+               cmd->speed = tp->link_config.active_speed;
+               cmd->duplex = tp->link_config.active_duplex;
+       }
        cmd->port = 0;
        cmd->phy_address = PHY_ADDR;
        cmd->transceiver = 0;
@@ -6536,10 +6548,6 @@
 {
        struct tg3 *tp = netdev_priv(dev);
   
-       if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) ||
-           tp->link_config.phy_is_low_power)
-               return -EAGAIN;
-
        if (tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) {
                /* These are the only valid advertisement bits allowed.  */
                if (cmd->autoneg == AUTONEG_ENABLE &&
@@ -6564,7 +6572,9 @@
                tp->link_config.duplex = cmd->duplex;
        }
   
-       tg3_setup_phy(tp, 1);
+       if (netif_running(dev))
+               tg3_setup_phy(tp, 1);
+
        spin_unlock(&tp->tx_lock);
        spin_unlock_irq(&tp->lock);
   
@@ -6644,6 +6654,9 @@
        u32 bmcr;
        int r;
   
+       if (!netif_running(dev))
+               return -EAGAIN;
+
        spin_lock_irq(&tp->lock);
        r = -EINVAL;
        tg3_readphy(tp, MII_BMCR, &bmcr);
@@ -6680,7 +6693,9 @@
            (ering->tx_pending > TG3_TX_RING_SIZE - 1))
                return -EINVAL;
   
-       tg3_netif_stop(tp);
+       if (netif_running(dev))
+               tg3_netif_stop(tp);
+
        spin_lock_irq(&tp->lock);
        spin_lock(&tp->tx_lock);
   
@@ -6692,9 +6707,12 @@
        tp->rx_jumbo_pending = ering->rx_jumbo_pending;
        tp->tx_pending = ering->tx_pending;
 
-       tg3_halt(tp);
-       tg3_init_hw(tp);
-       tg3_netif_start(tp);
+       if (netif_running(dev)) {
+               tg3_halt(tp);
+               tg3_init_hw(tp);
+               tg3_netif_start(tp);
+       }
+
        spin_unlock(&tp->tx_lock);
        spin_unlock_irq(&tp->lock);
   
@@ -6714,7 +6732,9 @@
 {
        struct tg3 *tp = netdev_priv(dev);
   
-       tg3_netif_stop(tp);
+       if (netif_running(dev))
+               tg3_netif_stop(tp);
+
        spin_lock_irq(&tp->lock);
        spin_lock(&tp->tx_lock);
        if (epause->autoneg)
@@ -6729,9 +6749,12 @@
                tp->tg3_flags |= TG3_FLAG_TX_PAUSE;
        else
                tp->tg3_flags &= ~TG3_FLAG_TX_PAUSE;
-       tg3_halt(tp);
-       tg3_init_hw(tp);
-       tg3_netif_start(tp);
+
+       if (netif_running(dev)) {
+               tg3_halt(tp);
+               tg3_init_hw(tp);
+               tg3_netif_start(tp);
+       }
        spin_unlock(&tp->tx_lock);
        spin_unlock_irq(&tp->lock);
   
@@ -7873,6 +7896,10 @@
        tp->pci_hdr_type     = (cacheline_sz_reg >> 16) & 0xff;
        tp->pci_bist         = (cacheline_sz_reg >> 24) & 0xff;
 
+       if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) ||
+           (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750))
+               tp->tg3_flags2 |= TG3_FLG2_5705_PLUS;
+
        if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750)
                tp->tg3_flags2 |= TG3_FLG2_HW_TSO;
 
@@ -8753,8 +8780,7 @@
                goto err_out_iounmap;
        }
 
-       if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ||
-           GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750) {
+       if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) {
                tp->bufmgr_config.mbuf_read_dma_low_water =
                        DEFAULT_MB_RDMA_LOW_WATER_5705;
                tp->bufmgr_config.mbuf_mac_rx_low_water =
diff -urN linux/drivers/net/tg3.h linux/drivers/net/tg3.h
--- linux/drivers/net/tg3.h     2005/03/18 12:13:26     1.1.2.11
+++ linux/drivers/net/tg3.h     2005/04/05 19:09:56     1.1.2.12
@@ -140,6 +140,8 @@
 #define   CHIPREV_5703_AX               0x10
 #define   CHIPREV_5704_AX               0x20
 #define   CHIPREV_5704_BX               0x21
+#define   CHIPREV_5750_AX               0x40
+#define   CHIPREV_5750_BX               0x41
 #define  GET_METAL_REV(CHIP_REV_ID)    ((CHIP_REV_ID) & 0xff)
 #define   METAL_REV_A0                  0x00
 #define   METAL_REV_A1                  0x01
@@ -1516,6 +1518,7 @@
 #define  MII_TG3_CTRL_ENABLE_AS_MASTER 0x1000
 
 #define MII_TG3_EXT_CTRL               0x10 /* Extended control register */
+#define  MII_TG3_EXT_CTRL_FIFO_ELASTIC 0x0001
 #define  MII_TG3_EXT_CTRL_LNK3_LED_MODE        0x0002
 #define  MII_TG3_EXT_CTRL_TBI          0x8000
 
@@ -2110,6 +2113,7 @@
 #define TG3_FLG2_FLASH                 0x00008000
 #define TG3_FLG2_HW_TSO                        0x00010000
 #define TG3_FLG2_SERDES_PREEMPHASIS    0x00020000
+#define TG3_FLG2_5705_PLUS             0x00040000
 
        u32                             split_mode_max_reqs;
 #define SPLIT_MODE_5704_MAX_REQ                3
diff -urN linux/drivers/net/tun.c linux/drivers/net/tun.c
--- linux/drivers/net/tun.c     2004/11/19 00:28:39     1.10.2.3
+++ linux/drivers/net/tun.c     2005/04/05 19:09:56     1.10.2.4
@@ -188,7 +188,7 @@
        size_t len = count;
 
        if (!(tun->flags & TUN_NO_PI)) {
-               if ((len -= sizeof(pi)) > len)
+               if ((len -= sizeof(pi)) > count)
                        return -EINVAL;
 
                memcpy_fromiovec((void *)&pi, iv, sizeof(pi));
diff -urN linux/drivers/sbus/sbus.c linux/drivers/sbus/sbus.c
--- linux/drivers/sbus/sbus.c   2003/08/13 17:19:21     1.17.2.3
+++ linux/drivers/sbus/sbus.c   2005/04/05 19:09:56     1.17.2.4
@@ -215,6 +215,8 @@
  * prom_sbus_ranges_init(), with all sun4d stuff cut away.
  * Ask DaveM what is going on here, how is sun4d supposed to work... XXX
  */
+/* added back sun4d patch from Thomas Bogendoerfer - should be OK (crn) */
+
 static void __init sbus_bus_ranges_init(int parent_node, struct sbus_bus *sbus)
 {
        int len;
@@ -227,6 +229,20 @@
                return;
        }
        sbus->num_sbus_ranges = len / sizeof(struct linux_prom_ranges);
+#ifdef CONFIG_SPARC32
+       if (sparc_cpu_model == sun4d) {
+               struct linux_prom_ranges iounit_ranges[PROMREG_MAX];
+               int num_iounit_ranges;
+
+               len = prom_getproperty(parent_node, "ranges",
+                                      (char *) iounit_ranges,
+                                      sizeof (iounit_ranges));
+               if (len != -1) {
+                       num_iounit_ranges = (len/sizeof(struct 
linux_prom_ranges));
+                       prom_adjust_ranges (sbus->sbus_ranges, 
sbus->num_sbus_ranges, iounit_ranges, num_iounit_ranges);
+               }
+       }
+#endif
 }
 
 static void __init __apply_ranges_to_regs(struct linux_prom_ranges *ranges,
diff -urN linux/drivers/sbus/char/zs.c linux/drivers/sbus/char/zs.c
--- linux/drivers/sbus/char/Attic/zs.c  2004/12/27 04:13:49     1.25.2.3
+++ linux/drivers/sbus/char/Attic/zs.c  2005/04/05 19:09:56     1.25.2.4
@@ -65,19 +65,19 @@
 
 /* On 32-bit sparcs we need to delay after register accesses
  * to accomodate sun4 systems, but we do not need to flush writes.
- * On 64-bit sparc we only need to flush single writes to ensure
+ * On 64-bit and sun4d we need to flush single writes to ensure
  * completion.
  */
 #ifndef __sparc_v9__
 #define ZSDELAY()              udelay(5)
 #define ZSDELAY_LONG()         udelay(20)
-#define ZS_WSYNC(channel)      do { } while(0)
 #else
 #define ZSDELAY()
 #define ZSDELAY_LONG()
+#endif
+
 #define ZS_WSYNC(__channel) \
        sbus_readb(&((__channel)->control))
-#endif
 
 struct sun_zslayout **zs_chips;
 struct sun_zschannel **zs_channels;
diff -urN linux/drivers/usb/serial/mct_u232.c 
linux/drivers/usb/serial/mct_u232.c
--- linux/drivers/usb/serial/mct_u232.c 2005/03/18 12:13:29     1.9.2.6
+++ linux/drivers/usb/serial/mct_u232.c 2005/04/05 19:09:57     1.9.2.7
@@ -190,16 +190,16 @@
                }
        } else {
                switch (value) {
-               case    B300: value =     300;
-               case    B600: value =     600;
-               case   B1200: value =    1200;
-               case   B2400: value =    2400;
-               case   B4800: value =    4800;
-               case   B9600: value =    9600;
-               case  B19200: value =   19200;
-               case  B38400: value =   38400;
-               case  B57600: value =   57600;
-               case B115200: value =  115200;
+               case    B300: value =     300; break;
+               case    B600: value =     600; break;
+               case   B1200: value =    1200; break;
+               case   B2400: value =    2400; break;
+               case   B4800: value =    4800; break;
+               case   B9600: value =    9600; break;
+               case  B19200: value =   19200; break;
+               case  B38400: value =   38400; break;
+               case  B57600: value =   57600; break;
+               case B115200: value =  115200; break;
                default:
                        err("MCT USB-RS232: unsupported baudrate request 0x%x,"
                            " using default of B9600", value);
@@ -667,7 +667,7 @@
        else
                new_state &= ~(TIOCM_DTR | TIOCM_RTS);
        if (new_state != control_state) {
-               mct_u232_set_modem_ctrl(serial, control_state);
+               mct_u232_set_modem_ctrl(serial, new_state);
                control_state = new_state;
        }
 
diff -urN linux/drivers/usb/serial/usbserial.c 
linux/drivers/usb/serial/usbserial.c
--- linux/drivers/usb/serial/Attic/usbserial.c  2004/12/27 04:13:50     
1.24.2.10
+++ linux/drivers/usb/serial/Attic/usbserial.c  2005/04/05 19:09:57     
1.24.2.11
@@ -715,6 +715,9 @@
        struct usb_serial_port *port = (struct usb_serial_port *) 
tty->driver_data;
        int rc;
 
+       if (!port)
+               return -ENODEV;
+
        if (!in_interrupt()) {
                /*
                 * Run post_list to reduce a possiblity of reordered writes.
diff -urN linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
--- linux/fs/binfmt_elf.c       2005/01/13 10:59:03     1.52.2.16
+++ linux/fs/binfmt_elf.c       2005/04/05 19:09:57     1.52.2.17
@@ -929,6 +929,7 @@
 static int load_elf_library(struct file *file)
 {
        struct elf_phdr *elf_phdata;
+       struct elf_phdr *eppnt;
        unsigned long elf_bss, bss, len;
        int retval, error, i, j;
        struct elfhdr elf_ex;
@@ -952,41 +953,43 @@
        /* j < ELF_MIN_ALIGN because elf_ex.e_phnum <= 2 */
 
        error = -ENOMEM;
-       elf_phdata = (struct elf_phdr *) kmalloc(j, GFP_KERNEL);
+       elf_phdata = kmalloc(j, GFP_KERNEL);
        if (!elf_phdata)
                goto out;
 
+       eppnt = elf_phdata;
        error = -ENOEXEC;
-       retval = kernel_read(file, elf_ex.e_phoff, (char *) elf_phdata, j);
+       retval = kernel_read(file, elf_ex.e_phoff, (char *)eppnt, j);
        if (retval != j)
                goto out_free_ph;
 
        for (j = 0, i = 0; i<elf_ex.e_phnum; i++)
-               if ((elf_phdata + i)->p_type == PT_LOAD) j++;
+               if ((eppnt + i)->p_type == PT_LOAD) j++;
        if (j != 1)
                goto out_free_ph;
 
-       while (elf_phdata->p_type != PT_LOAD) elf_phdata++;
+       while (eppnt->p_type != PT_LOAD) 
+               eppnt++;
 
        /* Now use mmap to map the library into memory. */
        down_write(&current->mm->mmap_sem);
        error = do_mmap(file,
-                       ELF_PAGESTART(elf_phdata->p_vaddr),
-                       (elf_phdata->p_filesz +
-                        ELF_PAGEOFFSET(elf_phdata->p_vaddr)),
+                       ELF_PAGESTART(eppnt->p_vaddr),
+                       (eppnt->p_filesz +
+                        ELF_PAGEOFFSET(eppnt->p_vaddr)),
                        PROT_READ | PROT_WRITE | PROT_EXEC,
                        MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE,
-                       (elf_phdata->p_offset -
-                        ELF_PAGEOFFSET(elf_phdata->p_vaddr)));
+                       (eppnt->p_offset -
+                        ELF_PAGEOFFSET(eppnt->p_vaddr)));
        up_write(&current->mm->mmap_sem);
-       if (error != ELF_PAGESTART(elf_phdata->p_vaddr))
+       if (error != ELF_PAGESTART(eppnt->p_vaddr))
                goto out_free_ph;
 
-       elf_bss = elf_phdata->p_vaddr + elf_phdata->p_filesz;
+       elf_bss = eppnt->p_vaddr + eppnt->p_filesz;
        padzero(elf_bss);
 
-       len = ELF_PAGESTART(elf_phdata->p_filesz + elf_phdata->p_vaddr + 
ELF_MIN_ALIGN - 1);
-       bss = elf_phdata->p_memsz + elf_phdata->p_vaddr;
+       len = ELF_PAGESTART(eppnt->p_filesz + eppnt->p_vaddr + ELF_MIN_ALIGN - 
1);
+       bss = eppnt->p_memsz + eppnt->p_vaddr;
        if (bss > len) {
                down_write(&current->mm->mmap_sem);
                do_brk(len, bss - len);
diff -urN linux/fs/namei.c linux/fs/namei.c
--- linux/fs/namei.c    2004/12/27 04:13:51     1.58.2.9
+++ linux/fs/namei.c    2005/04/05 19:09:57     1.58.2.10
@@ -540,8 +540,10 @@
                        goto out_dput;
 
                if (inode->i_op->follow_link) {
+                       struct vfsmount *mnt = mntget(nd->mnt);
                        err = do_follow_link(dentry, nd);
                        dput(dentry);
+                       mntput(mnt);
                        if (err)
                                goto return_err;
                        err = -ENOENT;
@@ -595,8 +597,10 @@
                inode = dentry->d_inode;
                if ((lookup_flags & LOOKUP_FOLLOW)
                    && inode && inode->i_op && inode->i_op->follow_link) {
+                       struct vfsmount *mnt = mntget(nd->mnt);
                        err = do_follow_link(dentry, nd);
                        dput(dentry);
+                       mntput(mnt);
                        if (err)
                                goto return_err;
                        inode = nd->dentry->d_inode;
@@ -1003,6 +1007,7 @@
        int acc_mode, error = 0;
        struct inode *inode;
        struct dentry *dentry;
+       struct vfsmount *mnt;
        struct dentry *dir;
        int count = 0;
 
@@ -1185,8 +1190,10 @@
         * are done. Procfs-like symlinks just set LAST_BIND.
         */
        UPDATE_ATIME(dentry->d_inode);
+       mnt = mntget(nd->mnt);
        error = dentry->d_inode->i_op->follow_link(dentry, nd);
        dput(dentry);
+       mntput(mnt);
        if (error)
                return error;
        if (nd->last_type == LAST_BIND) {
diff -urN linux/fs/ext2/dir.c linux/fs/ext2/dir.c
--- linux/fs/ext2/dir.c 2003/01/11 17:53:16     1.26.2.2
+++ linux/fs/ext2/dir.c 2005/04/05 19:09:57     1.26.2.3
@@ -524,7 +524,8 @@
                goto fail;
 
        base = page_address(page);
-
+       
+       memset(base, 0, chunk_size); 
        de = (struct ext2_dir_entry_2 *) base;
        de->name_len = 1;
        de->rec_len = cpu_to_le16(EXT2_DIR_REC_LEN(1));
diff -urN linux/fs/ext3/fsync.c linux/fs/ext3/fsync.c
--- linux/fs/ext3/fsync.c       2005/03/18 12:13:29     1.1.2.2
+++ linux/fs/ext3/fsync.c       2005/04/05 19:09:57     1.1.2.3
@@ -69,7 +69,7 @@
        if (test_opt(inode->i_sb, DATA_FLAGS) == EXT3_MOUNT_WRITEBACK_DATA)
                ret |= fsync_inode_data_buffers(inode);
 
-       ret |= ext3_force_commit(inode->i_sb);
+       ext3_force_commit(inode->i_sb);
 
        return ret;
 }
diff -urN linux/fs/ext3/super.c linux/fs/ext3/super.c
--- linux/fs/ext3/super.c       2005/03/18 12:13:29     1.1.2.12
+++ linux/fs/ext3/super.c       2005/04/05 19:09:57     1.1.2.13
@@ -1608,13 +1608,12 @@
 
 static int ext3_sync_fs(struct super_block *sb)
 {
-       int err;
        tid_t target;
        
        sb->s_dirt = 0;
        target = log_start_commit(EXT3_SB(sb)->s_journal, NULL);
-       err = log_wait_commit(EXT3_SB(sb)->s_journal, target);
-       return err;
+       log_wait_commit(EXT3_SB(sb)->s_journal, target);
+       return 0;
 }
 
 /*
diff -urN linux/fs/hpfs/hpfs.h linux/fs/hpfs/hpfs.h
--- linux/fs/hpfs/hpfs.h        2004/08/14 18:39:01     1.4.4.1
+++ linux/fs/hpfs/hpfs.h        2005/04/05 19:09:57     1.4.4.2
@@ -27,6 +27,8 @@
 typedef secno fnode_secno;             /* sector number of an fnode */
 typedef secno anode_secno;             /* sector number of an anode */
 
+typedef unsigned time32_t;             /* 32-bit time_t type */
+
 /* sector 0 */
 
 /* The boot block is very like a FAT boot block, except that the
@@ -84,9 +86,9 @@
   unsigned zero1;                      /* 0 */
   secno badblocks;                     /* bad block list */
   unsigned zero3;                      /* 0 */
-  time_t last_chkdsk;                  /* date last checked, 0 if never */
+  time32_t last_chkdsk;                        /* date last checked, 0 if 
never */
   /*unsigned zero4;*/                  /* 0 */
-  time_t last_optimize;                        /* date last optimized, 0 if 
never */
+  time32_t last_optimize;                      /* date last optimized, 0 if 
never */
   secno n_dir_band;                    /* number of sectors in dir band */
   secno dir_band_start;                        /* first sector in dir band */
   secno dir_band_end;                  /* last sector in dir band */
@@ -287,10 +289,10 @@
   unsigned not_8x3: 1;                 /* name is not 8.3 */
   unsigned flag15: 1;
   fnode_secno fnode;                   /* fnode giving allocation info */
-  time_t write_date;                   /* mtime */
+  time32_t write_date;                 /* mtime */
   unsigned file_size;                  /* file length, bytes */
-  time_t read_date;                    /* atime */
-  time_t creation_date;                        /* ctime */
+  time32_t read_date;                  /* atime */
+  time32_t creation_date;                      /* ctime */
   unsigned ea_size;                    /* total EA length, bytes */
   unsigned char no_of_acls : 3;                /* number of ACL's */
   unsigned char reserver : 5;
diff -urN linux/fs/hpfs/hpfs_fn.h linux/fs/hpfs/hpfs_fn.h
--- linux/fs/hpfs/hpfs_fn.h     2004/08/14 18:39:01     1.14.2.2
+++ linux/fs/hpfs/hpfs_fn.h     2005/04/05 19:09:57     1.14.2.3
@@ -58,13 +58,13 @@
  * local time (HPFS) to GMT (Unix)
  */
 
-extern inline time_t local_to_gmt(struct super_block *s, time_t t)
+extern inline time_t local_to_gmt(struct super_block *s, time32_t t)
 {
        extern struct timezone sys_tz;
        return t + sys_tz.tz_minuteswest * 60 + s->s_hpfs_timeshift;
 }
 
-extern inline time_t gmt_to_local(struct super_block *s, time_t t)
+extern inline time32_t gmt_to_local(struct super_block *s, time_t t)
 {
        extern struct timezone sys_tz;
        return t - sys_tz.tz_minuteswest * 60 - s->s_hpfs_timeshift;
diff -urN linux/fs/isofs/inode.c linux/fs/isofs/inode.c
--- linux/fs/isofs/inode.c      2004/11/29 17:47:18     1.39.2.3
+++ linux/fs/isofs/inode.c      2005/04/05 19:09:57     1.39.2.4
@@ -609,6 +609,8 @@
          s->u.isofs_sb.s_log_zone_size = isonum_723 
(h_pri->logical_block_size);
          s->u.isofs_sb.s_max_size = isonum_733(h_pri->volume_space_size);
        } else {
+         if (!pri)
+           goto out_freebh;
          rootp = (struct iso_directory_record *) pri->root_directory_record;
          s->u.isofs_sb.s_nzones = isonum_733 (pri->volume_space_size);
          s->u.isofs_sb.s_log_zone_size = isonum_723 (pri->logical_block_size);
diff -urN linux/fs/isofs/rock.c linux/fs/isofs/rock.c
--- linux/fs/isofs/rock.c       2004/04/16 03:14:19     1.17.2.2
+++ linux/fs/isofs/rock.c       2005/04/05 19:09:57     1.17.2.3
@@ -52,6 +52,7 @@
   if(LEN & 1) LEN++;                                           \
   CHR = ((unsigned char *) DE) + LEN;                          \
   LEN = *((unsigned char *) DE) - LEN;                          \
+  if (LEN<0) LEN=0;                                             \
   if (inode->i_sb->u.isofs_sb.s_rock_offset!=-1)                \
   {                                                             \
      LEN-=inode->i_sb->u.isofs_sb.s_rock_offset;                \
@@ -72,6 +73,10 @@
     offset1 = 0; \
     pbh = sb_bread(DEV->i_sb, block); \
     if(pbh){       \
+      if (offset > pbh->b_size || offset + cont_size > pbh->b_size){   \
+       brelse(pbh); \
+       goto out; \
+      } \
       memcpy(buffer + offset1, pbh->b_data + offset, cont_size - offset1); \
       brelse(pbh); \
       chr = (unsigned char *) buffer; \
@@ -172,12 +177,13 @@
     struct rock_ridge * rr;
     int sig;
     
-    while (len > 1){ /* There may be one byte for padding somewhere */
+    while (len > 2){ /* There may be one byte for padding somewhere */
       rr = (struct rock_ridge *) chr;
-      if (rr->len == 0) goto out; /* Something got screwed up here */
+      if (rr->len < 3) goto out; /* Something got screwed up here */
       sig = isonum_721(chr);
       chr += rr->len; 
       len -= rr->len;
+      if (len < 0) goto out;   /* corrupted isofs */
 
       switch(sig){
       case SIG('R','R'):
@@ -191,6 +197,7 @@
        break;
       case SIG('N','M'):
        if (truncate) break;
+       if (rr->len < 5) break;
         /*
         * If the flags are 2 or 4, this indicates '.' or '..'.
         * We don't want to do anything with this, because it
@@ -252,12 +259,13 @@
     struct rock_ridge * rr;
     int rootflag;
     
-    while (len > 1){ /* There may be one byte for padding somewhere */
+    while (len > 2){ /* There may be one byte for padding somewhere */
       rr = (struct rock_ridge *) chr;
-      if (rr->len == 0) goto out; /* Something got screwed up here */
+      if (rr->len < 3) goto out; /* Something got screwed up here */
       sig = isonum_721(chr);
       chr += rr->len; 
       len -= rr->len;
+      if (len < 0) goto out;   /* corrupted isofs */
       
       switch(sig){
 #ifndef CONFIG_ZISOFS          /* No flag for SF or ZF */
@@ -523,7 +531,7 @@
        struct rock_ridge *rr;
 
        if (!inode->i_sb->u.isofs_sb.s_rock)
-               panic ("Cannot have symlink with high sierra variant of iso 
filesystem\n");
+               goto error;
 
        block = inode->i_ino >> bufbits;
        lock_kernel();
@@ -547,13 +555,15 @@
        SETUP_ROCK_RIDGE(raw_inode, chr, len);
 
       repeat:
-       while (len > 1) { /* There may be one byte for padding somewhere */
+       while (len > 2) { /* There may be one byte for padding somewhere */
                rr = (struct rock_ridge *) chr;
-               if (rr->len == 0)
+               if (rr->len < 3)
                        goto out;       /* Something got screwed up here */
                sig = isonum_721(chr);
                chr += rr->len;
                len -= rr->len;
+               if (len < 0)
+                       goto out;       /* corrupted isofs */
 
                switch (sig) {
                case SIG('R', 'R'):
@@ -601,6 +611,7 @@
       fail:
        brelse(bh);
        unlock_kernel();
+      error:
        SetPageError(page);
        kunmap(page);
        UnlockPage(page);
diff -urN linux/fs/jbd/commit.c linux/fs/jbd/commit.c
--- linux/fs/jbd/commit.c       2005/03/18 12:13:30     1.1.2.7
+++ linux/fs/jbd/commit.c       2005/04/05 19:09:57     1.1.2.8
@@ -92,7 +92,7 @@
        struct buffer_head *wbuf[64];
        int bufs;
        int flags;
-       int err = 0;
+       int err;
        unsigned long blocknr;
        char *tagp = NULL;
        journal_header_t *header;
@@ -299,8 +299,6 @@
                        spin_unlock(&journal_datalist_lock);
                        unlock_journal(journal);
                        wait_on_buffer(bh);
-                       if (unlikely(!buffer_uptodate(bh)))
-                               err = -EIO;
                        /* the journal_head may have been removed now */
                        lock_journal(journal);
                        goto write_out_data;
@@ -328,8 +326,6 @@
                        spin_unlock(&journal_datalist_lock);
                        unlock_journal(journal);
                        wait_on_buffer(bh);
-                       if (unlikely(!buffer_uptodate(bh)))
-                               err = -EIO;
                        lock_journal(journal);
                        spin_lock(&journal_datalist_lock);
                        continue;       /* List may have changed */
@@ -355,9 +351,6 @@
        }
        spin_unlock(&journal_datalist_lock);
 
-       if (err)
-               __journal_abort_hard(journal);
-
        /*
         * If we found any dirty or locked buffers, then we should have
         * looped back up to the write_out_data label.  If there weren't
@@ -548,8 +541,6 @@
                if (buffer_locked(bh)) {
                        unlock_journal(journal);
                        wait_on_buffer(bh);
-                       if (unlikely(!buffer_uptodate(bh)))
-                               err = -EIO;
                        lock_journal(journal);
                        goto wait_for_iobuf;
                }
@@ -611,8 +602,6 @@
                if (buffer_locked(bh)) {
                        unlock_journal(journal);
                        wait_on_buffer(bh);
-                       if (unlikely(!buffer_uptodate(bh)))
-                               err = -EIO;
                        lock_journal(journal);
                        goto wait_for_ctlbuf;
                }
@@ -661,8 +650,6 @@
                bh->b_end_io = journal_end_buffer_io_sync;
                submit_bh(WRITE, bh);
                wait_on_buffer(bh);
-               if (unlikely(!buffer_uptodate(bh)))
-                       err = -EIO;
                put_bh(bh);             /* One for getblk() */
                journal_unlock_journal_head(descriptor);
        }
@@ -674,9 +661,6 @@
 
 skip_commit: /* The journal should be unlocked by now. */
 
-       if (err)
-               __journal_abort_hard(journal);
-       
        /* Call any callbacks that had been registered for handles in this
         * transaction.  It is up to the callback to free any allocated
         * memory.
diff -urN linux/fs/jbd/journal.c linux/fs/jbd/journal.c
--- linux/fs/jbd/journal.c      2005/03/18 12:13:30     1.1.2.13
+++ linux/fs/jbd/journal.c      2005/04/05 19:09:57     1.1.2.14
@@ -582,10 +582,8 @@
  * Wait for a specified commit to complete.
  * The caller may not hold the journal lock.
  */
-int log_wait_commit (journal_t *journal, tid_t tid)
+void log_wait_commit (journal_t *journal, tid_t tid)
 {
-       int err = 0;
-
        lock_kernel();
 #ifdef CONFIG_JBD_DEBUG
        lock_journal(journal);
@@ -602,12 +600,6 @@
                sleep_on(&journal->j_wait_done_commit);
        }
        unlock_kernel();
-
-       if (unlikely(is_journal_aborted(journal))) {
-               printk(KERN_EMERG "journal commit I/O error\n");
-               err = -EIO;
-       }
-       return err;
 }
 
 /*
@@ -1334,7 +1326,7 @@
 
        /* Wait for the log commit to complete... */
        if (transaction)
-               err = log_wait_commit(journal, transaction->t_tid);
+               log_wait_commit(journal, transaction->t_tid);
 
        /* ...and flush everything in the log out to disk. */
        lock_journal(journal);
diff -urN linux/fs/jbd/transaction.c linux/fs/jbd/transaction.c
--- linux/fs/jbd/transaction.c  2005/03/18 12:13:30     1.1.2.11
+++ linux/fs/jbd/transaction.c  2005/04/05 19:09:57     1.1.2.12
@@ -1484,7 +1484,7 @@
                 * to wait for the commit to complete.  
                 */
                if (handle->h_sync && !(current->flags & PF_MEMALLOC))
-                       err = log_wait_commit(journal, tid);
+                       log_wait_commit(journal, tid);
        }
        kfree(handle);
        return err;
@@ -1509,7 +1509,7 @@
                goto out;
        }
        handle->h_sync = 1;
-       ret = journal_stop(handle);
+       journal_stop(handle);
 out:
        unlock_kernel();
        return ret;
diff -urN linux/fs/jfs/inode.c linux/fs/jfs/inode.c
--- linux/fs/jfs/inode.c        2004/11/29 17:47:18     1.5.2.8
+++ linux/fs/jfs/inode.c        2005/04/05 19:09:57     1.5.2.9
@@ -90,8 +90,6 @@
        } else if (S_ISDIR(inode->i_mode)) {
                inode->i_op = &jfs_dir_inode_operations;
                inode->i_fop = &jfs_dir_operations;
-               inode->i_mapping->a_ops = &jfs_aops;
-               inode->i_mapping->gfp_mask = GFP_NOFS;
        } else if (S_ISLNK(inode->i_mode)) {
                if (inode->i_size >= IDATASIZE) {
                        inode->i_op = &page_symlink_inode_operations;
@@ -215,7 +213,6 @@
                         struct buffer_head *bh_result, int create)
 {
        s64 lblock64 = lblock;
-       int no_size_check = 0;
        int rc = 0;
        int take_locks;
        xad_t xad;
@@ -224,11 +221,11 @@
        s32 xlen;
 
        /*
-        * If this is a special inode (imap, dmap) or directory,
+        * If this is a special inode (imap, dmap)
         * the lock should already be taken
         */
-       take_locks = ((JFS_IP(ip)->fileset != AGGREGATE_I) &&
-                     !S_ISDIR(ip->i_mode));
+       take_locks = (JFS_IP(ip)->fileset != AGGREGATE_I);
+
        /*
         * Take appropriate lock on inode
         */
@@ -239,17 +236,9 @@
                        IREAD_LOCK(ip);
        }
 
-       /*
-        * A directory's "data" is the inode index table, but i_size is the
-        * size of the d-tree, so don't check the offset against i_size
-        */
-       if (S_ISDIR(ip->i_mode))
-               no_size_check = 1;
-
-       if ((no_size_check ||
-            ((lblock64 << ip->i_sb->s_blocksize_bits) < ip->i_size)) &&
-           (xtLookup(ip, lblock64, 1, &xflag, &xaddr, &xlen, no_size_check)
-            == 0) && xlen) {
+       if (((lblock64 << ip->i_sb->s_blocksize_bits) < ip->i_size) &&
+           (xtLookup(ip, lblock64, 1, &xflag, &xaddr, &xlen, 0) == 0) &&
+           xlen) {
                if (xflag & XAD_NOTRECORDED) {
                        if (!create)
                                /*
diff -urN linux/fs/jfs/namei.c linux/fs/jfs/namei.c
--- linux/fs/jfs/namei.c        2005/03/18 12:13:30     1.4.2.10
+++ linux/fs/jfs/namei.c        2005/04/05 19:09:58     1.4.2.11
@@ -249,8 +249,6 @@
        ip->i_nlink = 2;        /* for '.' */
        ip->i_op = &jfs_dir_inode_operations;
        ip->i_fop = &jfs_dir_operations;
-       ip->i_mapping->a_ops = &jfs_aops;
-       ip->i_mapping->gfp_mask = GFP_NOFS;
 
        insert_inode_hash(ip);
        mark_inode_dirty(ip);
diff -urN linux/fs/lockd/svclock.c linux/fs/lockd/svclock.c
--- linux/fs/lockd/svclock.c    2004/04/16 03:14:20     1.16.2.3
+++ linux/fs/lockd/svclock.c    2005/04/05 19:09:58     1.16.2.4
@@ -640,7 +640,6 @@
                } else {
                        /* Lock is now held by client, or has been rejected.
                         * In both cases, the block should be removed. */
-                       file->f_count++;
                        up(&file->f_sema);
                        if (status == NLM_LCK_GRANTED)
                                nlmsvc_delete_block(block, 0);
diff -urN linux/include/asm-i386/acpi.h linux/include/asm-i386/acpi.h
--- linux/include/asm-i386/acpi.h       2005/03/18 12:13:30     1.5.2.8
+++ linux/include/asm-i386/acpi.h       2005/04/05 19:09:58     1.5.2.9
@@ -28,6 +28,8 @@
 
 #ifdef __KERNEL__
 
+#include <linux/init.h>
+
 #define COMPILER_DEPENDENT_INT64   long long
 #define COMPILER_DEPENDENT_UINT64  unsigned long long
 
diff -urN linux/include/asm-ia64/pgtable.h linux/include/asm-ia64/pgtable.h
--- linux/include/asm-ia64/pgtable.h    2004/02/20 01:22:20     1.17.2.5
+++ linux/include/asm-ia64/pgtable.h    2005/04/05 19:09:58     1.17.2.6
@@ -60,7 +60,8 @@
 #define _PAGE_PROTNONE         (__IA64_UL(1) << 63)
 
 #define _PFN_MASK              _PAGE_PPN_MASK
-#define _PAGE_CHG_MASK         (_PFN_MASK | _PAGE_A | _PAGE_D)
+/* Mask of bits which may be changed by pte_modify(); the odd bits are there 
for _PAGE_PROTNONE */
+#define _PAGE_CHG_MASK (_PAGE_P | _PAGE_PROTNONE | _PAGE_PL_MASK | 
_PAGE_AR_MASK | _PAGE_ED)
 
 #define _PAGE_SIZE_4K  12
 #define _PAGE_SIZE_8K  13
@@ -216,7 +217,7 @@
 ({ pte_t __pte; pte_val(__pte) = physpage + pgprot_val(pgprot); __pte; })
 
 #define pte_modify(_pte, newprot) \
-       (__pte((pte_val(_pte) & _PAGE_CHG_MASK) | pgprot_val(newprot)))
+       (__pte((pte_val(_pte) & ~_PAGE_CHG_MASK) | (pgprot_val(newprot) & 
_PAGE_CHG_MASK)))
 
 #define page_pte_prot(page,prot)       mk_pte(page, prot)
 #define page_pte(page)                 page_pte_prot(page, __pgprot(0))
diff -urN linux/include/asm-sparc/asi.h linux/include/asm-sparc/asi.h
--- linux/include/asm-sparc/asi.h       1998/05/07 03:03:04     1.4
+++ linux/include/asm-sparc/asi.h       2005/04/05 19:09:58     1.4.6.1
@@ -104,7 +104,8 @@
 #define ASI_M_DCDR         0x39   /* Data Cache Diagnostics Register rw, ss */
 
 #define ASI_M_VIKING_TMP1  0x40          /* Emulation temporary 1 on Viking */
-#define ASI_M_VIKING_TMP2  0x41          /* Emulation temporary 2 on Viking */
+/* only available on SuperSparc I */
+/* #define ASI_M_VIKING_TMP2  0x41 */  /* Emulation temporary 2 on Viking */
 
 #define ASI_M_ACTION       0x4c   /* Breakpoint Action Register (GNU/Viking) */
 
diff -urN linux/include/asm-sparc/oplib.h linux/include/asm-sparc/oplib.h
--- linux/include/asm-sparc/oplib.h     2003/12/22 22:44:39     1.7.4.3
+++ linux/include/asm-sparc/oplib.h     2005/04/05 19:09:58     1.7.4.4
@@ -296,6 +296,9 @@
 
 /* Dorking with Bus ranges... */
 
+extern void prom_adjust_ranges(struct linux_prom_ranges *, int,
+                              struct linux_prom_ranges *, int);
+
 /* Apply promlib probes OBIO ranges to registers. */
 extern void prom_apply_obio_ranges(struct linux_prom_registers *obioregs, int 
nregs);
 
diff -urN linux/include/asm-sparc/winmacro.h linux/include/asm-sparc/winmacro.h
--- linux/include/asm-sparc/winmacro.h  2003/07/05 03:23:47     1.6.4.1
+++ linux/include/asm-sparc/winmacro.h  2005/04/05 19:09:58     1.6.4.2
@@ -113,9 +113,12 @@
        and      %idreg, 0xc, %idreg; \
        ld       [%idreg + %dest_reg], %dest_reg;
 
-/* Sliiick. We have a Linux current register :) -jj */
-#define LOAD_CURRENT4D(dest_reg) \
-       lda      [%g0] ASI_M_VIKING_TMP2, %dest_reg;
+#define LOAD_CURRENT4D(dest_reg, idreg) \
+       lda      [%g0] ASI_M_VIKING_TMP1, %idreg; \
+       sethi   %hi(C_LABEL(current_set)), %dest_reg; \
+       sll     %idreg, 2, %idreg; \
+       or      %dest_reg, %lo(C_LABEL(current_set)), %dest_reg; \
+       ld      [%idreg + %dest_reg], %dest_reg;
 
 /* Blackbox - take care with this... - check smp4m and smp4d before changing 
this. */
 #define LOAD_CURRENT(dest_reg, idreg)                                  \
diff -urN linux/include/linux/agp_backend.h linux/include/linux/agp_backend.h
--- linux/include/linux/agp_backend.h   2004/11/19 00:28:51     1.13.2.7
+++ linux/include/linux/agp_backend.h   2005/04/05 19:09:58     1.13.2.8
@@ -56,6 +56,7 @@
        INTEL_I860,
        INTEL_I865_G,
        INTEL_I915_G,
+       INTEL_I915_GM,
        INTEL_I7205,
        INTEL_I7505,
        INTEL_460GX,
diff -urN linux/include/linux/jbd.h linux/include/linux/jbd.h
--- linux/include/linux/jbd.h   2005/03/18 12:13:31     1.1.2.9
+++ linux/include/linux/jbd.h   2005/04/05 19:09:58     1.1.2.10
@@ -848,7 +848,7 @@
 
 extern int     log_space_left (journal_t *); /* Called with journal locked */
 extern tid_t   log_start_commit (journal_t *, transaction_t *);
-extern int     log_wait_commit (journal_t *, tid_t);
+extern void    log_wait_commit (journal_t *, tid_t);
 extern int     log_do_checkpoint (journal_t *, int);
 
 extern void    log_wait_for_space(journal_t *, int nblocks);
diff -urN linux/include/linux/kernel.h linux/include/linux/kernel.h
--- linux/include/linux/kernel.h        2004/11/19 00:28:51     1.25.2.5
+++ linux/include/linux/kernel.h        2005/04/05 19:09:58     1.25.2.6
@@ -73,14 +73,17 @@
 extern long long simple_strtoll(const char *,char **,unsigned int);
 extern int sprintf(char * buf, const char * fmt, ...)
        __attribute__ ((format (printf, 2, 3)));
-extern int vsprintf(char *buf, const char *, va_list);
+extern int vsprintf(char *buf, const char *, va_list)
+       __attribute__ ((format (printf, 2, 0)));
 extern int snprintf(char * buf, size_t size, const char * fmt, ...)
        __attribute__ ((format (printf, 3, 4)));
-extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
+extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
+       __attribute__ ((format (printf, 3, 0)));
 
 extern int sscanf(const char *, const char *, ...)
-       __attribute__ ((format (scanf,2,3)));
-extern int vsscanf(const char *, const char *, va_list);
+       __attribute__ ((format (scanf, 2, 3)));
+extern int vsscanf(const char *, const char *, va_list)
+       __attribute__ ((format (scanf, 2, 0)));
 
 extern int get_option(char **str, int *pint);
 extern char *get_options(char *str, int nints, int *ints);
diff -urN linux/include/linux/netfilter_ipv4/ip_conntrack.h 
linux/include/linux/netfilter_ipv4/ip_conntrack.h
--- linux/include/linux/netfilter_ipv4/ip_conntrack.h   2005/03/18 12:13:31     
1.8.2.9
+++ linux/include/linux/netfilter_ipv4/ip_conntrack.h   2005/04/05 19:09:58     
1.8.2.10
@@ -253,10 +253,10 @@
 struct sk_buff *
 ip_ct_gather_frags(struct sk_buff *skb, u_int32_t user);
 
-/* Delete all conntracks which match. */
+/* Iterate over all conntracks: if iter returns true, it's deleted. */
 extern void
-ip_ct_selective_cleanup(int (*kill)(const struct ip_conntrack *i, void *data),
-                       void *data);
+ip_ct_iterate_cleanup(int (*iter)(struct ip_conntrack *i, void *data),
+                      void *data);
 
 /* It's confirmed if it is, or has been in the hash table. */
 static inline int is_confirmed(struct ip_conntrack *ct)
diff -urN linux/include/linux/netfilter_ipv4/ip_tables.h 
linux/include/linux/netfilter_ipv4/ip_tables.h
--- linux/include/linux/netfilter_ipv4/ip_tables.h      2004/08/14 18:39:03     
1.6.2.2
+++ linux/include/linux/netfilter_ipv4/ip_tables.h      2005/04/05 19:09:58     
1.6.2.3
@@ -336,7 +336,6 @@
 /*
  *     Main firewall chains definitions and global var's definitions.
  */
-static DECLARE_MUTEX(ipt_mutex);
 #ifdef __KERNEL__
 
 #include <linux/init.h>
diff -urN linux/include/linux/netfilter_ipv6/ip6_tables.h 
linux/include/linux/netfilter_ipv6/ip6_tables.h
--- linux/include/linux/netfilter_ipv6/ip6_tables.h     2004/08/14 18:39:03     
1.3.2.3
+++ linux/include/linux/netfilter_ipv6/ip6_tables.h     2005/04/05 19:09:58     
1.3.2.4
@@ -106,8 +106,6 @@
        u_int64_t pcnt, bcnt;                   /* Packet and byte counters */
 };
 
-static DECLARE_MUTEX(ip6t_mutex);
-
 /* Values for "flag" field in struct ip6t_ip6 (general ip6 structure). */
 #define IP6T_F_PROTO           0x01    /* Set if rule cares about upper 
                                           protocols */
diff -urN linux/mm/filemap.c linux/mm/filemap.c
--- linux/mm/filemap.c  2005/03/18 12:13:31     1.74.2.17
+++ linux/mm/filemap.c  2005/04/05 19:09:58     1.74.2.18
@@ -3261,12 +3261,7 @@
                        status = generic_osync_inode(inode, 
OSYNC_METADATA|OSYNC_DATA);
        }
        
-       /*
-        * generic_osync_inode always returns 0 or negative value.
-        * So 'status < written' is always true, and written should
-        * be returned if status >= 0.
-        */
-       err = (status < 0) ? status : written;
+       err = written ? written : status;
 out:
 
        return err;
diff -urN linux/mm/memory.c linux/mm/memory.c
--- linux/mm/memory.c   2005/01/13 10:59:04     1.59.2.11
+++ linux/mm/memory.c   2005/04/05 19:09:58     1.59.2.12
@@ -499,9 +499,11 @@
                                /* FIXME: call the correct function,
                                 * depending on the type of the found page
                                 */
-                               if (!pages[i])
-                                       goto bad_page;
-                               page_cache_get(pages[i]);
+                               if (!pages[i] || PageReserved(pages[i])) {
+                                       if (pages[i] != ZERO_PAGE(start))
+                                               goto bad_page;
+                               } else
+                                       page_cache_get(pages[i]);
                        }
                        if (vmas)
                                vmas[i] = vma;
diff -urN linux/mm/page_alloc.c linux/mm/page_alloc.c
--- linux/mm/page_alloc.c       2004/11/19 00:28:52     1.61.2.10
+++ linux/mm/page_alloc.c       2005/04/05 19:09:58     1.61.2.11
@@ -551,7 +551,7 @@
                class_idx = zone_idx(zone);
 
                sum += zone->nr_cache_pages;
-               for (zone = pgdat->node_zones; zone < pgdat->node_zones + 
MAX_NR_ZONES; zone++) {
+               for (; zone; zone = *zonep++) {
                        int free = zone->free_pages - 
zone->watermarks[class_idx].high;
                        if (free <= 0)
                                continue;
diff -urN linux/net/atm/addr.c linux/net/atm/addr.c
--- linux/net/atm/addr.c        2003/11/17 01:07:47     1.4.2.2
+++ linux/net/atm/addr.c        2005/04/05 19:09:59     1.4.2.3
@@ -114,7 +114,7 @@
 }
 
 
-int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc *u_buf,int size)
+int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc *u_buf,size_t size)
 {
        unsigned long flags;
        struct atm_dev_addr *walk;
diff -urN linux/net/atm/addr.h linux/net/atm/addr.h
--- linux/net/atm/addr.h        2001/06/13 17:28:18     1.3
+++ linux/net/atm/addr.h        2005/04/05 19:09:59     1.3.2.1
@@ -13,6 +13,6 @@
 void atm_reset_addr(struct atm_dev *dev);
 int atm_add_addr(struct atm_dev *dev,struct sockaddr_atmsvc *addr);
 int atm_del_addr(struct atm_dev *dev,struct sockaddr_atmsvc *addr);
-int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc *u_buf,int size);
+int atm_get_addr(struct atm_dev *dev,struct sockaddr_atmsvc *u_buf,size_t 
size);
 
 #endif
diff -urN linux/net/bluetooth/af_bluetooth.c linux/net/bluetooth/af_bluetooth.c
--- linux/net/bluetooth/af_bluetooth.c  2004/08/14 18:39:04     1.2.2.6
+++ linux/net/bluetooth/af_bluetooth.c  2005/04/05 19:09:59     1.2.2.7
@@ -62,7 +62,7 @@
 
 int bluez_sock_register(int proto, struct net_proto_family *ops)
 {
-       if (proto >= BLUEZ_MAX_PROTO)
+       if (proto < 0 || proto >= BLUEZ_MAX_PROTO)
                return -EINVAL;
 
        if (bluez_proto[proto])
@@ -74,7 +74,7 @@
 
 int bluez_sock_unregister(int proto)
 {
-       if (proto >= BLUEZ_MAX_PROTO)
+       if (proto < 0 || proto >= BLUEZ_MAX_PROTO)
                return -EINVAL;
 
        if (!bluez_proto[proto])
@@ -86,7 +86,7 @@
 
 static int bluez_sock_create(struct socket *sock, int proto)
 {
-       if (proto >= BLUEZ_MAX_PROTO)
+       if (proto < 0 || proto >= BLUEZ_MAX_PROTO)
                return -EINVAL;
 
 #if defined(CONFIG_KMOD)
diff -urN linux/net/ipv4/tcp_input.c linux/net/ipv4/tcp_input.c
--- linux/net/ipv4/tcp_input.c  2005/03/18 12:13:32     1.45.2.14
+++ linux/net/ipv4/tcp_input.c  2005/04/05 19:09:59     1.45.2.15
@@ -1642,7 +1642,10 @@
 static void tcp_undo_cwr(struct tcp_opt *tp, int undo)
 {
        if (tp->prior_ssthresh) {
-               tp->snd_cwnd = max(tp->snd_cwnd, tp->snd_ssthresh<<1);
+               if (tcp_is_bic(tp))
+                       tp->snd_cwnd = max(tp->snd_cwnd, 
tp->bictcp.last_max_cwnd);
+               else
+                       tp->snd_cwnd = max(tp->snd_cwnd, tp->snd_ssthresh<<1);
 
                if (undo && tp->prior_ssthresh > tp->snd_ssthresh) {
                        tp->snd_ssthresh = tp->prior_ssthresh;
diff -urN linux/net/ipv4/ipvs/ip_vs_core.c linux/net/ipv4/ipvs/ip_vs_core.c
--- linux/net/ipv4/ipvs/ip_vs_core.c    2005/03/18 12:13:32     1.4.2.3
+++ linux/net/ipv4/ipvs/ip_vs_core.c    2005/04/05 19:09:59     1.4.2.4
@@ -1106,7 +1106,7 @@
 
        /* Check the server status */
        if (cp->dest && !(cp->dest->flags & IP_VS_DEST_F_AVAILABLE)) {
-               /* the destination server is not availabe */
+               /* the destination server is not available */
 
                if (sysctl_ip_vs_expire_nodest_conn) {
                        /* try to expire the connection immediately */
diff -urN linux/net/ipv4/ipvs/ip_vs_wrr.c linux/net/ipv4/ipvs/ip_vs_wrr.c
--- linux/net/ipv4/ipvs/ip_vs_wrr.c     2004/04/16 03:14:22     1.3.2.2
+++ linux/net/ipv4/ipvs/ip_vs_wrr.c     2005/04/05 19:09:59     1.3.2.3
@@ -140,6 +140,8 @@
        mark->cl = &svc->destinations;
        mark->mw = ip_vs_wrr_max_weight(svc);
        mark->di = ip_vs_wrr_gcd_weight(svc);
+       if (mark->cw > mark->mw)
+               mark->cw = 0;
        return 0;
 }
 
@@ -175,7 +177,7 @@
                        if (mark->cw <= 0) {
                                mark->cw = mark->mw;
                                /*
-                                * Still zero, which means no availabe servers.
+                                * Still zero, which means no available servers.
                                 */
                                if (mark->cw == 0) {
                                        mark->cl = &svc->destinations;
diff -urN linux/net/ipv4/netfilter/ip_conntrack_core.c 
linux/net/ipv4/netfilter/ip_conntrack_core.c
--- linux/net/ipv4/netfilter/ip_conntrack_core.c        2005/03/18 12:13:32     
1.13.2.13
+++ linux/net/ipv4/netfilter/ip_conntrack_core.c        2005/04/05 19:09:59     
1.13.2.14
@@ -64,6 +64,7 @@
 static atomic_t ip_conntrack_count = ATOMIC_INIT(0);
 struct list_head *ip_conntrack_hash;
 static kmem_cache_t *ip_conntrack_cachep;
+static LIST_HEAD(unconfirmed);
 
 extern struct ip_conntrack_protocol ip_conntrack_generic_protocol;
 
@@ -329,6 +330,12 @@
        if (ct->expecting)
                remove_expectations(ct, 1);
 
+       /* We overload first tuple to link into unconfirmed list. */
+       if (!is_confirmed(ct)) {
+               BUG_ON(list_empty(&ct->tuplehash[IP_CT_DIR_ORIGINAL].list));
+               list_del(&ct->tuplehash[IP_CT_DIR_ORIGINAL].list);
+       }
+
        /* Delete our master expectation */
        if (ct->master) {
                if (ct->master->expectant) {
@@ -463,6 +470,9 @@
                          conntrack_tuple_cmp,
                          struct ip_conntrack_tuple_hash *,
                          &ct->tuplehash[IP_CT_DIR_REPLY].tuple, NULL)) {
+               /* Remove from unconfirmed list */
+               list_del(&ct->tuplehash[IP_CT_DIR_ORIGINAL].list);
+
                list_prepend(&ip_conntrack_hash[hash],
                             &ct->tuplehash[IP_CT_DIR_ORIGINAL]);
                list_prepend(&ip_conntrack_hash[repl_hash],
@@ -736,6 +746,10 @@
                expected->expectant->expecting--;
                nf_conntrack_get(&master_ct(conntrack)->infos[0]);
        }
+       /* Overload tuple linked list to put us in unconfirmed list. */
+       list_add(&conntrack->tuplehash[IP_CT_DIR_ORIGINAL].list,
+                &unconfirmed);
+
        atomic_inc(&ip_conntrack_count);
        WRITE_UNLOCK(&ip_conntrack_lock);
 
@@ -959,7 +973,8 @@
                   pointing into the payload - otherwise we should have to copy 
                   the data filled out by the helper over the old one */
                DEBUGP("expect_related: resent packet\n");
-               if (related_to->helper->timeout) {
+               if (old->expectant == related_to &&
+                   related_to->helper->timeout) {
                        if (!del_timer(&old->timeout)) {
                                /* expectation is dying. Fall through */
                                old = NULL;
@@ -1155,6 +1170,7 @@
        LIST_DELETE(&helpers, me);
 
        /* Get rid of expecteds, set helpers to NULL. */
+       LIST_FIND_W(&unconfirmed, unhelp, struct ip_conntrack_tuple_hash*, me);
        for (i = 0; i < ip_conntrack_htable_size; i++)
                LIST_FIND_W(&ip_conntrack_hash[i], unhelp,
                            struct ip_conntrack_tuple_hash *, me);
@@ -1248,40 +1264,44 @@
 }
 
 static inline int
-do_kill(const struct ip_conntrack_tuple_hash *i,
-       int (*kill)(const struct ip_conntrack *i, void *data),
+do_iter(const struct ip_conntrack_tuple_hash *i,
+        int (*iter)(struct ip_conntrack *i, void *data),
        void *data)
 {
-       return kill(i->ctrack, data);
+       return iter(i->ctrack, data);
 }
 
 /* Bring out ya dead! */
 static struct ip_conntrack_tuple_hash *
-get_next_corpse(int (*kill)(const struct ip_conntrack *i, void *data),
+get_next_corpse(int (*iter)(struct ip_conntrack *i, void *data),
                void *data, unsigned int *bucket)
 {
        struct ip_conntrack_tuple_hash *h = NULL;
 
-       READ_LOCK(&ip_conntrack_lock);
-       for (; !h && *bucket < ip_conntrack_htable_size; (*bucket)++) {
-               h = LIST_FIND(&ip_conntrack_hash[*bucket], do_kill,
-                             struct ip_conntrack_tuple_hash *, kill, data);
+       WRITE_LOCK(&ip_conntrack_lock);
+       for (; *bucket < ip_conntrack_htable_size; (*bucket)++) {
+               h = LIST_FIND_W(&ip_conntrack_hash[*bucket], do_iter,
+                               struct ip_conntrack_tuple_hash *, iter, data);
+               if (h)
+                       break;
        }
+       if (!h)
+               h = LIST_FIND_W(&unconfirmed, do_iter,
+                               struct ip_conntrack_tuple_hash *, iter, data);
        if (h)
                atomic_inc(&h->ctrack->ct_general.use);
-       READ_UNLOCK(&ip_conntrack_lock);
+       WRITE_UNLOCK(&ip_conntrack_lock);
 
        return h;
 }
 
 void
-ip_ct_selective_cleanup(int (*kill)(const struct ip_conntrack *i, void *data),
-                       void *data)
+ip_ct_iterate_cleanup(int (*iter)(struct ip_conntrack *i, void *), void *data)
 {
        struct ip_conntrack_tuple_hash *h;
        unsigned int bucket = 0;
 
-       while ((h = get_next_corpse(kill, data, &bucket)) != NULL) {
+       while ((h = get_next_corpse(iter, data, &bucket)) != NULL) {
                /* Time to push up daises... */
                if (del_timer(&h->ctrack->timeout))
                        death_by_timeout((unsigned long)h->ctrack);
@@ -1350,7 +1370,7 @@
     SO_ORIGINAL_DST, SO_ORIGINAL_DST+1, &getorigdst,
     0, NULL };
 
-static int kill_all(const struct ip_conntrack *i, void *data)
+static int kill_all(struct ip_conntrack *i, void *data)
 {
        return 1;
 }
@@ -1367,7 +1387,7 @@
        br_write_unlock_bh(BR_NETPROTO_LOCK);
  
  i_see_dead_people:
-       ip_ct_selective_cleanup(kill_all, NULL);
+       ip_ct_iterate_cleanup(kill_all, NULL);
        if (atomic_read(&ip_conntrack_count) != 0) {
                schedule();
                goto i_see_dead_people;
diff -urN linux/net/ipv4/netfilter/ip_conntrack_standalone.c 
linux/net/ipv4/netfilter/ip_conntrack_standalone.c
--- linux/net/ipv4/netfilter/ip_conntrack_standalone.c  2005/03/18 12:13:32     
1.11.2.12
+++ linux/net/ipv4/netfilter/ip_conntrack_standalone.c  2005/04/05 19:09:59     
1.11.2.13
@@ -39,7 +39,7 @@
 
 MODULE_LICENSE("GPL");
 
-static int kill_proto(const struct ip_conntrack *i, void *data)
+static int kill_proto(struct ip_conntrack *i, void *data)
 {
        return (i->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum == 
                        *((u_int8_t *) data));
@@ -440,7 +440,7 @@
        br_write_unlock_bh(BR_NETPROTO_LOCK);
 
        /* Remove all contrack entries for this protocol */
-       ip_ct_selective_cleanup(kill_proto, &proto->proto);
+       ip_ct_iterate_cleanup(kill_proto, &proto->proto);
 
        MOD_DEC_USE_COUNT;
 }
@@ -467,7 +467,7 @@
 EXPORT_SYMBOL(ip_conntrack_get);
 EXPORT_SYMBOL(ip_conntrack_helper_register);
 EXPORT_SYMBOL(ip_conntrack_helper_unregister);
-EXPORT_SYMBOL(ip_ct_selective_cleanup);
+EXPORT_SYMBOL(ip_ct_iterate_cleanup);
 EXPORT_SYMBOL(ip_ct_refresh);
 EXPORT_SYMBOL(ip_ct_find_proto);
 EXPORT_SYMBOL(__ip_ct_find_proto);
diff -urN linux/net/ipv4/netfilter/ip_nat_core.c 
linux/net/ipv4/netfilter/ip_nat_core.c
--- linux/net/ipv4/netfilter/ip_nat_core.c      2005/01/20 02:19:25     1.9.2.11
+++ linux/net/ipv4/netfilter/ip_nat_core.c      2005/04/05 19:09:59     1.9.2.12
@@ -1028,16 +1028,16 @@
 }
 
 /* Clear NAT section of all conntracks, in case we're loaded again. */
-static int clean_nat(const struct ip_conntrack *i, void *data)
+static int clean_nat(struct ip_conntrack *i, void *data)
 {
-       memset((void *)&i->nat, 0, sizeof(i->nat));
+       memset(&i->nat, 0, sizeof(i->nat));
        return 0;
 }
 
 /* Not __exit: called from ip_nat_standalone.c:init_or_cleanup() --RR */
 void ip_nat_cleanup(void)
 {
-       ip_ct_selective_cleanup(&clean_nat, NULL);
+       ip_ct_iterate_cleanup(&clean_nat, NULL);
        ip_conntrack_destroyed = NULL;
        vfree(bysource);
 }
diff -urN linux/net/ipv4/netfilter/ip_nat_helper.c 
linux/net/ipv4/netfilter/ip_nat_helper.c
--- linux/net/ipv4/netfilter/ip_nat_helper.c    2003/11/17 01:07:48     1.2.2.6
+++ linux/net/ipv4/netfilter/ip_nat_helper.c    2005/04/05 19:09:59     1.2.2.7
@@ -520,7 +520,7 @@
 }
 
 static int
-kill_helper(const struct ip_conntrack *i, void *helper)
+kill_helper(struct ip_conntrack *i, void *helper)
 {
        int ret;
 
@@ -554,7 +554,7 @@
           forces admins to gen fake RSTs or bounce box, either of
           which is just a long-winded way of making things
           worse. --RR */
-       ip_ct_selective_cleanup(kill_helper, me);
+       ip_ct_iterate_cleanup(kill_helper, me);
 
        if (found)
                MOD_DEC_USE_COUNT;
diff -urN linux/net/ipv4/netfilter/ip_tables.c 
linux/net/ipv4/netfilter/ip_tables.c
--- linux/net/ipv4/netfilter/ip_tables.c        2005/01/20 02:19:25     1.14.2.9
+++ linux/net/ipv4/netfilter/ip_tables.c        2005/04/05 19:09:59     
1.14.2.10
@@ -53,6 +53,8 @@
 #endif
 #define SMP_ALIGN(x) (((x) + SMP_CACHE_BYTES-1) & ~(SMP_CACHE_BYTES-1))
 
+static DECLARE_MUTEX(ipt_mutex);
+
 /* Must have mutex */
 #define ASSERT_READ_LOCK(x) IP_NF_ASSERT(down_trylock(&ipt_mutex) != 0)
 #define ASSERT_WRITE_LOCK(x) IP_NF_ASSERT(down_trylock(&ipt_mutex) != 0)
diff -urN linux/net/ipv4/netfilter/ipt_LOG.c linux/net/ipv4/netfilter/ipt_LOG.c
--- linux/net/ipv4/netfilter/ipt_LOG.c  2003/11/17 01:07:48     1.8.2.2
+++ linux/net/ipv4/netfilter/ipt_LOG.c  2005/04/05 19:09:59     1.8.2.3
@@ -67,8 +67,8 @@
                printk("FRAG:%u ", ntohs(iph->frag_off) & IP_OFFSET);
 
        if ((info->logflags & IPT_LOG_IPOPT)
-           && iph->ihl * 4 != sizeof(struct iphdr)
-           && iph->ihl * 4 >= datalen) {
+           && iph->ihl * 4 > sizeof(struct iphdr)
+           && iph->ihl * 4 <= len) {
                unsigned int i;
 
                /* Max length: 127 "OPT (" 15*4*2chars ") " */
@@ -126,7 +126,8 @@
                printk("URGP=%u ", ntohs(tcph->urg_ptr));
 
                if ((info->logflags & IPT_LOG_TCPOPT)
-                   && tcph->doff * 4 != sizeof(struct tcphdr)) {
+                   && tcph->doff * 4 > sizeof(struct tcphdr)
+                   && tcph->doff * 4 <= datalen) {
                        unsigned int i;
 
                        /* Max length: 127 "OPT (" 15*4*2chars ") " */
diff -urN linux/net/ipv4/netfilter/ipt_MASQUERADE.c 
linux/net/ipv4/netfilter/ipt_MASQUERADE.c
--- linux/net/ipv4/netfilter/ipt_MASQUERADE.c   2005/01/20 02:19:25     1.9.2.5
+++ linux/net/ipv4/netfilter/ipt_MASQUERADE.c   2005/04/05 19:09:59     1.9.2.6
@@ -125,7 +125,7 @@
 }
 
 static inline int
-device_cmp(const struct ip_conntrack *i, void *ifindex)
+device_cmp(struct ip_conntrack *i, void *ifindex)
 {
        int ret;
 
@@ -148,7 +148,7 @@
                   and forget them. */
                IP_NF_ASSERT(dev->ifindex != 0);
  
-               ip_ct_selective_cleanup(device_cmp, (void *)(long)dev->ifindex);
+               ip_ct_iterate_cleanup(device_cmp, (void *)(long)dev->ifindex);
        }
 
        return NOTIFY_DONE;
@@ -167,7 +167,7 @@
                   and forget them. */
                IP_NF_ASSERT(dev->ifindex != 0);
 
-               ip_ct_selective_cleanup(device_cmp, (void *)(long)dev->ifindex);
+               ip_ct_iterate_cleanup(device_cmp, (void *)(long)dev->ifindex);
        }
 
        return NOTIFY_DONE;
diff -urN linux/net/ipv4/netfilter/ipt_recent.c 
linux/net/ipv4/netfilter/ipt_recent.c
--- linux/net/ipv4/netfilter/ipt_recent.c       2003/12/15 18:19:54     1.1.2.2
+++ linux/net/ipv4/netfilter/ipt_recent.c       2005/04/05 19:09:59     1.1.2.3
@@ -108,7 +108,7 @@
       int *hotdrop);
 
 /* Function to hash a given address into the hash table of table_size size */
-int hash_func(unsigned int addr, int table_size)
+static int hash_func(unsigned int addr, int table_size)
 {
        int result = 0;
        unsigned int value = addr;
@@ -716,7 +716,7 @@
 #endif
 
        curr_table = vmalloc(sizeof(struct recent_ip_tables));
-       if(curr_table == NULL) return -ENOMEM;
+       if(curr_table == NULL) return 0;
 
        curr_table->list_lock = SPIN_LOCK_UNLOCKED;
        curr_table->next = NULL;
@@ -733,7 +733,7 @@
 #endif
 
        curr_table->table = vmalloc(sizeof(struct recent_ip_list)*ip_list_tot);
-       if(curr_table->table == NULL) { vfree(curr_table); return -ENOMEM; }
+       if(curr_table->table == NULL) { vfree(curr_table); return 0; }
        memset(curr_table->table,0,sizeof(struct recent_ip_list)*ip_list_tot);
 #ifdef DEBUG
        if(debug) printk(KERN_INFO RECENT_NAME ": checkentry: Allocating %d for 
pkt_list.\n",
@@ -748,7 +748,7 @@
                printk(KERN_INFO RECENT_NAME ": checkentry: unable to allocate 
for pkt_list.\n");
                vfree(curr_table->table); 
                vfree(curr_table);
-               return -ENOMEM;
+               return 0;
        }
        for(c = 0; c < ip_list_tot; c++) {
                curr_table->table[c].last_pkts = hold + c*ip_pkt_list_tot;
@@ -766,7 +766,7 @@
                vfree(hold);
                vfree(curr_table->table); 
                vfree(curr_table);
-               return -ENOMEM;
+               return 0;
        }
 
        for(c = 0; c < ip_list_hash_size; c++) {
@@ -786,7 +786,7 @@
                vfree(hold);
                vfree(curr_table->table); 
                vfree(curr_table);
-               return -ENOMEM;
+               return 0;
        }
        for(c = 0; c < ip_list_tot; c++) {
                curr_table->time_info[c].position = c;
@@ -830,7 +830,7 @@
                        if(debug) printk(KERN_INFO RECENT_NAME ": checkentry() 
create_proc failed, no tables.\n");
 #endif
                        spin_unlock_bh(&recent_lock);
-                       return -ENOMEM;
+                       return 0;
                }
                while( strncmp(info->name,curr_table->name,IPT_RECENT_NAME_LEN) 
&& (last_table = curr_table) && (curr_table = curr_table->next) );
                if(!curr_table) {
@@ -838,7 +838,7 @@
                        if(debug) printk(KERN_INFO RECENT_NAME ": checkentry() 
create_proc failed, table already destroyed.\n");
 #endif
                        spin_unlock_bh(&recent_lock);
-                       return -ENOMEM;
+                       return 0;
                }
                if(last_table) last_table->next = curr_table->next; else 
r_tables = curr_table->next;
                spin_unlock_bh(&recent_lock);
@@ -847,7 +847,7 @@
                vfree(hold);
                vfree(curr_table->table);
                vfree(curr_table);
-               return -ENOMEM;
+               return 0;
        }
        
        curr_table->status_proc->owner = THIS_MODULE;
@@ -962,7 +962,7 @@
 /* Kernel module initialization. */
 static int __init init(void)
 {
-       int count;
+       int err, count;
 
        printk(version);
 #ifdef CONFIG_PROC_FS
@@ -986,7 +986,10 @@
        if(debug) printk(KERN_INFO RECENT_NAME ": ip_list_hash_size: 
%d\n",ip_list_hash_size);
 #endif
 
-       return ipt_register_match(&recent_match);
+       err = ipt_register_match(&recent_match);
+       if (err)
+               remove_proc_entry("ipt_recent", proc_net);
+       return err;
 }
 
 /* Kernel module destruction. */
diff -urN linux/net/ipv6/netfilter/ip6_tables.c 
linux/net/ipv6/netfilter/ip6_tables.c
--- linux/net/ipv6/netfilter/ip6_tables.c       2005/01/20 02:19:25     1.9.2.9
+++ linux/net/ipv6/netfilter/ip6_tables.c       2005/04/05 19:09:59     1.9.2.10
@@ -58,6 +58,7 @@
 #endif
 #define SMP_ALIGN(x) (((x) + SMP_CACHE_BYTES-1) & ~(SMP_CACHE_BYTES-1))
 
+static DECLARE_MUTEX(ip6t_mutex);
 
 /* Must have mutex */
 #define ASSERT_READ_LOCK(x) IP_NF_ASSERT(down_trylock(&ip6t_mutex) != 0)
@@ -225,7 +226,7 @@
                         * we will change the return 0 to 1*/
                        if ((currenthdr == IPPROTO_NONE) || 
                                (currenthdr == IPPROTO_ESP))
-                               return 0;
+                               break;
 
                        hdrptr = (struct ipv6_opt_hdr *)(skb->data + ptr);
 
diff -urN linux/net/netlink/af_netlink.c linux/net/netlink/af_netlink.c
--- linux/net/netlink/af_netlink.c      2005/03/18 12:13:32     1.19.2.8
+++ linux/net/netlink/af_netlink.c      2005/04/05 19:09:59     1.19.2.9
@@ -340,9 +340,9 @@
        }
        if (!nlk_sk(sk)->groups)
                goto out;
-       for (skp = &table->mc_list; *skp; skp = &((*skp)->next)) {
+       for (skp = &table->mc_list; *skp; skp = &((*skp)->bind_next)) {
                if (*skp == sk) {
-                       *skp = sk->next;
+                       *skp = sk->bind_next;
                        break;
                }
        }
@@ -450,7 +450,6 @@
        err = netlink_insert(sk, pid);
        if (err == -EADDRINUSE)
                goto retry;
-       sk->protinfo.af_netlink->groups = 0;
        return 0;
 }
 

<Prev in Thread] Current Thread [Next in Thread>