[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] network hang trigger
> in file net/core.c > ====================================== > if (!dev->hard_start_xmit(skb, dev)) { > HARD_TX_UNLOCK_BH(dev); > goto out; > } > ... > > out_kfree_skb: > kfree_skb(skb); > out: > return rc; > ====================================== > > Bingo, it doesn't. And take a look at other network driver source codes, > e.g. 8139too.c, 3c501.c etc, they all ***free skb*** upon error and > ***always return 0***. This is *hidden contract* between the caller and the > callee. (1) See drivers like 3c59x.c. They do not free the skbuff when they return non-zero. (2) Look again at the code fragment you've posted -- the body of the 'if' statement is executed when hard_start_xmit returns zero. So the body corresponds to the NON-ERROR case! You'll see that the error case does in fact free the skbuff. > So, skbuffs don't get freed until gc'ed. No, there is no bug here. And if we were leaking skbuffs they would never be freed. There is no automatic garbage collection within the kernel. -- Keir ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |