Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1806154imm; Thu, 18 Oct 2018 04:41:33 -0700 (PDT) X-Google-Smtp-Source: ACcGV60hjER48c+CN8P9bn0NuEx0P2BAIaZKzCYvGtz36anoX8wn3vJHBE83k/6LOTapMLog0NU7 X-Received: by 2002:a63:6147:: with SMTP id v68-v6mr2207722pgb.266.1539862893760; Thu, 18 Oct 2018 04:41:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539862893; cv=none; d=google.com; s=arc-20160816; b=a2e0zz7vRWVFuGu5SxYl5QvDISmbSbuDhaKClVT7B8mS/apAe8JObp2oatXB3dQf4b d0FOlaLrRYJyG75GfsGjoKfR6FS1LR4BCxPcsL+sl85rejoy3NSIhCBAaodf7lnwjORk +A5Faknth+w4ffgoUQVMKzmPANovkEX47ilCzA1BJVvcjrZ/LJBLKsJHcvoXsuRdjyO5 adRjBXMCZzooFpvjo4m6ztSCNj4vJjYThTboMNCdAXR2NbUw/xRfTbVHwbLIfzcyePbo 1iDq/Is8vTcxqDKih/aQdPTx90SU+0QN66KfF+9SaGqntQ3UiasKNqzHOQQl4wDXLwTR YZHw== 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=wgpwrZaelVegRcNr1YfQaIccCuMsqTF6mCk70Uk/QAA=; b=q7F+ZmGHifJM+/CamaZkzx4Pu8PGxcBddF3FzLtka3ZgRkjj7crAwcIQJmZT96e/y+ b0xHz4de8R5m+sgjQATvPjDVR9STR6F4mPlO2u3PzH0Tbrggj3pyDuXhwY/P9oTKVE4N osU+vOq0CVzTbXv3Y+F4h/jgs5B95C3BTUL//uWNFSui2BBKueMfC/nsWVIBT7otIi9D y21lMMYWcIBtCE1x62RcJaXq61iLq/56kHrdvc027LAbOCCJKbsi2TQ+ukEjSAfdt3to zxcLX1dZLs6/FNqSJI4nzpH40gpWjp38OJnK47ty3Zj/UyJCR/J9Dnwjd7nncWOMtout vARQ== 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 k191-v6si909315pgd.164.2018.10.18.04.41.17; Thu, 18 Oct 2018 04:41:33 -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 S1727748AbeJRTle (ORCPT + 99 others); Thu, 18 Oct 2018 15:41:34 -0400 Received: from mx2.suse.de ([195.135.220.15]:46054 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727439AbeJRTle (ORCPT ); Thu, 18 Oct 2018 15:41:34 -0400 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 BE297B098; Thu, 18 Oct 2018 11:40:55 +0000 (UTC) Date: Thu, 18 Oct 2018 13:40:55 +0200 From: Petr Mladek To: Josh Poimboeuf Cc: Jiri Kosina , Miroslav Benes , Jason Baron , Joe Lawrence , Evgenii Shatokhin , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, Jessica Yu Subject: Re: [PATCH v13 04/12] livepatch: Consolidate klp_free functions Message-ID: <20181018114055.zxusn2w3lt6xx6fk@pathway.suse.cz> References: <20181015123713.25868-1-pmladek@suse.com> <20181015123713.25868-5-pmladek@suse.com> <20181017182254.3s3fzb72u2uazdfa@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181017182254.3s3fzb72u2uazdfa@treble> 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 Wed 2018-10-17 13:22:54, Josh Poimboeuf wrote: > On Mon, Oct 15, 2018 at 02:37:05PM +0200, Petr Mladek wrote: > > @@ -637,6 +647,7 @@ static int klp_init_patch(struct klp_patch *patch) > > mutex_lock(&klp_mutex); > > > > patch->enabled = false; > > + INIT_LIST_HEAD(&patch->list); > > Is this a bug fix? If so, it should go in a separate patch. I'm > wondering how this worked before. It is not a bug fix. It was not needed before because klp_register_patch() did not checked this field when failed. But this patch started to use the generic klp_free_patch_start()/klp_free_patch_finish() in both klp_unregister_patch() and in klp_init_patch() error patch. Therefore we need to have a valid value from the beginning. Best Regards, Petr