Netdev List
 help / color / mirror / Atom feed
* sk_buff and reference counting netdev pointers
@ 2017-01-23 22:37 Joel Cunningham
  2017-01-23 23:45 ` Cong Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Cunningham @ 2017-01-23 22:37 UTC (permalink / raw)
  To: netdev

Hi,

I’m working on a research effort to understand the synchronization mechanisms for accessing and modifying a struct net_device object.  One area that isn’t clear is the net device pointer (dev) stored in a struct sk_buff.  From my investigation, the pointer appears to be assigned without increasing the struct net_device’s reference count (example __netdev_alloc_skb doesn’t call dev_hold) and also when the sk_buff is freed (kfree_skb) no call to dev_put() is made.  This seems to leave a possibility of an skb referencing a stale net device unless something is cleaning up all the skbs during unregister_netdevice() (which waits for all outstanding references to be released).  Any insight in understanding how this is working would be appreciated!

Joel

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

end of thread, other threads:[~2017-01-25 21:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-23 22:37 sk_buff and reference counting netdev pointers Joel Cunningham
2017-01-23 23:45 ` Cong Wang
2017-01-25 21:31   ` Joel Cunningham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox