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-next>] [day] [month] [year] [list]
Date:	Mon, 26 Jul 2010 17:00:15 +0300
From:	Neshama Parhoti <pneshama@...il.com>
To:	netdev@...r.kernel.org
Subject: lock_sock or sock_hold ?

hello everyone,

can you please be kind and help me understand the differences between
lock_sock and sock_hold ?

i can see that lock_sock takes a spin lock (bh) to mark owned = 1, and
then takes a mutex, whereas sock_hold only increases the atomic
refcnt.

but how do i know which of them I should use ?

i'm puzzled as to when should those two different APIs be used..

thank you a lot
~pnesh
--
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