+ fix-ppp_deflate-issues-with-recent-zlib_inflate-changes.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Fix ppp_deflate issues with recent zlib_inflate changes
has been added to the -mm tree.  Its filename is
     fix-ppp_deflate-issues-with-recent-zlib_inflate-changes.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: Fix ppp_deflate issues with recent zlib_inflate changes
From: Richard Purdie <rpurdie@xxxxxxxxx>

The last zlib_inflate update broke certain corner cases for ppp_deflate
decompression handling.  This patch fixes some logic to make things work
properly again.  Users other than ppp_deflate (the only Z_PACKET_FLUSH
user) should be unaffected.

Fixes bug 8405 (confirmed by Stefan)

Signed-off-by: Richard Purdie <rpurdie@xxxxxxxxx>
Cc: Stefan Wenk <stefan.wenk@xxxxxx>
Cc: <stable@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/zlib_inflate/inflate.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff -puN lib/zlib_inflate/inflate.c~fix-ppp_deflate-issues-with-recent-zlib_inflate-changes lib/zlib_inflate/inflate.c
--- a/lib/zlib_inflate/inflate.c~fix-ppp_deflate-issues-with-recent-zlib_inflate-changes
+++ a/lib/zlib_inflate/inflate.c
@@ -743,12 +743,14 @@ int zlib_inflate(z_streamp strm, int flu
 
     strm->data_type = state->bits + (state->last ? 64 : 0) +
                       (state->mode == TYPE ? 128 : 0);
-    if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
-        ret = Z_BUF_ERROR;
 
     if (flush == Z_PACKET_FLUSH && ret == Z_OK &&
-            (strm->avail_out != 0 || strm->avail_in == 0))
+            strm->avail_out != 0 && strm->avail_in == 0)
 		return zlib_inflateSyncPacket(strm);
+
+    if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
+        ret = Z_BUF_ERROR;
+
     return ret;
 }
 
_

Patches currently in -mm which might be from rpurdie@xxxxxxxxx are

fix-ppp_deflate-issues-with-recent-zlib_inflate-changes.patch
git-leds.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux