From owner-cvs-all Sun Sep 19 23:15:20 1999 Delivered-To: cvs-all@freebsd.org Received: from mg-20425426-100.ricochet.net (mg-20425426-100.ricochet.net [204.254.26.100]) by hub.freebsd.org (Postfix) with ESMTP id D4A5215BFB; Sun, 19 Sep 1999 23:15:00 -0700 (PDT) (envelope-from gurney_j@efn.org) Received: (from jmg@localhost) by mg-20425426-100.ricochet.net (8.9.1/8.8.7) id XAA09176; Sun, 19 Sep 1999 23:14:53 -0700 (PDT) Message-ID: <19990919231444.17922@hydrogen.fircrest.net> Date: Sun, 19 Sep 1999 23:14:44 -0700 From: John-Mark Gurney To: Bill Paul Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/pci if_sk.c if_skreg.h References: <199909180401.VAA21565@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.69 In-Reply-To: <199909180401.VAA21565@freefall.freebsd.org>; from Bill Paul on Fri, Sep 17, 1999 at 09:01:32PM -0700 Reply-To: John-Mark Gurney Organization: Cu Networking X-Operating-System: FreeBSD 3.0-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk Bill Paul scribbled this message on Sep 17: > Fix the mechanism used to choose the unit numbers for the IP interfaces > attached by the SysKonnect driver. Use ifunit() to scan for existing > skN interfaces and pick the first unused one. this is probably not just related to the sk[c] driver, but all ethernet drivers that do this... we have a race condition w/ the allocation of an interface number... if there is another attach of a similar device going on at the same time (which can happen as we go to a more modularized setup), two devices could end up w/ the same unit number which I'm sure if_attach would fall over in (hopefully)... we need to initalize ifp->if_unit in if_attach and do it in a locked way instead of leaving this up to chance... I haven't taken a look at how if_attach behaves, but this should be fixed, and any other race conditions like it... -- John-Mark Gurney Voice: +1 408 975 9651 Cu Networking "The soul contains in itself the event that shall presently befall it. The event is only the actualizing of its thought." -- Ralph Waldo Emerson To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message