2006-01-02 15:45:52

by Graham Gower

[permalink] [raw]
Subject: [PATCH] [TRIVIAL] prism54/islpci_eth.c: dev_kfree_skb in irq context

dev_kfree_skb shouldn't be used in an IRQ context.

Signed-off-by: Graham Gower <[email protected]>


--- linux/drivers/net/wireless/prism54/islpci_eth.c.orig 2006-01-03
01:23:27.000000000 +1030
+++ linux/drivers/net/wireless/prism54/islpci_eth.c 2006-01-03
00:38:46.000000000 +1030
@@ -178,7 +178,7 @@
#endif

newskb->dev = skb->dev;
- dev_kfree_skb(skb);
+ dev_kfree_skb_irq(skb);
skb = newskb;
}
}
@@ -242,7 +242,7 @@

drop_free:
/* free the skbuf structure before aborting */
- dev_kfree_skb(skb);
+ dev_kfree_skb_irq(skb);
skb = NULL;

priv->statistics.tx_dropped++;


2006-01-02 16:39:06

by Daniel Drake

[permalink] [raw]
Subject: Re: [PATCH] [TRIVIAL] prism54/islpci_eth.c: dev_kfree_skb in irq context

Graham Gower wrote:
> dev_kfree_skb shouldn't be used in an IRQ context.
>
> Signed-off-by: Graham Gower <[email protected]>
>
>
> --- linux/drivers/net/wireless/prism54/islpci_eth.c.orig 2006-01-03
> 01:23:27.000000000 +1030
> +++ linux/drivers/net/wireless/prism54/islpci_eth.c 2006-01-03
> 00:38:46.000000000 +1030

Patch header is linewrapped (patch seems OK though).

You probably want to send this to Jeff Garzik CC'ing the netdev list. I
didn't get any response from the prism54 developers when I submitted a
fix for a similar problem in November.

Daniel

2006-01-03 09:59:14

by Roger While

[permalink] [raw]
Subject: Re: [PATCH] [TRIVIAL] prism54/islpci_eth.c: dev_kfree_skb in irq context

What makes you think this is in IRQ context ?


2006-01-03 12:19:35

by Graham Gower

[permalink] [raw]
Subject: Re: [PATCH] [TRIVIAL] prism54/islpci_eth.c: dev_kfree_skb in irq context

012345678901234567890123456789012345678901234567890123456789

On 03/01/06, Roger While <[email protected]> wrote:
> What makes you think this is in IRQ context ?
>

Er... yeah. I must have been off my nut when I wrote that comment.
A more apt comment should perhaps have been "dev_kfree_skb shouldn't be
used with interrupts disabled". Forgive my noobness, I'm a kernel patch virgin.

My logs were starting to fill with messages exatcly like that mentioned here:
http://patchwork.netfilter.org/netfilter-devel/patch.pl?id=2840

In any event, the patch at the end of that link was never applied (it doesn't
fix the other call to dev_kfree_skb). After applying my patch, I've not had any
more messages in the logs.

Graham

2006-01-03 13:12:20

by Patrick McHardy

[permalink] [raw]
Subject: Re: [PATCH] [TRIVIAL] prism54/islpci_eth.c: dev_kfree_skb in irq context

Graham Gower wrote:
> My logs were starting to fill with messages exatcly like that mentioned here:
> http://patchwork.netfilter.org/netfilter-devel/patch.pl?id=2840
>
> In any event, the patch at the end of that link was never applied (it doesn't
> fix the other call to dev_kfree_skb). After applying my patch, I've not had any
> more messages in the logs.

The patch has been applied to 2.6.15-rc. Only the first hunk of your
patch is still required, but it doesn't apply anymore. Can you send
a new patch against 2.6.15 please?

2006-01-03 23:03:29

by Graham Gower

[permalink] [raw]
Subject: Re: [PATCH] [TRIVIAL] prism54/islpci_eth.c: dev_kfree_skb in irq context

On 03/01/06, Patrick McHardy <[email protected]> wrote:
> Graham Gower wrote:
> > My logs were starting to fill with messages exatcly like that mentioned here:
> > http://patchwork.netfilter.org/netfilter-devel/patch.pl?id=2840
> >
> > In any event, the patch at the end of that link was never applied (it doesn't
> > fix the other call to dev_kfree_skb). After applying my patch, I've not had any
> > more messages in the logs.
>
> The patch has been applied to 2.6.15-rc. Only the first hunk of your
> patch is still required, but it doesn't apply anymore. Can you send
> a new patch against 2.6.15 please?
>

Ok, here's a new one. Hope I got it right this time.

Signed-off-by: Graham Gower <[email protected]>

--- linux-2.6.15/drivers/net/wireless/prism54/islpci_eth.c.orig
+++ linux-2.6.15/drivers/net/wireless/prism54/islpci_eth.c
@@ -177,7 +177,7 @@
#endif

newskb->dev = skb->dev;
- dev_kfree_skb(skb);
+ dev_kfree_skb_irq(skb);
skb = newskb;
}
}