driver free hook not called
|Reported by:||marcusoverhagen||Owned by:||marcusoverhagen|
When an application has opened a driver and doesn't close it, the driver's free hook will not be called when the application crashes or is killed. However, the close hook does get called.
It looks like vfs_free_io_context() calls close_fd() and put_fd(), close_fd will call close hook if previous reference count was 1 put_fd will call free hook if previous reference count was 1. Something is wrong with that logic
ls /dev/dvb/cs23882/1 cx23882: driver open cx23882: driver read cx23882: driver close cx23882: driver free . tail -f /dev/dvb/cs23882/1 (or opening media server and killing media_server) cx23882: driver open cx23882: driver read cx23882: driver close . ls /dev/dvb/cs23882/1 cx23882: driver open (=> B_BUSY, because free hook wasn't called)