Date: Fri, 6 Jun 2014 10:40:20 +0000 (UTC) From: Luigi Rizzo <luigi@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267150 - head/sys/dev/netmap Message-ID: <201406061040.s56AeKxi058979@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: luigi Date: Fri Jun 6 10:40:20 2014 New Revision: 267150 URL: http://svnweb.freebsd.org/changeset/base/267150 Log: prevent a panic when the netdev/ifp is not set in attach (internal c63a7b85) MFC after: 3 days Modified: head/sys/dev/netmap/netmap.c Modified: head/sys/dev/netmap/netmap.c ============================================================================== --- head/sys/dev/netmap/netmap.c Fri Jun 6 08:42:03 2014 (r267149) +++ head/sys/dev/netmap/netmap.c Fri Jun 6 10:40:20 2014 (r267150) @@ -2260,7 +2260,8 @@ netmap_attach(struct netmap_adapter *arg fail: D("fail, arg %p ifp %p na %p", arg, ifp, hwna); - netmap_detach(ifp); + if (ifp) + netmap_detach(ifp); return (hwna ? EINVAL : ENOMEM); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406061040.s56AeKxi058979>