diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2015-07-23 14:58:11 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2015-07-23 14:58:11 +1000 |
commit | 5d0abceec4b3aeb8dde8998eb60cdaa1b86baa50 (patch) | |
tree | 7ab29b5e20148255e5206b76b7aff2f7ff32b4da | |
parent | 225795ad86aa6d6d590fd45f388721947f2e7043 (diff) | |
parent | 07d42d41dfc438dc21e24e60e3f1092ff4ab2d0e (diff) |
Merge remote-tracking branch 'livepatching/for-next'
-rw-r--r-- | kernel/livepatch/core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c index c40ebcca0495..6e5344112419 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c @@ -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)) |