Skip to content

Commit 19205da

Browse files
pmladekJiri Kosina
authored andcommitted
livepatch: Small shadow variable documentation fixes
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 <[email protected]> Acked-by: Joe Lawrence <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 5d9da75 commit 19205da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Documentation/livepatch/shadow-vars.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Shadow variables are a simple way for livepatch modules to associate
66
additional "shadow" data with existing data structures. Shadow data is
77
allocated separately from parent data structures, which are left
88
unmodified. The shadow variable API described in this document is used
9-
to allocate/attach and detach/release shadow variables to their parents.
9+
to allocate/add and remove/free shadow variables to/from their parents.
1010

1111
The implementation introduces a global, in-kernel hashtable that
1212
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,
107107
sta = kzalloc(sizeof(*sta) + hw->sta_data_size, gfp);
108108

109109
/* Attach a corresponding shadow variable, then initialize it */
110-
ps_lock = klp_shadow_alloc(sta, PS_LOCK, NULL, sizeof(ps_lock), gfp);
110+
ps_lock = klp_shadow_alloc(sta, PS_LOCK, NULL, sizeof(*ps_lock), gfp);
111111
if (!ps_lock)
112112
goto shadow_fail;
113113
spin_lock_init(ps_lock);

0 commit comments

Comments
 (0)