# HG changeset patch # User Pascal Bellard # Date 1204581128 0 # Node ID 42f25f3bfca2cce322c0a9ba51c68e4d6f17c1a8 # Parent 28bd53ce3a11035610a0154ab1154af4adeee8c7 Linux: misc fixes diff -r 28bd53ce3a11 -r 42f25f3bfca2 linux/stuff/config-acpi-2.6.22.9.u --- a/linux/stuff/config-acpi-2.6.22.9.u Sun Mar 02 23:16:29 2008 +0000 +++ b/linux/stuff/config-acpi-2.6.22.9.u Mon Mar 03 21:52:08 2008 +0000 @@ -1,5 +1,5 @@ ---- .config Wed Feb 20 23:40:09 2008 -+++ .config Wed Feb 20 23:45:30 2008 +--- linux-2.6.22.9/.config Wed Feb 20 23:40:09 2008 ++++ linux-2.6.22.9/.config Wed Feb 20 23:45:30 2008 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit diff -r 28bd53ce3a11 -r 42f25f3bfca2 linux/stuff/config-acpi-2.6.24.2.u --- a/linux/stuff/config-acpi-2.6.24.2.u Sun Mar 02 23:16:29 2008 +0000 +++ b/linux/stuff/config-acpi-2.6.24.2.u Mon Mar 03 21:52:08 2008 +0000 @@ -1,5 +1,5 @@ ---- .config Fri Feb 15 21:12:02 2008 -+++ .config Fri Feb 15 21:11:24 2008 +--- linux-2.6.24.2/.config Fri Feb 15 21:12:02 2008 ++++ linux-2.6.24.2/.config Fri Feb 15 21:11:24 2008 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit diff -r 28bd53ce3a11 -r 42f25f3bfca2 linux/stuff/config-ieee1394-2.6.24.2.u --- a/linux/stuff/config-ieee1394-2.6.24.2.u Sun Mar 02 23:16:29 2008 +0000 +++ b/linux/stuff/config-ieee1394-2.6.24.2.u Mon Mar 03 21:52:08 2008 +0000 @@ -1,5 +1,5 @@ ---- .config Fri Feb 29 23:03:54 2008 -+++ .config Fri Feb 29 22:59:38 2008 +--- linux-2.6.24.2/.config Fri Feb 29 23:03:54 2008 ++++ linux-2.6.24.2/.config Fri Feb 29 22:59:38 2008 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit diff -r 28bd53ce3a11 -r 42f25f3bfca2 linux/stuff/linux-lzma-export.u --- a/linux/stuff/linux-lzma-export.u Sun Mar 02 23:16:29 2008 +0000 +++ b/linux/stuff/linux-lzma-export.u Mon Mar 03 21:52:08 2008 +0000 @@ -1,6 +1,6 @@ --- linux-2.6.24.2/lib/decompress_unlzma.c +++ linux-2.6.24.2/lib/decompress_unlzma.c -@@ -52,11 +52,6 @@ static void __init large_free(void *wher +@@ -52,16 +52,6 @@ } #ifndef TEST @@ -9,19 +9,29 @@ - return kmalloc(size, GFP_KERNEL); -} - - static void __init free(void *where) +-static void __init free(void *where) +-{ +- kfree(where); +-} +- + static void __init error(char *x) { - kfree(where); -@@ -321,7 +316,7 @@ typedef struct { - #define LZMA_LITERAL (LZMA_REP_LEN_CODER + LZMA_NUM_LEN_PROBS) + printk(KERN_ERR "%s\n", x); +@@ -166,13 +156,6 @@ + } + } - --STATIC int unlzma(char *inbuf, int in_len, -+int unlzma(char *inbuf, int in_len, - int(*fill)(void*,unsigned int), - int(*writebb)(char*,unsigned int), - int *posp) -@@ -348,10 +343,21 @@ STATIC int unlzma(char *inbuf, int in_le +- +-/* Called once. TODO: bb_maybe_free() */ +-static always_inline void rc_free(rc_t * rc) +-{ +- free(rc->buffer); +-} +- + /* Called twice, but one callsite is in speed_inline'd rc_is_bit_0_helper() */ + static void rc_do_normalize(rc_t * rc) + { +@@ -348,10 +331,22 @@ rc_init(&rc, fill, inbuf, in_len); @@ -30,14 +40,15 @@ - rc_read(&rc); - ((unsigned char *)&header)[i] = *rc.ptr++; + header.dict_size = header.dst_size = in_len; -+ if (inbuf && inbuf[0] == 0) { ++ if (inbuf && in_len > 0 && inbuf[0] == 0) { + const int LZMA_LC = 3, LZMA_LP = 0, LZMA_PB = 2; + header.pos = (LZMA_PB * 45) + (LZMA_LP * 5) + LZMA_LC; + rc.ptr++; + } + else { + int hdrsize = sizeof(header); -+ if (inbuf && (1 + * (unsigned long *) &inbuf[9]) > 1U) ++ if (inbuf && in_len > 12 && ++ (1 + * (unsigned long *) &inbuf[9]) > 1U) + hdrsize = 5; + for (i = 0; i < hdrsize; i++) { + if (rc.ptr >= rc.buffer_end)