[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090418.013538.126788034.davem@davemloft.net>
Date: Sat, 18 Apr 2009 01:35:38 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: penguin-kernel@...ove.SAKURA.ne.jp
Cc: netdev@...r.kernel.org
Subject: Re: What is lock_sock() before skb_free_datagram() for?
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Date: Sat, 18 Apr 2009 17:04:01 +0900
> 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?
UDP does global socket memory accounting, and supports transient
state between sendmsg() calls via MSG_MORE, so it needs
locking.
RAW does not support those things, so doesn't need the locking.
--
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