[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1319034248.1286.8.camel@jlt3.sipsolutions.net>
Date: Wed, 19 Oct 2011 16:24:08 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Richard Cochran <richardcochran@...il.com>,
David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH 0/3] net: time stamping fixes
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.
johannes
--
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