Re: [PATCH net-2.6 alt.3] af_packet: Don't use skb afterdev_queue_xmit()

From: Jarek Poplawski
Date: Mon Jan 11 2010 - 17:48:32 EST


On Mon, Jan 11, 2010 at 05:30:45PM -0500, Michael Breuer wrote:
> On 1/11/2010 3:04 AM, Jarek Poplawski wrote:
...
> >----------------> (alternative 3)
> >
> >Subject: af_packet: Don't use skb after dev_queue_xmit()
> >
> >tpacket_snd() can change and kfree an skb after dev_queue_xmit(),
> >which is illegal.
> >
> >With debugging by: Stephen Hemminger<shemminger@xxxxxxxxxx>
> >
> >Reported-by: Michael Breuer<mbreuer@xxxxxxxxxx>
> >Signed-off-by: Jarek Poplawski<jarkao2@xxxxxxxxx>
> >
> >Cc: Stephen Hemminger<shemminger@xxxxxxxxxx>
> >---
> >
> > net/packet/af_packet.c | 19 ++++++++++++++-----
> > 1 files changed, 14 insertions(+), 5 deletions(-)
...
> Tested by: Michael Breuer
>
> Note: This patch is delivering better ethernet throughput (15-20%)
> and no than the previous two patches. I'm also no longer seeing
> dropped RX packets. Good work!

David, if this patch is acceptable now, please add:

With help from: David S. Miller <davem@xxxxxxxxxxxxx>

Tested-by: Michael Breuer<mbreuer@xxxxxxxxxx>

Thanks everybody,
Jarek P.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/