]> git.neil.brown.name Git - history.git/commitdiff
Linux 2.2.21rc4 2.2.21-rc4
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:24:17 +0000 (15:24 -0500)
committerAlan Cox <alan@lxorguk.ukuu.org.uk>
Fri, 23 Nov 2007 20:24:17 +0000 (15:24 -0500)
o       SiS900 updates                                  (Mufasa Yang)
o       Correct kd.h macros                             (Andrej Lajovic)
o       sg buffer clean fix                             (Douglas Gilbert)

Makefile
arch/i386/vmlinux.lds [new file with mode: 0644]
drivers/net/sis900.c
drivers/net/sis900.h
drivers/scsi/sg.c
include/linux/kd.h
include/scsi/sg.h
x1 [deleted file]

index 8b3d7c2ade199a67239f2d66053ba40afd1af6e3..1fb4820de4ba2516e711369369ce5dec2803f9cd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 2
 SUBLEVEL = 21
-EXTRAVERSION = rc3
+EXTRAVERSION = rc4
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
diff --git a/arch/i386/vmlinux.lds b/arch/i386/vmlinux.lds
new file mode 100644 (file)
index 0000000..01685b8
--- /dev/null
@@ -0,0 +1,77 @@
+/* ld script to make i386 Linux kernel
+ * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
+ */
+OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
+OUTPUT_ARCH(i386)
+ENTRY(_start)
+SECTIONS
+{
+  . = 0xC0000000  + 0x100000;
+  _text = .;                   /* Text and read-only data */
+  .text : {
+       *(.text)
+       *(.fixup)
+       *(.gnu.warning)
+       } = 0x9090
+  .text.lock : { *(.text.lock) }       /* out-of-line lock text */
+  .rodata : { *(.rodata) }
+  .kstrtab : { *(.kstrtab) }
+
+  . = ALIGN(16);               /* Exception table */
+  __start___ex_table = .;
+  __ex_table : { *(__ex_table) }
+  __stop___ex_table = .;
+
+  __start___ksymtab = .;       /* Kernel symbol table */
+  __ksymtab : { *(__ksymtab) }
+  __stop___ksymtab = .;
+
+  _etext = .;                  /* End of text section */
+
+  .data : {                    /* Data */
+       *(.data)
+       CONSTRUCTORS
+       }
+
+  _edata = .;                  /* End of data section */
+
+  . = ALIGN(8192);             /* init_task */
+  .data.init_task : { *(.data.init_task) }
+
+  . = ALIGN(4096);             /* Init code and data */
+  __init_begin = .;
+  .text.init : { *(.text.init) }
+  .data.init : { *(.data.init) }
+  . = ALIGN(16);               /* __setup() commandline parameters */
+  __setup_start = .;
+  .setup.init : { *(.setup.init) }
+  __setup_end = .;
+  __initcall_start = .;                /* the init functions to be called */
+  .initcall.init : { *(.initcall.init) }
+  __initcall_end = .;
+  . = ALIGN(4096);
+  __init_end = .;
+
+
+  . = ALIGN(32);
+  .data.cacheline_aligned : { *(.data.cacheline_aligned) }
+
+  . = ALIGN(4096);
+  .data.page_aligned : { *(.data.idt) }
+
+
+  __bss_start = .;             /* BSS */
+  .bss : {
+       *(.bss)
+       }
+  _end = . ;
+
+  /* Stabs debugging sections.  */
+  .stab 0 : { *(.stab) }
+  .stabstr 0 : { *(.stabstr) }
+  .stab.excl 0 : { *(.stab.excl) }
+  .stab.exclstr 0 : { *(.stab.exclstr) }
+  .stab.index 0 : { *(.stab.index) }
+  .stab.indexstr 0 : { *(.stab.indexstr) }
+  .comment 0 : { *(.comment) }
+}
index c7f757d759fefc2f88e0ce3a29683dc9ecbf9294..39c21c4866886b1c13068635b1192cc6490b4044 100644 (file)
@@ -1,6 +1,6 @@
 /* sis900.c: A SiS 900/7016 PCI Fast Ethernet driver for Linux.
    Copyright 1999 Silicon Integrated System Corporation 
-   Revision:   1.06.10 Feb 28 2002
+   Revision:   1.06.11 Apr. 30 2002
 
    Modified from the driver which is originally written by Donald Becker.
    
@@ -18,8 +18,9 @@
    preliminary Rev. 1.0 Jan. 18, 1998
    http://www.sis.com.tw/support/databook.htm
 
-   Rev 1.06.10 Feb. 28 2002 Allan Jacobsen (aj@2m.dk) Made RTL8201 PHY work on ECS K7S5A
-   Rev 1.06.09 Sep. 28 2001 Hui-Fen Hsu (hfhsu@sis.com.tw) update for 630ET & workaround for ICS1893 PHY
+   Rev 1.06.11 Apr. 25 2002 Mufasa Yang (mufasa@sis.com.tw) added SiS962 support
+   Rev 1.06.10 Dec. 18 2001 Hui-Fen Hsu workaround for EDB & RTL8201 PHY
+   Rev 1.06.09 Sep. 28 2001 Hui-Fen Hsu update for 630ET & workaround for ICS1893 PHY
    Rev 1.06.08 Mar.  2 2001 Hui-Fen Hsu (hfhsu@sis.com.tw) some bug fix & 635M/B support
    Rev 1.06.07 Jan.  8 2001 Lei-Chun Chang added RTL8201 PHY support
    Rev 1.06.06 Sep.  6 2000 Lei-Chun Chang added ICS1893 PHY support
@@ -56,7 +57,7 @@
 #include "sis900.h"
 
 static const char *version =
-"sis900.c: v1.06.10  02/28/2002\n";
+"sis900.c: v1.06.11  4/30/2002\n";
 
 static int max_interrupt_work = 20;
 static int multicast_filter_limit = 128;
@@ -102,7 +103,7 @@ static struct mii_chip_info {
        { "AMD 79C901 HomePNA PHY",             0x0000, 0x6B90, HOME},
        { "ICS LAN PHY",                        0x0015, 0xF440, LAN },
        { "NS  83851 PHY",                      0x2000, 0x5C20, MIX },
-       { "Realtek RTL8201 PHY",                0x0000, 0x8200, LAN },
+        { "Realtek RTL8201 PHY",               0x0000, 0x8200, LAN },
        {0,},
 };
 
@@ -305,6 +306,43 @@ static int sis635_get_mac_addr(struct pci_dev * pci_dev, struct device *net_dev)
        return 1;
 }
 
+
+/**
+ *     sis962_get_mac_addr: - Get MAC address for SiS962 model
+ *     @pci_dev: the sis900 pci device
+ *     @net_dev: the net device to get address for 
+ *
+ *     SiS962 model, use EEPROM to store MAC address. And EEPROM is shared by
+ *     LAN and 1394. When access EEPROM, send EEREQ signal to hardware first 
+ *     and wait for EEGNT. If EEGNT is ON, EEPROM is permitted to be access 
+ *     by LAN, otherwise is not. After MAC address is read from EEPROM, send
+ *     EEDONE signal to refuse EEPROM access by LAN. 
+ *     MAC address is read into @net_dev->dev_addr.
+ */
+
+static int sis962_get_mac_addr(struct pci_dev * pci_dev, struct device *net_dev)
+{
+
+       long ioaddr = net_dev->base_addr;
+       long ee_addr = ioaddr + mear;
+       u32 waittime = 0;
+       int ret = 0;
+       
+       outl(EEREQ, ee_addr);
+       while(waittime < 2000) {
+               if(inl(ee_addr) & EEGNT) {
+                       ret = sis900_get_mac_addr(pci_dev, net_dev);
+                       outl(EEDONE, ee_addr);
+                       return(ret);
+               } else {
+                       udelay(1);      
+                       waittime ++;
+               }
+       }
+       outl(EEDONE, ee_addr);
+       return 0;
+}
+
 static struct device * sis900_mac_probe (struct mac_chip_info * mac, struct pci_dev * pci_dev,
                                         struct device * net_dev)
 {
@@ -341,6 +379,8 @@ static struct device * sis900_mac_probe (struct mac_chip_info * mac, struct pci_
                ret = sis630e_get_mac_addr(pci_dev, net_dev);
        else if ((revision > 0x81) && (revision <= 0x90))
                ret = sis635_get_mac_addr(pci_dev, net_dev);
+       else if (revision == SIS962_900_REV)
+               ret = sis962_get_mac_addr(pci_dev, net_dev);
        else
                ret = sis900_get_mac_addr(pci_dev, net_dev);
 
@@ -740,6 +780,9 @@ sis900_open(struct device *net_dev)
        net_dev->interrupt = 0;
        net_dev->start = 1;
 
+       /* Workaround for EDB */
+       sis900_set_mode(ioaddr, HW_SPEED_10_MBPS, FDX_CAPABLE_HALF_SELECTED);
+
        /* Enable all known interrupts by setting the interrupt mask. */
        outl((RxSOVR|RxORN|RxERR|RxOK|TxURN|TxERR|TxIDLE), ioaddr + imr);
        outl(RxENA | inl(ioaddr + cr), ioaddr + cr);
@@ -1107,17 +1150,16 @@ static void sis900_read_mode(struct device *net_dev, int *speed, int *duplex)
        autorec = mdio_read(net_dev, phy_addr, MII_ANLPAR);
        status = autoadv & autorec;
 
+       *speed = HW_SPEED_10_MBPS;
+       *duplex = FDX_CAPABLE_HALF_SELECTED;
+
        if (status & (MII_NWAY_TX | MII_NWAY_TX_FDX))
                *speed = HW_SPEED_100_MBPS;
-       else
-               *speed = HW_SPEED_10_MBPS;
        if (status & ( MII_NWAY_TX_FDX | MII_NWAY_T_FDX))
                *duplex = FDX_CAPABLE_FULL_SELECTED;
-       else
-               *duplex = FDX_CAPABLE_HALF_SELECTED;
 
        sis_priv->autong_complete = 1;
-       
+
        /* Workaround for Realtek RTL8201 PHY issue */
        if((phy->phy_id0 == 0x0000) && ((phy->phy_id1 & 0xFFF0) == 0x8200)){
                if(mdio_read(net_dev, phy_addr, MII_CONTROL) & MII_CNTL_FDX)
@@ -1125,7 +1167,7 @@ static void sis900_read_mode(struct device *net_dev, int *speed, int *duplex)
                if(mdio_read(net_dev, phy_addr, 0x0019) & 0x01)
                        *speed = HW_SPEED_100_MBPS;
        }
-
+                       
        printk(KERN_INFO "%s: Media Link On %s %s-duplex \n",
               net_dev->name,
               *speed == HW_SPEED_100_MBPS ?
@@ -1562,7 +1604,7 @@ static u16 sis900_compute_hashtable_index(u8 *addr, u8 revision)
        }
 
        /* leave 8 or 7 most siginifant bits */
-       if((revision == SIS635A_900_REV) || (revision == SIS900B_900_REV))
+       if((revision >= SIS635A_900_REV) || (revision == SIS900B_900_REV))
                return ((int)(crc >> 24));
        else
                return ((int)(crc >> 25));
@@ -1579,7 +1621,7 @@ static void set_rx_mode(struct device *net_dev)
 
        /* 635 Hash Table entires = 256(2^16) */
        pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision);
-       if((revision == SIS635A_900_REV) || (revision == SIS900B_900_REV))
+       if((revision >= SIS635A_900_REV) || (revision == SIS900B_900_REV))
                table_entries = 16;
        else
                table_entries = 8;
@@ -1651,7 +1693,7 @@ static void sis900_reset(struct device *net_dev)
        }
 
        pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision);
