Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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()
  • Loading branch information
torvalds committed Sep 2, 2015
2 parents 851328f + 225f58f commit 45c680b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions kernel/livepatch/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,10 @@ static void klp_disable_func(struct klp_func *func)
{
struct klp_ops *ops;

WARN_ON(func->state != KLP_ENABLED);
WARN_ON(!func->old_addr);
if (WARN_ON(func->state != KLP_ENABLED))
return;
if (WARN_ON(!func->old_addr))
return;

ops = klp_find_ops(func->old_addr);
if (WARN_ON(!ops))
Expand Down

0 comments on commit 45c680b

Please sign in to comment.