lkml.org 
[lkml]   [2010]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: addrconf: refcnt with IPV6_PRIVACY enabled
    From
    Date
    Le mardi 23 novembre 2010 à 16:53 +0200, Sergey Senozhatsky a écrit :
    >
    > > ipv6_regen_rndid() is the timer handler function, it must call
    > > in6_dev_put() at the end, unless we rearm the timer.
    > >
    > > So this code is correct.
    > >
    > >
    > > if (!mod_timer(&idev->regen_timer, expires))
    > > in6_dev_hold(idev);
    > > ...
    > > in6_dev_put(idev);
    > >
    >
    > Even if in6_dev_hold hasn't been called from ipv6_regen_rndid?
    >


    Yes.

    Rules are :

    in6_dev_hold() when arming timer, so that device doesnt disappear while
    timer handler might run and need it.

    in6_dev_put() when timer handler finishes




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

    \
     
     \ /
      Last update: 2010-11-23 16:11    [W:0.022 / U:60.856 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site