A subtle yet key misconception regarding how scheduling works is unfortunately held by many: we imagine that some kind of kernel thread (or some such entity) called the "scheduler" is present, that periodically runs and schedules tasks. This is just plain wrong; in a monolithic OS such as Linux, scheduling is carried out by the process contexts themselves, the regular threads that run on the CPU!
In fact, the scheduling code is always run by the process context that is currently executing the code of the kernel, in other words, by current.
This may also be an appropriate time to remind you of what we shall call one of the golden rules of the Linux kernel: scheduling code must never ever run in any kind of atomic or interrupt context. In other words, interrupt context code must be guaranteed to be non-blocking; this is why you cannot call kmalloc() with the GFP_KERNEL flag in an interrupt context – it might block! But with the GFP_ATOMIC flag...