Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966301AbdIYUi7 (ORCPT ); Mon, 25 Sep 2017 16:38:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61330 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964981AbdIYUi5 (ORCPT ); Mon, 25 Sep 2017 16:38:57 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 844A346287 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=joe.lawrence@redhat.com Date: Mon, 25 Sep 2017 16:38:56 -0400 From: Joe Lawrence To: Petr Mladek Cc: Jiri Kosina , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] livepatch: Small shadow variable documentation fixes Message-ID: <20170925203856.cawn3tppxmzoay6k@redhat.com> References: <1506354119-9497-1-git-send-email-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1506354119-9497-1-git-send-email-pmladek@suse.com> User-Agent: Mutt/1.6.2-neo (2016-08-08) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 25 Sep 2017 20:38:57 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1792 Lines: 42 On Mon, Sep 25, 2017 at 05:41:59PM +0200, Petr Mladek wrote: > The description of the basic operations was a bit inconsistent > and based on older version of the patchset. > > Also the size of the spinlock structure should be allocated > instead of the pointer. > > Signed-off-by: Petr Mladek > --- > Documentation/livepatch/shadow-vars.txt | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Documentation/livepatch/shadow-vars.txt b/Documentation/livepatch/shadow-vars.txt > index e3ffc4301bfa..89c66634d600 100644 > --- a/Documentation/livepatch/shadow-vars.txt > +++ b/Documentation/livepatch/shadow-vars.txt > @@ -6,7 +6,7 @@ Shadow variables are a simple way for livepatch modules to associate > additional "shadow" data with existing data structures. Shadow data is > allocated separately from parent data structures, which are left > unmodified. The shadow variable API described in this document is used > -to allocate/attach and detach/release shadow variables to their parents. > +to allocate/add and remove/free shadow variables to/from their parents. > > The implementation introduces a global, in-kernel hashtable that > associates pointers to parent objects and a numeric identifier of the > @@ -107,7 +107,7 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata, > sta = kzalloc(sizeof(*sta) + hw->sta_data_size, gfp); > > /* Attach a corresponding shadow variable, then initialize it */ > - ps_lock = klp_shadow_alloc(sta, PS_LOCK, NULL, sizeof(ps_lock), gfp); > + ps_lock = klp_shadow_alloc(sta, PS_LOCK, NULL, sizeof(*ps_lock), gfp); > if (!ps_lock) > goto shadow_fail; > spin_lock_init(ps_lock); > -- > 1.8.5.6 Thanks, Petr! Acked-by: Joe Lawrence -- Joe