Re: In a tty driver cleanup, what triggers removal of /dev/tty__?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 03, 2017 at 02:56:34PM +0000, Grant Edwards wrote:
> I've recently received a bug report on a tty driver that I maintain:

Which one?

> the problem is that when the driver is unloaded, the /dev/tty__ files
> remain.  [I thought that the /dev/tty__ files used to go away when the
> module was unloaded.]
> 
> In my module_cleanup function I do this:
> 
>   for each port:
>      tty_unregister_device(driver, portnum);
>      tty_port_destroy(&info->port)
> 
>   tty_unregister_driver(driver);
>   put_tty_driver(driver);
> 
> What is that that is supposed to trigger removal of the char device
> files?  [When my uart drivers are unloaded, the /dev/tty__ files go
> away, so there's something that serial_core is doing that my tty
> driver needs to do...]

Which driver is this?  Are you sure you aren't leaking a reference
somewhere?  That will cause the sysfs files/directory from being removed
properly.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux