<br><div>Hi, </div><div><br></div><div> When I was looking into consume_skb() routine (net/core/skbuff.c), there is smp_rmb() read barrier is present.</div><div> It is not clear why this is needed here. Basically this routine frees sk_buff if only one user reference is theere</div>
<div><br></div><div> void consume_skb(struct sk_buff * skb)</div><div> {</div><div> if (unlikely(!skb))</div><div> return;</div><div> if (likley (atomic_read (&skb->users) == 1))</div>
<div> smp_rmb() --------------------------------------------------------> need for this barrier</div><div> </div><div> ......</div><div> __kfree_skb();</div><div> }</div><div>
<br></div><div><br></div><div>Regards</div><div><br></div><div>Kshemendra</div>