Gaining root by exploiting the mmap handler of a kernel module. Maps a large region and looks for the cred structure in memory. Once found, the uids are set to elevate privileges.
Edit the device in exploit.c and compile.
gcc exploit.c -o exploit
./exploit
This will drop you into a root shell.