mirror of https://github.com/dynup/kpatch
kpatch-build: fix shadow_get function
The shadow_get function does't consider the case that 'shadow is inpace', and after the shadow->data be set to the data, it will not be the pointer. This patch fix it. Signed-off-by: Li Bin <huawei.libin@huawei.com>
This commit is contained in:
parent
f049dcf6e0
commit
495948242e
|
@ -158,6 +158,9 @@ void *kpatch_shadow_get(void *obj, char *var)
|
|||
(unsigned long)obj) {
|
||||
if (shadow->obj == obj && !strcmp(shadow_var(shadow), var)) {
|
||||
rcu_read_unlock();
|
||||
if (shadow_is_inplace(shadow))
|
||||
return &(shadow->data);
|
||||
|
||||
return shadow->data;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue