Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2579016ybl; Mon, 19 Aug 2019 04:28:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqzDxwDrv70GLXHZgX2fILC+eVBr9VIk72J97QWkTTAAIqFGY7owyI+6ndZ30Z82qIRkEspL X-Received: by 2002:a63:29c4:: with SMTP id p187mr19787912pgp.330.1566214129873; Mon, 19 Aug 2019 04:28:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566214129; cv=none; d=google.com; s=arc-20160816; b=aqwEHGVTdkMdlvYAdD75efYtf7N4jRaDWYxZzaNJ/QW/RPrH4r9G1x+XgJkaR4oz02 oFUnxDdPf0vfMvUL9P/EaVl8+JoxMEBD9gPiSg8ckulK0C/GDxteNZQz1Z+W2AlEU9L2 EDA9ABXI3EsgLB6/QWOqlRDW+6J+lb70ZPf0A6gMV3vWI752UwupCTjiHYLGQPuJTPHB oozoOzj6i+PBo8QHktAyWMmbiYYPdzYFWpsmCXvBtBHpk2o5visq6rdLjQ5bfb5QpBEF JifpyxXwqphfPOyC8TUoxSmBZNLHGk4OthtDqllKhR9nzQ/KQZFZsIg+zsbvYWCWf1el BrOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6b+hnigwMUCKaMaEW4XOwVGb3jS2pVDt6hqwftV2hUE=; b=0DsgYTFjY/8v2wnGolBdTrF4lDMSJdEY6cPbb2FuLcwhIbPOL8QSBC67n1PMauH27S vz6YraJ8UqPJkRWnSdYcJkcbYmaXcQBREiirskGKJDKDBgY5GtvjIoMlDOSicjKDgsuK E69F63FHM6CLL+SAVWuDQlhKRt66WyneKdIQ89LfMdQl5Tj3ilKkLNFkBzvXQ6HBbNB7 DSP7DneYbvOv2d/BfuA6jCCuCzb5FhlcPDtZQJA+uwtNEPPeKozx328uKrb2tkA63+Qg HoDOZ26X/zNIx5JOFYbXu0zx6PIUcoc5lSFuQaBNWTH46hoS5nuELKp70zsyavXPas7P PeTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f186si9500608pgc.438.2019.08.19.04.28.34; Mon, 19 Aug 2019 04:28:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727509AbfHSL0Z (ORCPT + 99 others); Mon, 19 Aug 2019 07:26:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:40696 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727485AbfHSL0X (ORCPT ); Mon, 19 Aug 2019 07:26:23 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5E208AE40; Mon, 19 Aug 2019 11:26:22 +0000 (UTC) Date: Mon, 19 Aug 2019 13:26:21 +0200 From: Petr Mladek To: Josh Poimboeuf Cc: Miroslav Benes , jikos@kernel.org, joe.lawrence@redhat.com, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org Subject: Re: [PATCH 1/2] livepatch: Nullify obj->mod in klp_module_coming()'s error path Message-ID: <20190819112621.qtvmjofdmae33ruz@pathway.suse.cz> References: <20190719122840.15353-1-mbenes@suse.cz> <20190719122840.15353-2-mbenes@suse.cz> <20190728194533.rghqjzwxyc2vwdvm@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190728194533.rghqjzwxyc2vwdvm@treble> User-Agent: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun 2019-07-28 14:45:33, Josh Poimboeuf wrote: > On Fri, Jul 19, 2019 at 02:28:39PM +0200, Miroslav Benes wrote: > > klp_module_coming() is called for every module appearing in the system. > > It sets obj->mod to a patched module for klp_object obj. Unfortunately > > it leaves it set even if an error happens later in the function and the > > patched module is not allowed to be loaded. > > > > klp_is_object_loaded() uses obj->mod variable and could currently give a > > wrong return value. The bug is probably harmless as of now. > > > > Signed-off-by: Miroslav Benes > > Reviewed-by: Petr Mladek > > Acked-by: Josh Poimboeuf This patch has been committed into the branch for-5.4/core. Best Regards, Petr