Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10440092imu; Thu, 6 Dec 2018 00:48:24 -0800 (PST) X-Google-Smtp-Source: AFSGD/XQQXG3OATLRsgACzu2cS0QrhO6ICSv3d9vPWgdrVSKw8uVL+OA2ye5snKtLSZsBkzK9mSv X-Received: by 2002:a62:3006:: with SMTP id w6mr27979176pfw.258.1544086104035; Thu, 06 Dec 2018 00:48:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544086104; cv=none; d=google.com; s=arc-20160816; b=m4HbjTVD8CorjkIrd/namT3S7Vk4lRMnKNsK2JkhYCdfaP7YFIMoLzUBCuAmHLrI5j Z0zXCLwQVQh//llgpE4DO+p7AvU0qX269QjRhcACFYd0VrerbhJRjrhCjQuBdYNDuLxR caBATuTpQ+88px1WAXXtlfMyldpjC5inoxRxc8ANDrHkuDnW4TimKNznt5MpqxbdDsJK 5s4CUfiFggusrKu45s9C7551u9cDagICKdylXRplYON0boLcdeoufC9rim5kMzdA/GSv Co8u1Ib1gkID1WaIR87sZWlcuj/wp2VZqkjxvCoykg4690DA2cuxvHbPQP8TTmyWiYzz m/bw== 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=2V1LXm5DHcWPGWRBL7pR6aB7Yffa11nP6o3BaJDReyU=; b=dPHWsD9z51Yd3gHwTHJ8KlqxWu+K7N/PeiIS/HhLdQc8GCMKPbyBh/YokFcL+CHD4+ 7sZSZzAUuLkTNKgpWtHnL0bpBHwWpSVGUuHDHTMSxRJ9gwDXW6nrG54u1wRfJOxVe/SB bJsNYHnJKfxWw1IuAtR7gUZZrpHFKIc7F6+wLimGMjoZU98NY7FlQodL3bkJj+8sJck1 uNcGHXuDjzQKYSuTezbx4ZZEYmtMTuyb0+cnD1VNMNcd8fFHj5/oCas0XQbq2wVbJHp/ NuiRYCdPXEbmXK5hdXqOxOyEeK6Fdbgc2Y9V9IXdCGkaje5YoLl2kLqJUe9YmfMqt+mS uC7Q== 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 b10si23305507plz.233.2018.12.06.00.48.07; Thu, 06 Dec 2018 00:48:24 -0800 (PST) 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 S1729209AbeLFIqy (ORCPT + 99 others); Thu, 6 Dec 2018 03:46:54 -0500 Received: from mx2.suse.de ([195.135.220.15]:47494 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727575AbeLFIqy (ORCPT ); Thu, 6 Dec 2018 03:46:54 -0500 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 31C99AF06; Thu, 6 Dec 2018 08:46:52 +0000 (UTC) Date: Thu, 6 Dec 2018 09:46:51 +0100 From: Petr Mladek To: Miroslav Benes Cc: Jiri Kosina , Josh Poimboeuf , Jason Baron , Joe Lawrence , Evgenii Shatokhin , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v14 04/11] livepatch: Refuse to unload only livepatches available during a forced transition Message-ID: <20181206084651.fvj5v4pdi4q2pigb@pathway.suse.cz> References: <20181129094431.7801-1-pmladek@suse.com> <20181129094431.7801-5-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 2018-12-03 16:29:32, Miroslav Benes wrote: > You probably forgot to replace the subject with Josh's proposal. > > > module_put() is currently never called in klp_complete_transition() when > > klp_force is set. As a result, we might keep the reference count even when > > klp_enable_patch() fails and klp_cancel_transition() is called. > > Correct. > > > This might make an assumption that a module might get blocked in some > > strange init state. Fortunately, it is not the case. The reference count > > is ignored when mod->init fails and erroneous modules are always removed. > > I do not understand the paragraph and its connection to the problem (and I don't > remember if I understood it previously or not and forgot to mention it). It was one example of the confusion. I wonder if the following text is more clear: One might wonder if the reference could block the module in MODULE_STATE_COMING or MODULE_STATE_GOING infinitely. Fortunately, it is not the case. The reference count is ignored when mod->init fails and erroneous modules are always removed. Or I could remove the paragraph as you suggested below. Best Regards, Petr