mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-24 05:01:03 +02:00
livepatch: Remove custom kobject state handling
kobject_init() always succeeds and sets the reference count to 1. It allows to always free the structures via kobject_put() and the related release callback. Note that the custom kobject state handling was used only because we did not know that kobject_put() can and actually should get called even when kobject_init_and_add() fails. The patch should not change the existing behavior. Suggested-by: "Tobin C. Harding" <tobin@kernel.org> Signed-off-by: Petr Mladek <pmladek@suse.com> Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> Acked-by: Joe Lawrence <joe.lawrence@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
@@ -86,7 +86,6 @@ struct klp_func {
|
||||
struct list_head node;
|
||||
struct list_head stack_node;
|
||||
unsigned long old_size, new_size;
|
||||
bool kobj_added;
|
||||
bool nop;
|
||||
bool patched;
|
||||
bool transition;
|
||||
@@ -141,7 +140,6 @@ struct klp_object {
|
||||
struct list_head func_list;
|
||||
struct list_head node;
|
||||
struct module *mod;
|
||||
bool kobj_added;
|
||||
bool dynamic;
|
||||
bool patched;
|
||||
};
|
||||
@@ -170,7 +168,6 @@ struct klp_patch {
|
||||
struct list_head list;
|
||||
struct kobject kobj;
|
||||
struct list_head obj_list;
|
||||
bool kobj_added;
|
||||
bool enabled;
|
||||
bool forced;
|
||||
struct work_struct free_work;
|
||||
|
Reference in New Issue
Block a user