netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* skb_linearize
@ 2012-09-16  9:17 Michael S. Tsirkin
  2012-09-16 15:07 ` skb_linearize Ben Hutchings
  0 siblings, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2012-09-16  9:17 UTC (permalink / raw)
  To: netdev, Herbert Xu

I notice that dev_hard_start_xmit might invoke
__skb_linearize e.g. if device does not support NETIF_F_SG.

This in turn onvokes __pskb_pull_tail, and
documentation of __pskb_pull_tail says:
  &sk_buff MUST have reference count of 1.

I am guessing 'reference count' means users in this context, right?
IIUC this is because it modifies skb in a way that
isn't safe if anyone else is looking at the skb.


However, I don't see what guarantees that reference
count is 1 when dev_hard_start_xmit invokes
linearize. In particular it calls dev_queue_xmit_nit
which could queue packets on a network tap.

Could someone help me understand please?

Thanks!

-- 
MST

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-31 21:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-16  9:17 skb_linearize Michael S. Tsirkin
2012-09-16 15:07 ` skb_linearize Ben Hutchings
2012-10-31 19:15   ` skb_linearize Michael S. Tsirkin
2012-10-31 21:03     ` skb_linearize Ben Hutchings

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).