a device driver can just include and refer to the current process. printk("The process is \"%s\" (pid %i)\n", current->comm, current->pid);