lkml.org 
[lkml]   [2012]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 3/3] pppoatm: protect against freeing of vcc
    On Wed, 28 Nov 2012 21:18:37 +0100
    Krzysztof Mazur <krzysiek@podlesie.net> wrote:

    > On Tue, Nov 27, 2012 at 07:28:43PM +0100, Krzysztof Mazur wrote:
    > > I think that we should add atm_pop() function that does that and fix all
    > > drivers.
    > >
    >
    > I'm sending a patch that implements that idea.
    >
    > Currently we need two arguments vcc and skb. However, we have reserved
    > ATM_SKB(skb)->vcc in skb control block for keeping vcc
    > and we can create single argument version vcc_pop(skb). In that case
    > we need to move:
    >
    > ATM_SKB(skb)->vcc = vcc;
    >
    > from ATM drivers to functions that call atmdev_ops->send().

    i dont like the vcc->pop() implementation and at one point i had the
    crazy idea of using skb->destructors to handle it. however, i think it
    would be necessary to clone the skb's so any existing destructor is
    preserved.

    > +#define vcc_pop(vcc, skb) vcc_pop_any(vcc, skb)
    > +#define vcc_pop_irq(vcc, skb) vcc_pop_any(vcc, skb)

    don't define these if you dont plan on using them anway.


    \
     
     \ /
      Last update: 2012-11-28 23:01    [W:3.789 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site