-       if( (revision == SIS635A_900_REV) || (revision == SIS900B_900_REV) )
+       if( (revision >= SIS635A_900_REV) || (revision == SIS900B_900_REV) )
                outl(PESEL | RND_CNT, ioaddr + cfg);
        else
                outl(PESEL, ioaddr + cfg);
index 12e41ee0ba85ee4c24520e0290ff76ff2c2a3f3b..f661721960d08be2438d56c6c7c54c50d9e7aac9 100644 (file)
@@ -132,6 +132,11 @@ enum sis900_eeprom_command {
        EEaddrMask = 0x013F, EEcmdShift = 16
 };
 
+/* For SiS962, request the eeprom software access */
+enum sis962_eeprom_command {
+       EEREQ = 0x00000400, EEDONE = 0x00000200, EEGNT = 0x00000100
+};
+
 /* Manamgement Data I/O (mdio) frame */
 #define MIIread         0x6000
 #define MIIwrite        0x5002
@@ -237,7 +242,7 @@ enum sis900_revision_id {
        SIS630A_900_REV = 0x80,         SIS630E_900_REV = 0x81,
        SIS630S_900_REV = 0x82,         SIS630EA1_900_REV = 0x83,
        SIS630ET_900_REV = 0x84,        SIS635A_900_REV = 0x90,
-       SIS900B_900_REV = 0x03
+       SIS962_900_REV = 0X91,          SIS900B_900_REV = 0x03
 };
 
 enum sis630_revision_id {
index 93638659e6ca3f4c7713a8a1cc7244150b011f72..2d505bd414c0c7d23f71c508093fa5b60db2d871 100644 (file)
@@ -16,8 +16,8 @@
  *
  *  Borrows code from st driver. Thanks to Alessandro Rubini's "dd" book.
  */
- static char * sg_version_str = "Version: 2.1.40 (20010620)";
- static int sg_version_num = 20140; /* 2 digits for each component */
+ static char * sg_version_str = "Version: 2.1.41 (20020409)";
+ static int sg_version_num = 20141; /* 2 digits for each component */
 /*
  *  D. P. Gilbert (dgilbert@interlog.com, dougg@triode.net.au), notes:
  *      - scsi logging is available via SCSI_LOG_TIMEOUT macros. First
@@ -1644,10 +1644,14 @@ static char * sg_low_malloc(int rqSz, int lowDma, int mem_src, int * retSzp)
         return resp;
     if (SG_HEAP_KMAL == mem_src) {
         resp = kmalloc(rqSz, page_mask);
-        if (resp && retSzp) *retSzp = rqSz;
+       if (resp) {
+           if (! capable(CAP_SYS_ADMIN))
+               memset(resp, 0, rqSz);
+           if (retSzp) *retSzp = rqSz;
 #ifdef SG_DEBUG
-        if (resp) ++sg_num_kmal;
+           ++sg_num_kmal;
 #endif
+       }
         return resp;
     }
     if (SG_HEAP_POOL == mem_src) {
@@ -1664,6 +1668,8 @@ static char * sg_low_malloc(int rqSz, int lowDma, int mem_src, int * retSzp)
                 (scsi_dma_free_sectors > (SG_LOW_POOL_THRESHHOLD + num_sect))) {
                 resp = scsi_malloc(rqSz);
                 if (resp) {
+                   if (! capable(CAP_SYS_ADMIN))
+                       memset(resp, 0, rqSz);
                     if (retSzp) *retSzp = rqSz;
                     sg_pool_secs_avail -= num_sect;
 #ifdef SG_DEBUG
@@ -1692,10 +1698,14 @@ static char * sg_low_malloc(int rqSz, int lowDma, int mem_src, int * retSzp)
             resp = (char *)__get_free_pages(page_mask, order); /* try half */
             resSz = a_size;
         }
