dynup/kpatch — pull request #263 by spartacus06 (2014-06-24 21:16:07+00:00)
Title: User hook support

DON'T MERGE YET, INTEGRATIONS TESTS DON'T PASS YET

This commit enables the ability to create user-defined hooks as part of
the normal code patch that can do preparatory work for the application
of the patch. This work could include, but is not limited to, changing
data structure semantics.

The user may define a new function as part of the patch with the prefix
"kpatch_load_" for a load time hook or "kpatch_unload_" for an unload
time hook. The signature for both hooks is "int
kpatch_unload_hook(void)".

For now, the return code is ignored. The hooks may not fail. They also
run in stop_machine() context and may not sleep. These hooks, more or
less, must follow all the rules of interrupt context code.