Is it possible to cause kernel panic by removing a device driver and then making a system call that uses that driver so that kernel goes in panic?
-
Usually not, if device drivers is in use, eg, an ioctl call is running, then you can't unload the driver until the call return. After that, these ioctl would simply return an error like ENOSYS. Hope you understand that this is not talking about deleting a file on the filesystem.炸鱼薯条德里克– 炸鱼薯条德里克2019-07-09 03:51:47 +00:00Commented Jul 9, 2019 at 3:51
-
But an illy programmed kernel module might cause kernel panic anyway when it run into a bug, including when it's executin exit function炸鱼薯条德里克– 炸鱼薯条德里克2019-07-09 03:59:59 +00:00Commented Jul 9, 2019 at 3:59
2 Answers
It is possible when driver is not properly removed and application tried to use. If driver is removed properly kernel will give error like driver not found but never crash(In 99.99% cases until it hit any bug).
It is highly possible on the environment where the OS is configured on the SAN (Storage Area Networks) disks.
In my current client all servers boot disks are configured/installed with the SAN disks, i have seen many times kernel panic when the device driver not loaded or it's deleted.