From owner-freebsd-current@FreeBSD.ORG Thu Nov 22 14:10:42 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DF262EB4; Thu, 22 Nov 2012 14:10:42 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from ns.kevlo.org (kevlo.org [220.128.136.52]) by mx1.freebsd.org (Postfix) with ESMTP id 7955F8FC15; Thu, 22 Nov 2012 14:10:41 +0000 (UTC) Received: from srg.kevlo.org (git.kevlo.org [220.128.136.52]) by ns.kevlo.org (8.14.5/8.14.5) with ESMTP id qAMEAOc5087344; Thu, 22 Nov 2012 22:10:24 +0800 (CST) (envelope-from kevlo@FreeBSD.org) Message-ID: <50AE325B.1060409@FreeBSD.org> Date: Thu, 22 Nov 2012 22:10:35 +0800 From: Kevin Lo User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:15.0) Gecko/20121009 Thunderbird/15.0.1 MIME-Version: 1.0 To: David Xu Subject: Re: Is this a typo in if_tap.c? References: <50ADF2D4.2010805@freebsd.org> In-Reply-To: <50ADF2D4.2010805@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2012 14:10:42 -0000 On 2012/11/22 17:39, David Xu wrote: > When I was trying to create a second tap device, kernel crashed. > Is this patch correct ? > > > Index: sys/net/if_tap.c > =================================================================== > --- sys/net/if_tap.c (revision 243397) > +++ sys/net/if_tap.c (working copy) > @@ -186,7 +186,7 @@ > /* Find any existing device, or allocate new unit number. */ > i = clone_create(&tapclones, &tap_cdevsw, &unit, &dev, 0); > if (i) { > - dev = make_dev(&tap_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, > + dev = make_dev(&tap_cdevsw, unit, UID_ROOT, GID_WHEEL, 0600, > "%s%d", tapname, unit); > } > The patch looks right to me. Kevin