I am pretty new to Linux, but doing a lot of self-teaching.

I get the implication that the answer to my question is, no you shouldn't do that.

So, looking for advice from the experts of this page on the topic.

  1. Can one call an ioctl from within another ioctl?
  2. Ioctl is technically a system call (I think), that means it is technically kernel code?

1 Answer 1


An ioctl call is made from user space, and executes code in the driver in the kernel space. In the kernel space itself, you usually call other parts of the kernel directly, so there's no need for nested ioctls: After all, this is a mechanism to help user space communicate with kernel space.


1) Nobody does it, because it's not necessary.

2) You shouldn't do it.

3) if you really wanted to, you could probable setup a fake environment in the kernel where you can simulate another ioctl inside an ioctl, but that's a lot of effort and a complicated solution for things you can achieve in an easier way.

4) Thinking about this won't help you in understanding the kernel.

  • Really hard to say it better.
    – schaiba
    Commented May 17, 2017 at 11:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .