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]
Message-ID: <CAGZFCEHHXbnsSoBaTUdxqwoQ75hN5BTBXJMEXp0dkwQbFSEkRw@mail.gmail.com>
Date:	Wed, 24 Jun 2015 14:47:35 +0530
From:	ratheesh kannoth <ratheesh.ksz@...il.com>
To:	netdev <netdev@...r.kernel.org>,
	linux-newbie <linux-newbie@...r.kernel.org>
Subject: sock_hold and sock_put

Hi list,

There is a comment on sock_hold() function -

561 /* Grab socket reference count. This operation is valid only
562    when sk is ALREADY grabbed f.e. it is found in hash table
563    or a list and the lookup is made under lock preventing hash table
564    modifications.
565  */


But i could see instances of sock hold() in kernel  without any locks.


How  the race between sock_hold() and sock_put() is prevented in  smp ?

note: I would like to use sock_hold() and sock_put() in
netdev_notifier chain call back functions.

-Ratheesh
--
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