Re: PATCH v6 4/6] livepatch: Allow to unpatch only functions of the given type

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

 



> +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
--
To unsubscribe from this list: send the line "unsubscribe live-patching" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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