Re: 回复 : about devfs_free

From: Konstantin Belousov <>
Date: Sun, 22 Oct 2023 10:29:53 UTC
On Sun, Oct 22, 2023 at 10:10:52AM +0000, YU SHANG wrote:
> I’m sorry. I’ve found it will be detached from cdevp_list in devfs_revoke.
Drivers should not touch this level of interfaces.
Read make_dev(9)/destroy_dev(9) man pages about management of cdevs from the
driver side.

> 发件人: YU SHANG<>
> 发送时间: 2023年10月19日 18:45
> 收件人:<>
> 主题: about devfs_free
> Hi guys,
> I am a newbie in FreeBSD driver development. I found that devfs_free(sys\fs\devfs\devfs_devs.c) does not detach the cdev_priv from the cdevp_list before free it. cdev_priv is inserted into cdevp_list in devfs_create(sys\fs\devfs\devfs_devs.c). What I have missed? Many thank.