I have this device node created using mknod command for a pcie driver.
/dev/pciedrv
Upon removing the driver while device node file is open (in use), the system crashes.
rmmod -f pciedrv
Is there a way to do a graceful exit? Also how to handle the case when user application accessing the file terminates unexpectedly before closing the device node.