[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1319034836.8416.30.camel@edumazet-laptop>
Date: Wed, 19 Oct 2011 16:33:56 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Richard Cochran <richardcochran@...il.com>
Cc: Johannes Berg <johannes@...solutions.net>,
David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH 0/3] net: time stamping fixes
Le mercredi 19 octobre 2011 à 16:27 +0200, Richard Cochran a écrit :
> On Wed, Oct 19, 2011 at 04:24:08PM +0200, Johannes Berg wrote:
> > On Wed, 2011-10-19 at 16:08 +0200, Eric Dumazet wrote:
> >
> > > > Anyway, I guess you agree that the patches as-is aren't actually the
> > > > right solution since we can't sock_hold() a TX skb socket reference?
> > >
> > > Yes, the sock_hold() could be changed by an atomic_inc_not_zero()
> > >
> > > What about doing this ?
> >
> > > if (likely(phydev->drv->txtstamp)) {
> > > + if (!atomic_inc_not_zero(&sk->sk_refcnt))
> > > + return;
> >
> > Yeah that seems like it works and just drops the timestamp in case we
> > don't still have a live socket, which is perfectly fine.
>
> Yes, I think it resolves any doubt. I will resubmit with this
> solution.
>
Thanks guys !
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists