[dillon@FreeBSD.org: cvs commit: src/sys/net zlib.c]
Jos Backus
josb at cncdsl.com
Thu Mar 21 05:36:41 EST 2002
What about this one? The diff looks like this:
--- src/sys/net/zlib.c 2002/02/17 17:35:18 1.11
+++ src/sys/net/zlib.c 2002/03/20 04:05:26 1.12
@@ -10,7 +10,7 @@
* - added inflateIncomp and deflateOutputPending
* - allow strm->next_out to be NULL, meaning discard the output
*
- * $FreeBSD: /c/ncvs/src/sys/net/zlib.c,v 1.11 2002/02/17 17:35:18 jedgar Exp $
+ * $FreeBSD: /c/ncvs/src/sys/net/zlib.c,v 1.12 2002/03/20 04:05:26 dillon Exp $
*/
/*
@@ -3951,11 +3951,15 @@ int r;
r = Z_MEM_ERROR;
LEAVE
}
+ /*
+ * this ZFREE must occur *BEFORE* we mess with sub.decode, because
+ * sub.trees is union'd with sub.decode.
+ */
+ ZFREE(z, s->sub.trees.blens);
s->sub.decode.codes = c;
s->sub.decode.tl = tl;
s->sub.decode.td = td;
}
- ZFREE(z, s->sub.trees.blens);
s->mode = CODES;
case CODES:
UPDATE
----- Forwarded message from Matt Dillon <dillon at FreeBSD.org> -----
Date: Tue, 19 Mar 2002 20:05:26 -0800 (PST)
From: Matt Dillon <dillon at FreeBSD.org>
To: cvs-committers at FreeBSD.org, cvs-all at FreeBSD.org
Subject: cvs commit: src/sys/net zlib.c
dillon 2002/03/19 20:05:26 PST
Modified files:
sys/net zlib.c
Log:
Fix a bug introduced in 1.11 (and also MFCd to stable AND the security branch)
that causes a machine to panic when the kernel PPP / DEFLATE code is used.
1.11 moved a ZFREE to a point after the structural members were clobbered
by stores into a union'd structure.
This commit fixes the bug and adds a big whopping comment to make sure
the code isn't 'cleaned up' again :-)
Ian Dowse came up with the same patch independantly 68 seconds before I
did, talk about Karma!
I would also like to thank Eugene Grosbein for marathon work in tracking the
problem down by udpating his -stable based on date over and over again
to close in on the commit that caused his crashes.
PR: kern/35969
Reviewed by: Ian Dowse <iedowse at maths.tcd.ie>
X-MFC after: immediately
Revision Changes Path
1.12 +5 -1 src/sys/net/zlib.c
To Unsubscribe: send mail to majordomo at FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
----- End forwarded message -----
--
Jos Backus _/ _/_/_/ Santa Clara, CA
_/ _/ _/
_/ _/_/_/
_/ _/ _/ _/
josb at cncdsl.com _/_/ _/_/_/ use Std::Disclaimer;
More information about the rsync
mailing list