2001-02-02 15:17:20

by infernix

[permalink] [raw]
Subject: isdn_ppp.c bug (isdn_lzscomp.c aka STAC compression > oops on 2.4.x)

Hi,

I tried to run ISDN STAC compression on my 2.4.0 kernel. It compiled fine
but once I dialed in and started to use STAC compression it gave me a big
fat oops. I mailed Andre Beck ([email protected]), the author of
isdn_lzscomp.c (available at http://www.isdn4linux.de) if this was a known problem,
and there was a fix yet. After a while, he responded with:

> Yep. I've found a bug that was introduced in the late 2.4.0-test
> releases and caused an skb to be freed twice, forcing the kernel
> into a BUG() Oops. The current maintainer of isdn_ppp.c acked that
> bug and prepared this patch, which cured the problem on all test
> systems so far.

However, the patch hasn't been implemented yet, neither in 2.4.1 or in
2.4.1-ac1, because the obvious "HACK,HACK,HACK" sentence is still present :)
Could someone see to it that this mail reaches the kernel's isdn_ppp.c
maintainer and get this thing moving? Thanks.

Regards,

infernix

--- linux-2.4.1-pre8/drivers/isdn/isdn_ppp.c Wed Jan 17 21:09:00 2001
+++ linux-2.4.1-pre8-make-9.work/drivers/isdn/isdn_ppp.c Sun Jan 21 17:47:27
2001
@@ -2310,8 +2310,7 @@
rsparm.data = rsdata;
rsparm.maxdlen = IPPP_RESET_MAXDATABYTES;

- /* !!!HACK,HACK,HACK!!! 2048 is only assumed */
- skb_out = dev_alloc_skb(2048);
+ skb_out = dev_alloc_skb(is->mru + PPP_HDRLEN);
len = ipc->decompress(stat, skb, skb_out, &rsparm);
kfree_skb(skb);
if (len <= 0) {
@@ -2332,14 +2331,17 @@
kfree_skb(skb_out);
return NULL;
}
-
- if (isdn_ppp_skip_ac(ri, skb) < 0) {
- kfree_skb(skb);
+ /* compressed packet always starts with the protocol field,
+ * no need to skip address/control field */
+#if 0
+ if (isdn_ppp_skip_ac(ri, skb_out) < 0) {
+ kfree_skb(skb_out);
return NULL;
}
- *proto = isdn_ppp_strip_proto(skb);
+#endif
+ *proto = isdn_ppp_strip_proto(skb_out);
if (*proto < 0) {
- kfree_skb(skb);
+ kfree_skb(skb_out);
return NULL;
}
return skb_out;



2001-02-02 17:18:59

by Kai Germaschewski

[permalink] [raw]
Subject: Re: isdn_ppp.c bug (isdn_lzscomp.c aka STAC compression > oops on 2.4.x)


On Fri, 2 Feb 2001, infernix wrote:

> However, the patch hasn't been implemented yet, neither in 2.4.1 or in
> 2.4.1-ac1, because the obvious "HACK,HACK,HACK" sentence is still present :)
> Could someone see to it that this mail reaches the kernel's isdn_ppp.c
> maintainer and get this thing moving? Thanks.

Look again. The patch you quoted is in patch-2.4.1.bz2. Don't know about
2.4.1-ac1. (But I doubt it's reverted there :)

--Kai


2001-02-03 00:16:25

by infernix

[permalink] [raw]
Subject: Re: isdn_ppp.c bug (isdn_lzscomp.c aka STAC compression > oops on 2.4.x)

Hi,

Unfortunately you are too right. It appears that the "!!!HACK,HACK,HACK!!!
2048 is only assumed" line is gone in 2.4.1, but is back in 2.4.1-ac1. Can
this be fixed?

Regards,

infernix

----- Original Message -----
From: "Kai Germaschewski" <[email protected]>
To: "infernix" <[email protected]>
Cc: <[email protected]>
Sent: Friday, February 02, 2001 6:18 PM
Subject: Re: isdn_ppp.c bug (isdn_lzscomp.c aka STAC compression > oops on
2.4.x)


>
> On Fri, 2 Feb 2001, infernix wrote:
>
> > However, the patch hasn't been implemented yet, neither in 2.4.1 or in
> > 2.4.1-ac1, because the obvious "HACK,HACK,HACK" sentence is still
present :)
> > Could someone see to it that this mail reaches the kernel's isdn_ppp.c
> > maintainer and get this thing moving? Thanks.
>
> Look again. The patch you quoted is in patch-2.4.1.bz2. Don't know about
> 2.4.1-ac1. (But I doubt it's reverted there :)
>
> --Kai