Subject: Re: What is lock_sock() before skb_free_datagram() for?

From: Eric Dumazet <[email-masked]>
Date: Sat, 18 Apr 2009 10:09:57 +0200

Tetsuo Handa a écrit :
> Hello.
> 
> udp_recvmsg() and udpv6_recvmsg() call skb_free_datagram() with 
> lock_sock().
> But raw_recvmsg() and rawv6_recvmsg() call skb_free_datagram() 
> without
> lock_sock().
> Is it OK?

Yes it is.

UDP protocol has memory accounting in recent kernels, not RAW.