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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to