lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