Not sure about this one Corey.
If a reader catches previous value of item->sk_hash, two cases are to be taken into :
1) its udp_hashfn(net, sk->sk_hash) is != hash
-> goto begin : Reader will redo its scan
2) its udp_hashfn(net, sk->sk_hash) is == hash
-> next pointer is good enough : it points to next item in same hash chain.
No need to rescan the chain at this point.
Yes we could miss the fact that a new port was bound and this UDP message could be lost.
If we force a smp_wmb(), reader would fetch pointer to begin of list.
1) its udp_hashfn(net, sk->sk_hash) is != hash
-> goto begin : Reader will redo its scan : next pointer value had no meaning
2) its udp_hashfn(net, sk->sk_hash) is == hash
->next pointer "force reader" to rescan the chain, but wont find new items.
In any case, we cannot lost an UDP message sent to a stable port (previously bound)
Thanks
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html