From owner-cvs-src@FreeBSD.ORG Sun Nov 14 20:20:29 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DF6616A4CE; Sun, 14 Nov 2004 20:20:29 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DED9143D1F; Sun, 14 Nov 2004 20:20:28 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id iAEKKSUs009555; Sun, 14 Nov 2004 20:20:28 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from rwatson@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id iAEKKSXU009554; Sun, 14 Nov 2004 20:20:28 GMT (envelope-from rwatson) Message-Id: <200411142020.iAEKKSXU009554@repoman.freebsd.org> From: Robert Watson Date: Sun, 14 Nov 2004 20:20:28 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/em if_em.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Nov 2004 20:20:29 -0000 rwatson 2004-11-14 20:20:28 UTC FreeBSD src repository Modified files: sys/dev/em if_em.c Log: Further refine the if_em vlan fix in if_em.c:1.53: - Because em_encap() can now fail in a way that leaves us without an mbuf chain, potentially set *m_headp to NULL if that happens, so that the caller can do the right thing. This case can occur when we try to prepend the vlan header mbuf but can't allocate additional memory. - Modify the caller of em_encap() to detect a NULL m_head and not try to queue the mbuf if that happens. - When em_encap() fails, make sure to call bus_dmamap_destroy() to clean up. Revision Changes Path 1.54 +19 -4 src/sys/dev/em/if_em.c