lkml.org 
[lkml]   [2010]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH net-2.6 resent] af_packet: Don't use skb after dev_queue_xmit()
    On Sun, Jan 10, 2010 at 01:51:35PM -0800, David Miller wrote:
    > From: Jarek Poplawski <jarkao2@gmail.com>
    > Date: Sat, 9 Jan 2010 13:38:27 +0100
    >
    > > tpacket_snd() can change and kfree an skb after dev_queue_xmit(),
    > > which is illegal.
    > >
    > > With debugging by: Stephen Hemminger <shemminger@vyatta.com>
    > >
    > > Reported-by: Michael Breuer <mbreuer@majjas.com>
    > > Tested-by: Michael Breuer <mbreuer@majjas.com>
    > > Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
    > > Acked-by: Stephen Hemminger <shemminger@vyatta.com>
    >
    > Jarek, if this code path triggers, it will deadlock the
    > send ring with your changes.
    >
    > We will now leave the ring packet status in the "SENDING" state.
    >
    > That's not right.

    No, the destructor of this skb, tpacket_destruct_skb(), will clean
    this. (Just like for other skbs kfreed during dev_queue_xmit().)

    Jarek P.


    \
     
     \ /
      Last update: 2010-01-10 23:23    [W:0.043 / U:30.244 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site