lkml.org 
[lkml]   [2018]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PATCH v6 4/6] livepatch: Allow to unpatch only functions of the given type

> +void klp_unpatch_object(struct klp_object *obj, enum klp_func_type ftype)
> {
> struct klp_func *func;
> + bool patched = false;
>
> - klp_for_each_func(obj, func)
> - if (func->patched)
> + klp_for_each_func(obj, func) {
> + if (!func->patched)
> + continue;
> +
> + if (ftype == KLP_FUNC_ANY || ftype == func->ftype)

You defined klp_is_func_type() exactly for this purpose.

Otherwise, it looks good. There is no functional change.

Miroslav

\
 
 \ /
  Last update: 2018-01-31 16:42    [W:0.446 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site