Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10464842imu; Thu, 6 Dec 2018 01:20:50 -0800 (PST) X-Google-Smtp-Source: AFSGD/X1KEDHpA5Yajm4rDNPzqWm+JkoMWUbv8DVLmyTkXBFxF7lJJXLvajkPzBWjF6OqeilNAlW X-Received: by 2002:a62:9fd9:: with SMTP id v86mr27596488pfk.191.1544088050491; Thu, 06 Dec 2018 01:20:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544088050; cv=none; d=google.com; s=arc-20160816; b=GJIKVQbFbaM5uRdUePIUV8CWj1Sw4EhzZC6/Pm0tV/hpmWJwQBXuFOvbscEwRKxE0T ACwQBW8c+9Lrgo6b/BDPvBxZCqcHdKiQ/vzkVdV3ZEhXaNeTsMhEwtDa3GNiqGiwtlfh 8MvDqyTtbGqifpYti1osIS0/Rzw5a4nHs1sjDgKjv00Q83pXqTRbhmvxcETOa69u++Da X+lW8Wcdo7aCKpfZdazEpobJoYcxeys8T42mlztci/ffl6QwLB9LvmnnEF7FKWf4I4UM WDQ+GEVfGAVdP9fiA/yVbnE2lqoyZZNhgmcGer/lwXj0FrDJJSafsgRxpg1vcWj6zSug zLHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=XEzWLp2B+k96Z2/eD+qyfrhZbP83XiTJ8zUh4Pc5r24=; b=XPZHr83YeWl8YNFQ7Um0S1ICBgd2yrBfKMkMK0P4/QfkuqD3x1bmMfXoEdWbVPSaqa Vk894PGTTXeOudLdNqnWjyefj3KGhKx7Plc5/w2Kr0CC1usu49QJe41cKrAgibqqGSXN pqX+tPHrhZyVfvY9tvlAU2xrJjR53eWiDeP5sWoXbajbh8k8D687mqZoXzSLlwm/ITcc vJ7+ldxEIL465SHP62+xaC2Y0S75pGwNJG4iOz6nQ6R6uQ9GP8ZqDgaWgw3N67N+0srA wwoafm1CIhbj2VoCUWynPALWvuj3recQaNmAsTyBz/f0Wt+QKmbhHKtnyh+2yLUFmz/4 vdJg== 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 c10si20642713pll.271.2018.12.06.01.20.33; Thu, 06 Dec 2018 01:20:50 -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 S1729265AbeLFJSg (ORCPT + 99 others); Thu, 6 Dec 2018 04:18:36 -0500 Received: from mx2.suse.de ([195.135.220.15]:53760 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727763AbeLFJSf (ORCPT ); Thu, 6 Dec 2018 04:18:35 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id ECCC6AF07; Thu, 6 Dec 2018 09:18:33 +0000 (UTC) Date: Thu, 6 Dec 2018 10:18:32 +0100 (CET) From: Miroslav Benes To: Petr Mladek 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 In-Reply-To: <20181206084651.fvj5v4pdi4q2pigb@pathway.suse.cz> Message-ID: References: <20181129094431.7801-1-pmladek@suse.com> <20181129094431.7801-5-pmladek@suse.com> <20181206084651.fvj5v4pdi4q2pigb@pathway.suse.cz> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 6 Dec 2018, Petr Mladek wrote: > 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. I think Joe's proposal would suffice. s/make an assumption/give the impression/. It confused me. Thanks, Miroslav