Date: Mon, 27 Aug 2001 14:23:58 +0400 (MSD) From: "Eugene L. Vorokov" <vel@bugz.infotecs.ru> To: roam@ringlet.net (Peter Pentchev) Cc: freebsd-hackers@freebsd.org Subject: Re: problem with unloading device driver Message-ID: <200108271023.f7RANw202324@bugz.infotecs.ru> In-Reply-To: <20010827131328.G2218@ringworld.oblivion.bg> from "Peter Pentchev" at Aug 27, 2001 01:13:28 PM
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108271023.f7RANw202324>