mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Lawrence <joe.lawrence@redhat.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Jiri Kosina <jikos@kernel.org>,
	live-patching@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] livepatch: Small shadow variable documentation fixes
Date: Mon, 25 Sep 2017 16:38:56 -0400	[thread overview]
Message-ID: <20170925203856.cawn3tppxmzoay6k@redhat.com> (raw)
In-Reply-To: <1506354119-9497-1-git-send-email-pmladek@suse.com>

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 <pmladek@suse.com>
> ---
>  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.lawrence@redhat.com>

-- Joe

  reply	other threads:[~2017-09-25 20:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25 15:41 Petr Mladek
2017-09-25 20:38 ` Joe Lawrence [this message]
2017-10-02  9:58 ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170925203856.cawn3tppxmzoay6k@redhat.com \
    --to=joe.lawrence@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=live-patching@vger.kernel.org \
    --cc=pmladek@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®