[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20111007.133356.489094996618032061.davem@davemloft.net>
Date: Fri, 07 Oct 2011 13:33:56 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: johannes@...solutions.net
Cc: netdev@...r.kernel.org, richardcochran@...il.com
Subject: Re: [RFC] net: remove erroneous sk null assignment in timestamping
From: Johannes Berg <johannes@...solutions.net>
Date: Fri, 07 Oct 2011 19:11:41 +0200
> From: Johannes Berg <johannes.berg@...el.com>
>
> skb->sk is obviously required to be non-NULL
> when we get into skb_complete_tx_timestamp().
> sock_queue_err_skb() will call skb_orphan()
> first thing which sets skb->sk = NULL itself.
> This may crash if the skb is still charged to
> the socket (skb->destructor is sk_wfree).
>
> The assignment here thus seems to not only be
> pointless (due to the skb_orphan() call) but
> also dangerous (due to the crash).
>
> Signed-off-by: Johannes Berg <johannes.berg@...el.com>
It looks like skb_clone_tx_timestamp() sets clone->sk without any
proper refcounting, so I bet this NULL'ing it out is working
around that bug.
The TX side of this infrastructure seems very poorly tested.
--
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