When user process calls some syscall to your driver, you are in the user thread context. Just read current pid and save it.
0
votes
When user process calls some syscall to your driver, it's doing so in the context of the process that issued the system call. You should thus be able to use the global current task structure, i.e.
pid_t mypid;
mypid = current->pid.
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more