Hi,

    When I was looking into consume_skb() routine (net/core/skbuff.c),
there is smp_rmb() read barrier is present.
    It is not clear why this is needed here.  Basically this routine frees
sk_buff if only one user reference is theere

     void consume_skb(struct sk_buff * skb)
     {
         if (unlikely(!skb))
              return;
         if (likley (atomic_read (&skb->users) == 1))
              smp_rmb()
 --------------------------------------------------------> need for this
barrier

            ......
          __kfree_skb();
     }


Regards

Kshemendra
_______________________________________________
Kernelnewbies mailing list
[email protected]
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to