From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753722AbdJaTyG (ORCPT ); Tue, 31 Oct 2017 15:54:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37544 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751318AbdJaTyE (ORCPT ); Tue, 31 Oct 2017 15:54:04 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 75DA58763C Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jpoimboe@redhat.com From: Josh Poimboeuf To: Jiri Kosina , Miroslav Benes , Jessica Yu Cc: live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Joe Lawrence Subject: [PATCH] livepatch: fix merge bug in klp_cleanup_module_patches_limited() Date: Tue, 31 Oct 2017 14:53:31 -0500 Message-Id: <3defa020936cfd22709acaa2808a698891bba7ab.1509479478.git.jpoimboe@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 31 Oct 2017 19:54:04 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When the patch for "livepatch: add (un)patch callbacks" was posted to the mailing list at: https://lkml.kernel.org/r/1507921723-1996-2-git-send-email-joe.lawrence@redhat.com ... it was based on top of the following commit: ef8daf8eeb5b ("livepatch: unpatch all klp_objects if klp_module_coming fails"). But when it was applied to git on the livepatching for-4.15/shadow-variables branch, that branch was missing the above commit. The patch was rebased accordingly: 93862e385ded ("livepatch: add (un)patch callbacks") Then the two above commits were merged into livepatching/for-next: 6a18fdf2d8d3 ("Merge branch 'for-4.15/callbacks' into for-next"), The result of the merge commit was that the klp_post_unpatch_callback() call in the klp_cleanup_module_patches_limited() function disappeared. The original patch on the mailing list had that call, so put it back. Fixes: 6a18fdf2d8d3 ("Merge branch 'for-4.15/callbacks' into for-next") Signed-off-by: Josh Poimboeuf --- kernel/livepatch/core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c index 30e392858281..de9e45dca70f 100644 --- a/kernel/livepatch/core.c +++ b/kernel/livepatch/core.c @@ -875,6 +875,8 @@ static void klp_cleanup_module_patches_limited(struct module *mod, pr_notice("reverting patch '%s' on unloading module '%s'\n", patch->mod->name, obj->mod->name); klp_unpatch_object(obj); + + klp_post_unpatch_callback(obj); } klp_free_object_loaded(obj); -- 2.13.6