diff options
Diffstat (limited to 'include/linux/livepatch.h')
-rw-r--r-- | include/linux/livepatch.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/livepatch.h b/include/linux/livepatch.h index 634e13876380..6978785bc059 100644 --- a/include/linux/livepatch.h +++ b/include/linux/livepatch.h | |||
@@ -45,6 +45,7 @@ | |||
45 | * @stack_node: list node for klp_ops func_stack list | 45 | * @stack_node: list node for klp_ops func_stack list |
46 | * @old_size: size of the old function | 46 | * @old_size: size of the old function |
47 | * @new_size: size of the new function | 47 | * @new_size: size of the new function |
48 | * @kobj_added: @kobj has been added and needs freeing | ||
48 | * @patched: the func has been added to the klp_ops list | 49 | * @patched: the func has been added to the klp_ops list |
49 | * @transition: the func is currently being applied or reverted | 50 | * @transition: the func is currently being applied or reverted |
50 | * | 51 | * |
@@ -81,6 +82,7 @@ struct klp_func { | |||
81 | struct kobject kobj; | 82 | struct kobject kobj; |
82 | struct list_head stack_node; | 83 | struct list_head stack_node; |
83 | unsigned long old_size, new_size; | 84 | unsigned long old_size, new_size; |
85 | bool kobj_added; | ||
84 | bool patched; | 86 | bool patched; |
85 | bool transition; | 87 | bool transition; |
86 | }; | 88 | }; |
@@ -117,6 +119,7 @@ struct klp_callbacks { | |||
117 | * @kobj: kobject for sysfs resources | 119 | * @kobj: kobject for sysfs resources |
118 | * @mod: kernel module associated with the patched object | 120 | * @mod: kernel module associated with the patched object |
119 | * (NULL for vmlinux) | 121 | * (NULL for vmlinux) |
122 | * @kobj_added: @kobj has been added and needs freeing | ||
120 | * @patched: the object's funcs have been added to the klp_ops list | 123 | * @patched: the object's funcs have been added to the klp_ops list |
121 | */ | 124 | */ |
122 | struct klp_object { | 125 | struct klp_object { |
@@ -128,6 +131,7 @@ struct klp_object { | |||
128 | /* internal */ | 131 | /* internal */ |
129 | struct kobject kobj; | 132 | struct kobject kobj; |
130 | struct module *mod; | 133 | struct module *mod; |
134 | bool kobj_added; | ||
131 | bool patched; | 135 | bool patched; |
132 | }; | 136 | }; |
133 | 137 | ||
@@ -137,6 +141,7 @@ struct klp_object { | |||
137 | * @objs: object entries for kernel objects to be patched | 141 | * @objs: object entries for kernel objects to be patched |
138 | * @list: list node for global list of registered patches | 142 | * @list: list node for global list of registered patches |
139 | * @kobj: kobject for sysfs resources | 143 | * @kobj: kobject for sysfs resources |
144 | * @kobj_added: @kobj has been added and needs freeing | ||
140 | * @enabled: the patch is enabled (but operation may be incomplete) | 145 | * @enabled: the patch is enabled (but operation may be incomplete) |
141 | * @finish: for waiting till it is safe to remove the patch module | 146 | * @finish: for waiting till it is safe to remove the patch module |
142 | */ | 147 | */ |
@@ -148,6 +153,7 @@ struct klp_patch { | |||
148 | /* internal */ | 153 | /* internal */ |
149 | struct list_head list; | 154 | struct list_head list; |
150 | struct kobject kobj; | 155 | struct kobject kobj; |
156 | bool kobj_added; | ||
151 | bool enabled; | 157 | bool enabled; |
152 | struct completion finish; | 158 | struct completion finish; |
153 | }; | 159 | }; |