Hello, Jiri Olsa wrote:So, the problem is the half barrier semantics of spin_lock on CPU1's side and lack of any barrier (read for tp->rcv_nxt check can creep above the queuelist update) in waitqueue_active() check on CPU2's side (read for waitqueue list can creep above tcv_nxt update). Am I understanding it right? This is a little bit scary. The interface kind of suggests that they have strong enough barrier semantics (well, I would assume that). I wonder whether there are more more places where this kind of race condition exists. I'm not entirely sure this is the correct place to do it while the mb for the other side lives in network code. Wouldn't it be better to move this memory barrier to network select code? It's strange for an API to have only single side of a barrier pair and leave the other to the API user. Also, maybe we need smp_mb__after_unlock() too? Maybe add_wait_queue_mb() possibly paired with wait_queue_active_mb() is better? On x86, it wouldn't make any difference tho. One more thing, can you please use fully winged style for multiline comments? Thanks. -- tejun -- 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
| Hiten Pandya | Re: up? (emacs docbook xml ide) |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Roland Dreier | Re: Integration of SCST in the mainstream Linux kernel |
| Florian Schmidt | blacklist kernel boot option |
git: | |
| Linus Torvalds | Re: iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49 |
| Arjan van de Ven | Re: [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