-        if (retSzp) *retSzp = resSz;
+       if (resp) {
+           if (! capable(CAP_SYS_ADMIN))
+               memset(resp, 0, resSz);
+           if (retSzp) *retSzp = resSz;
 #ifdef SG_DEBUG
-        if (resp) ++sg_num_page;
+           ++sg_num_page;
 #endif
+       }
     }
     else
         printk("sg_low_malloc: bad mem_src=%d, rqSz=%df\n", mem_src, rqSz);
index c717c1981a353ef4e3997565be36d38c81092d89..2461c05be5a195d5a022851fc6e7d47599c4265a 100644 (file)
@@ -26,8 +26,8 @@ struct consolefontdesc {
 #define KDGETLED       0x4B31  /* return current led state */
 #define KDSETLED       0x4B32  /* set led state [lights, not flags] */
 #define        LED_SCR         0x01    /* scroll lock led */
-#define        LED_CAP         0x04    /* caps lock led */
 #define        LED_NUM         0x02    /* num lock led */
+#define        LED_CAP         0x04    /* caps lock led */
 
 #define KDGKBTYPE      0x4B33  /* get keyboard type */
 #define        KB_84           0x01
@@ -89,10 +89,10 @@ struct unimapinit {
 #define KDSKBMETA      0x4B63  /* sets meta key handling mode */
 
 #define                K_SCROLLLOCK    0x01
-#define                K_CAPSLOCK      0x02
-#define                K_NUMLOCK       0x04
+#define                K_NUMLOCK       0x02
+#define                K_CAPSLOCK      0x04
 #define        KDGKBLED        0x4B64  /* get led flags (not lights) */
-#define KDSKBLED       0x4B65  /* set led flags (not lights) */
+#define        KDSKBLED        0x4B65  /* set led flags (not lights) */
 
 struct kbentry {
        unsigned char kb_table;
index 12bcae1d046ce8a57bcb79ed4dbe17349d3357ef..73f1a534afc89559ca59a52eef5556f5366362b3 100644 (file)
@@ -11,10 +11,12 @@ Original driver (sg.h):
 2.x extensions to driver:
 *       Copyright (C) 1998 - 2001 Douglas Gilbert
 
-    Version: 2.1.40 (20010620)
+    Version: 2.1.41 (20020409)
     This version for 2.2.x series kernels
     D. P. Gilbert (dgilbert@interlog.com, dougg@triode.net.au)
 
+    Changes since 2.1.40 (20010620)
+       - zero buffers for non-root users
     Changes since 2.1.38 (20000626)
         - fix bug that caused long wait when large buffer requested
     Changes since 2.1.38 (20000527)
diff --git a/x1 b/x1
deleted file mode 100644 (file)
index 959be61..0000000
--- a/x1
+++ /dev/null
@@ -1,180 +0,0 @@
-From: Paul Mackerras <paulus@samba.org>
-Date: Tue, 19 Mar 2002 16:01:22 +1100 (EST)
-To: marcelo@conectiva.com.br, linux-kernel@vger.kernel.org
-Subject: Re: [PATCH] zlib double-free bug
-
-Someone pointed me at a previously-posted patch for the zlib
-vulnerability.  While I was looking at that patch I realized that both
-that patch and mine were buggy in different ways.  My patch was
-freeing s->sub.trees.blens after that word had been overwritten by an
-assignment to s->sub.decode.codes, whereas with the previously-posted
-patch, it is still possible to get a double-free (if inflate_codes_new
-returns NULL, it will leave s->mode == DTREE but s->sub.trees.blens
-has already been freed).
-
-Here is a new patch which should fix both those problems.
-
-Paul.
-
-diff -urN linux-2.4.19-pre3/arch/ppc/boot/lib/zlib.c pmac/arch/ppc/boot/lib/zlib.c
---- linux-2.4.19-pre3/arch/ppc/boot/lib/zlib.c Mon Mar 18 13:34:47 2002
-+++ pmac/arch/ppc/boot/lib/zlib.c      Tue Mar 19 15:46:09 2002
-@@ -1,5 +1,5 @@
- /*
-- * BK Id: SCCS/s.zlib.c 1.10 01/11/02 10:46:07 trini
-+ * BK Id: SCCS/s.zlib.c 1.9 12/05/01 16:19:42 mporter
-  */
- /*
-  * This file is derived from various .h and .c files from the zlib-0.95
-@@ -928,7 +928,10 @@
-       {
-         r = t;
-         if (r == Z_DATA_ERROR)
-+      {
-+          ZFREE(z, s->sub.trees.blens, s->sub.trees.nblens * sizeof(uInt));
-           s->mode = BADB;
-+      }
-         LEAVE
-       }
-       s->sub.trees.index = 0;
-@@ -964,6 +967,7 @@
-           if (i + j > 258 + (t & 0x1f) + ((t >> 5) & 0x1f) ||
-               (c == 16 && i < 1))
-           {
-+            ZFREE(z, s->sub.trees.blens, s->sub.trees.nblens * sizeof(uInt));
-             s->mode = BADB;
-             z->msg = "invalid bit length repeat";
-             r = Z_DATA_ERROR;
-@@ -991,7 +995,10 @@
-         if (t != Z_OK)
-         {
-           if (t == (uInt)Z_DATA_ERROR)
-+        {
-+            ZFREE(z, s->sub.trees.blens, s->sub.trees.nblens * sizeof(uInt));
-             s->mode = BADB;
-+        }
-           r = t;
-           LEAVE
-         }
-diff -urN linux-2.4.19-pre3/drivers/net/zlib.c pmac/drivers/net/zlib.c
---- linux-2.4.19-pre3/drivers/net/zlib.c       Sat Apr 28 23:02:45 2001
-+++ pmac/drivers/net/zlib.c    Tue Mar 19 15:45:40 2002
-@@ -14,7 +14,7 @@
-  */
- /* 
-- *  ==FILEVERSION 971210==
-+ *  ==FILEVERSION 20020318==
-  *
-  * This marker is used by the Linux installation script to determine
-  * whether an up-to-date version of this file is already installed.
-@@ -772,7 +772,7 @@
-         windowBits = -windowBits;
-     }
-     if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
--        windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
-+        windowBits < 9 || windowBits > 15 || level < 0 || level > 9 ||
-       strategy < 0 || strategy > Z_HUFFMAN_ONLY) {
-         return Z_STREAM_ERROR;
-     }
-@@ -3860,10 +3860,12 @@
-                              &s->sub.trees.tb, z);
-       if (t != Z_OK)
-       {
--        ZFREE(z, s->sub.trees.blens);
-         r = t;
-         if (r == Z_DATA_ERROR)
-+      {
-+        ZFREE(z, s->sub.trees.blens);
-           s->mode = BADB;
-+      }
-         LEAVE
-       }
-       s->sub.trees.index = 0;
-@@ -3928,11 +3930,13 @@
- #endif
-         t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f),
-                                   s->sub.trees.blens, &bl, &bd, &tl, &td, z);
--        ZFREE(z, s->sub.trees.blens);
-         if (t != Z_OK)
-         {
-           if (t == (uInt)Z_DATA_ERROR)
-+        {
-+          ZFREE(z, s->sub.trees.blens);
-             s->mode = BADB;
-+        }
-           r = t;
-           LEAVE
-         }
-@@ -3945,6 +3949,7 @@
-           r = Z_MEM_ERROR;
-           LEAVE
-         }
-+        ZFREE(z, s->sub.trees.blens);
-         s->sub.decode.codes = c;
-         s->sub.decode.tl = tl;
-         s->sub.decode.td = td;
-diff -urN linux-2.4.19-pre3/fs/jffs2/zlib.c pmac/fs/jffs2/zlib.c
---- linux-2.4.19-pre3/fs/jffs2/zlib.c  Mon Sep 24 09:31:33 2001
-+++ pmac/fs/jffs2/zlib.c       Tue Mar 19 15:46:47 2002
-@@ -14,7 +14,7 @@
-  */
- /* 
-- *  ==FILEVERSION 971210==
-+ *  ==FILEVERSION 20020318==
-  *
-  * This marker is used by the Linux installation script to determine
-  * whether an up-to-date version of this file is already installed.
-@@ -772,7 +772,7 @@
-         windowBits = -windowBits;
-     }
-     if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
--        windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
-+        windowBits < 9 || windowBits > 15 || level < 0 || level > 9 ||
-       strategy < 0 || strategy > Z_HUFFMAN_ONLY) {
-         return Z_STREAM_ERROR;
-     }
-@@ -3860,10 +3860,12 @@
-                              &s->sub.trees.tb, z);
-       if (t != Z_OK)
-       {
--        ZFREE(z, s->sub.trees.blens);
-         r = t;
-         if (r == Z_DATA_ERROR)
-+      {
-+        ZFREE(z, s->sub.trees.blens);
-           s->mode = BADB;
-+      }
-         LEAVE
-       }
-       s->sub.trees.index = 0;
-@@ -3928,11 +3930,13 @@
- #endif
-         t = inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f),
-                                   s->sub.trees.blens, &bl, &bd, &tl, &td, z);
--        ZFREE(z, s->sub.trees.blens);
-         if (t != Z_OK)
-         {
-           if (t == (uInt)Z_DATA_ERROR)
-+        {
-+          ZFREE(z, s->sub.trees.blens);
-             s->mode = BADB;
-+        }
-           r = t;
-           LEAVE
-         }
-@@ -3945,6 +3949,7 @@
-           r = Z_MEM_ERROR;
-           LEAVE
-         }
-+        ZFREE(z, s->sub.trees.blens);
-         s->sub.decode.codes = c;
-         s->sub.decode.tl = tl;
-         s->sub.decode.td = td;
--
-To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
-the body of a message to majordomo@vger.kernel.org
-More majordomo info at  http://vger.kernel.org/majordomo-info.html
-Please read the FAQ at  http://www.tux.org/lkml/
-