Received: by 10.223.176.5 with SMTP id f5csp2808765wra; Thu, 1 Feb 2018 06:27:01 -0800 (PST) X-Google-Smtp-Source: AH8x227PNeOw3yE0ubqg7v7yjWURar+uTi3/8vhUpRe2v0t7/I6nEhD9vVaoev78uUonecnMhCdP X-Received: by 10.101.81.197 with SMTP id i5mr29527282pgq.220.1517495220901; Thu, 01 Feb 2018 06:27:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517495220; cv=none; d=google.com; s=arc-20160816; b=0BQGGRBxnM001YxyEPgnDerQaVNn6lK6+z0McB7jnw8eA/0tl+q7BlOaMz9vHmU9o2 Aki0zcHFBNiPtIUiz89fdmCuSz7fXqxzWkySKplqaM1GiJo5m2TnaaXdQ1PlAJgTFooz dfmZM6qu6NcHoEvWDAnPK5yDU02KTuW5/ECCBwCB//l6/W4uwnFXe0CSPnlPuMa5AAZf vfhZdiSOt7bUXYxcUB3WoXDbCYzHrYUJWsGODPgi3ZwyMLhx1361uGlw+hKKe2Lk5M+6 BhnTUH6u03Y3lyHbiJzk+24xCKzCXiOnkPMXqloZVB3CktNAaM8OiR/lJ31YzG+HrcVt SqQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=Gojrta2XCdMJh3De74FkLj6svIdggVnVoLqkBKj10Jo=; b=prAOpyJroEKgFRAAt+Zi/HXaZ3/Ruu8xXVXKarDUc7jKLyL4xZ1Xl5v5uTMbK3aUiN E0pjAWTo6wY+IpAvs3+H1Syezc/pVH3LhXJRNUVfX2JNnpli1noXir2rw/bIjEjtqExo SsmSwUs1Zab0b0ygffEoxkFxFH4DYzLmEdnO95gED3jlOmLIjJKKBP/w0HTY9/dxJs1T Vq1SFTJnmY5tqonjvFmlJEmpsVegcOe7uINHn8WOPO0pFibmFRatBCbHBpQnGUPEtnK6 oV03VYcVh1HGqTh7SrJlZkIy/HEaH1KZ3d25W5IehNneVEppT0DUuMRB5Cn7I+DeAgQj PVRw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p13si6120085pff.251.2018.02.01.06.26.45; Thu, 01 Feb 2018 06:27:00 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751762AbeBAOZJ (ORCPT + 99 others); Thu, 1 Feb 2018 09:25:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42311 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751378AbeBAOZF (ORCPT ); Thu, 1 Feb 2018 09:25:05 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A6566C0587C7; Thu, 1 Feb 2018 14:25:05 +0000 (UTC) Received: from jlaw-desktop.bos.csb (dhcp-17-208.bos.redhat.com [10.18.17.208]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3C64A60C97; Thu, 1 Feb 2018 14:25:02 +0000 (UTC) Subject: Re: PATCH v6 2/6] livepatch: Free only structures with initialized kobject To: Petr Mladek , jpoimboe@redhat.com, jikos@kernel.org, mbenes@suse.cz Cc: Jason Baron , jeyu@kernel.org, Evgenii Shatokhin , linux-kernel@vger.kernel.org, live-patching@vger.kernel.org References: <20180125160203.28959-1-pmladek@suse.com> <20180125160203.28959-3-pmladek@suse.com> From: Joe Lawrence Organization: Red Hat Message-ID: <677eed76-a5bc-6ce2-a157-53d5696cee1a@redhat.com> Date: Thu, 1 Feb 2018 09:25:01 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20180125160203.28959-3-pmladek@suse.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 01 Feb 2018 14:25:05 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/25/2018 11:01 AM, Petr Mladek wrote: > We are going to add a feature called atomic replace. It will allow to > create a patch that would replace all already registered patches. > For this, we will need to dynamically create funcs' and objects' > for functions that are not longer patched. Super small nit: funcs', objects' ? More on this in the next inline comment. > [ ... snip ... ] > /* > - * Free all functions' kobjects in the array up to some limit. When limit is > - * NULL, all kobjects are freed. > + * Free all funcs' that have the kobject initialized. Otherwise, > + * nothing is needed. In new comment, what is the apostrophe in funcs' for? The code (still) deals with the kobject embedded in the klp_func, but the comment text moved "kobject" such that I think the apostrophe can now be removed. > [ ... snip ... ] > /* > - * Free all objects' kobjects in the array up to some limit. When limit is > - * NULL, all kobjects are freed. > + * Free all funcs' and objects's that have the kobject initialized. > + * Otherwise, nothing is needed. > */ Ditto. -- Joe