Re: [PATCH v4 1/2] Introduce klp_ops into klp_func structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Miroslav

> 
> node member. You removed the global list, hence this member is not needed 
> anymore.

OK, I got it.

> 
>>> 
>>>> +       struct list_head func_stack;
>>>> +       struct ftrace_ops fops;
>>>> +};
>>>> +
>>>> 
>>>> diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
>>>> index 52426665eecc..e4572bf34316 100644
>>>> --- a/kernel/livepatch/core.c
>>>> +++ b/kernel/livepatch/core.c
>>>> @@ -760,6 +760,8 @@ static int klp_init_func(struct klp_object *obj, struct klp_func *func)
>>>> if (!func->old_name)
>>>> return -EINVAL;
>>>> 
>>>> + func->ops = NULL;
>>>> +
>>> 
>>> Any reason why it is not added a couple of lines later alongside the rest 
>>> of the initialization?
>> 
>> Do you mean I should add couple of lines after 'return -EINVAL' ?
> 
> No, I am asking if there is a reason why you added 'func->ops = NULL;' 
> here and not right after the rest of func initializations
> 
>        INIT_LIST_HEAD(&func->stack_node);
>        func->patched = false;
>        func->transition = false;
> 

Hah... it just my habit to do so. Will fix it later.

>> 
>> Maybe there still other places will call this klp_find_ops? Is it safe to delete it?
> 
> If you have no other plans with it, then it can be removed since there is 
> no user after the patch.
> 

> Wardenjohn, you should then get all the information that you need. Also, 
> please test your patches with livepatch kselftests before a submission 
> next time. New sysfs attributes need to be documented in 
> Documentation/ABI/testing/sysfs-kernel-livepatch and there should be a new 
> kselftest for them.

OK, will do it.

Regards.
Wardenjohn.






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux