diff options
author | Petr Mladek <pmladek@suse.com> | 2017-09-25 11:41:59 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2017-10-02 05:55:24 -0400 |
commit | 19205da6a0da701787d42ad754edd1ffb514c956 (patch) | |
tree | 092e65563913317f9f23fdc10cd464dfbf5dad0c /Documentation/livepatch | |
parent | 5d9da759f7587c87252ef98e70bc0b4a89e4d036 (diff) |
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 <pmladek@suse.com>
Acked-by: Joe Lawrence <joe.lawrence@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'Documentation/livepatch')
-rw-r--r-- | Documentation/livepatch/shadow-vars.txt | 4 |
1 files 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 | |||
6 | additional "shadow" data with existing data structures. Shadow data is | 6 | additional "shadow" data with existing data structures. Shadow data is |
7 | allocated separately from parent data structures, which are left | 7 | allocated separately from parent data structures, which are left |
8 | unmodified. The shadow variable API described in this document is used | 8 | 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. |
10 | 10 | ||
11 | The implementation introduces a global, in-kernel hashtable that | 11 | The implementation introduces a global, in-kernel hashtable that |
12 | associates pointers to parent objects and a numeric identifier of the | 12 | 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, | |||
107 | sta = kzalloc(sizeof(*sta) + hw->sta_data_size, gfp); | 107 | sta = kzalloc(sizeof(*sta) + hw->sta_data_size, gfp); |
108 | 108 | ||
109 | /* Attach a corresponding shadow variable, then initialize it */ | 109 | /* 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); |
111 | if (!ps_lock) | 111 | if (!ps_lock) |
112 | goto shadow_fail; | 112 | goto shadow_fail; |
113 | spin_lock_init(ps_lock); | 113 | spin_lock_init(ps_lock); |