Skip to content

Tag: kernel

Why open() has no ‘fd’ return in linux 1.0?

Since there is no return of ‘fd’, how does it read/write later for? ex: Answer open returns a value in there. The cast-to-void is used to signal the compiler that the return value is being deliberately ignored. The init function is the one where the current thread is prepared to execute the init p…

Java 8 gradle script causing kernel panic

I have an issue where Java 8 and Gradle are causing Linux VMs to crash. Here’s the interesting part: Java 7 does not result in this behavior. We’ve also tried enabling stacktrace and debugging, but the machine panics before any debugging/stack output. Kernel Panic – not syncing: Fatal except…

Prevent removal of busy kernel module

I have a simple kernel module that creates a character devices and does nothing with it. I wrote this user-space program that tests the character device. The program exits after 10 seconds. But if in the meantime I remove the module with rmmod or modprobe, then after 10 seconds the program segfaults or hangs,…