Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching

Pull livepatching fix from Jiri Kosina:
"Livepatching error handling fix"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching:
livepatch: Improve error handling in klp_disable_func()

+4 -2
+4 -2
kernel/livepatch/core.c
··· 348 348 { 349 349 struct klp_ops *ops; 350 350 351 - WARN_ON(func->state != KLP_ENABLED); 352 - WARN_ON(!func->old_addr); 351 + if (WARN_ON(func->state != KLP_ENABLED)) 352 + return; 353 + if (WARN_ON(!func->old_addr)) 354 + return; 353 355 354 356 ops = klp_find_ops(func->old_addr); 355 357 if (WARN_ON(!ops))