1. A method executed by at least one processor resource for patching a kernel comprising: receiving, by at least one processor resource, an online patch request; sending an interrupt to halt kernel operations of the kernel; parsing a global kernel thread list to determine kernel threads associated with a target function; maintaining, by the at least one processor resource, a storage data structure including identifiers of the determined kernel threads; resuming execution of the halted kernel operations and wait for an event; and halting the kernel operations and parsing the determined kernel threads using the identifiers in the storage data structure to determine when the global kernel thread list is free of the target function upon encountering the event associated with the target function.