From owner-freebsd-hackers Mon Aug 27 3:24:15 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from bugz.infotecs.ru (bugz.infotecs.ru [195.210.139.22]) by hub.freebsd.org (Postfix) with ESMTP id BAC2F37B403 for ; Mon, 27 Aug 2001 03:24:10 -0700 (PDT) (envelope-from vel@bugz.infotecs.ru) Received: (from root@localhost) by bugz.infotecs.ru (8.11.6/8.11.4) id f7RANw202324; Mon, 27 Aug 2001 14:23:58 +0400 (MSD) (envelope-from vel) From: "Eugene L. Vorokov" Message-Id: <200108271023.f7RANw202324@bugz.infotecs.ru> Subject: Re: problem with unloading device driver To: roam@ringlet.net (Peter Pentchev) Date: Mon, 27 Aug 2001 14:23:58 +0400 (MSD) Cc: freebsd-hackers@freebsd.org In-Reply-To: <20010827131328.G2218@ringworld.oblivion.bg> from "Peter Pentchev" at Aug 27, 2001 01:13:28 PM X-Mailer: ELM [version 2.5 PL5] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > Hello, > > > > I have a module which adds new device. It does make_dev() and then simulates > > mknod() syscall, so that /dev/name is always automatically created. > > Also I have a daemon which reads from and writes to this device. The daemon > > opens the device once and then holds it open. When my module unloads, > > it simulates unlink() and then does detsroy_dev(). I just noticed that > > when I unload my module, the first write() by daemon to the fd associated with > > that device causes system to crash. > > Is there really a reason you do not want to keep a persistent device > entry in /dev? Aside from cluttering /dev - this is a problem solved > in -current with a working devfs. True, -stable does not really have > a devfs - the one that was in the tree was removed, because it was > way less functional (and working) than the one in -current; still, > why, really, should you be worried about one (or five) more device > nodes in /dev? The point is that I do not want user to create device node in /dev manually; it's a production module, and the requirement is to have everything added automatically on load and not to have unconfigured entries when module is not loaded. Do you think it will stop crashing if I keep persistent device nodes in /dev ? Regards, Eugene To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message