Re: mbuf_dup/mbuf_freem with mbufs containing aux data
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=FJ8Gb9kQBmwP5kPWDsk306slxy7ZKMkePDzAVK3JjBloRg6st6J8PvcUoTOjDmkPByNMmc2PxNTXhkGMreA/8jErtrHYP8p9x1eaXQW+SEGO/S4pXXNclYsUsaRzwREWHuSwASrVbyozzb0Uy+EchAK5XX4eMIt/0FYlR+/5LrY= Hi Adi,
What's my workaround? You may want your code to first check if the new mbuf resulted from mbuf_dup() has the same auxiliary mbuf attached to it, and if so manually copy the auxiliary mbuf and attach it to the new mbuf using mbuf_aux_add(). That way, when this bug is fixed your code would still work.
How do I check if the new mbuf resulted from mbuf_dup() has auxiliary data at all? I couldn't see any accessors in kpi_mbuf. If there were, then I would have simply queried if there was aux data attached in the new mbuf, and NULL'ed the aux pointer in the new mbuf, because my clients for the duplicated mbuf don't care about that aux data. Thanks! -- Bhavesh P. Davda _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... Adi This email sent to site_archiver@lists.apple.com
participants (1)
-
Bhavesh Davda