lkml.org 
[lkml]   [2018]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] livepatch: Initialize shadow variables by init function safely

> @@ -186,10 +198,13 @@ static void *__klp_shadow_get_or_alloc(void *obj, unsigned long id, void *data,
> * Return: the shadow variable data element, NULL on duplicate or
> * failure.
> */
> -void *klp_shadow_alloc(void *obj, unsigned long id, void *data,
> - size_t size, gfp_t gfp_flags)
> +void *klp_shadow_alloc(void *obj, unsigned long id,
> + size_t size, gfp_t gfp_flags,
> + klp_shadow_init_func_t init_func,
> + void *init_data)

The comment above the function should be also updated, because the
function's parameters changed.

> {
> - return __klp_shadow_get_or_alloc(obj, id, data, size, gfp_flags, true);
> + return __klp_shadow_get_or_alloc(obj, id, size, gfp_flags,
> + init_func, init_data, true);
> }
> EXPORT_SYMBOL_GPL(klp_shadow_alloc);
>
> @@ -212,10 +227,13 @@ EXPORT_SYMBOL_GPL(klp_shadow_alloc);
> *
> * Return: the shadow variable data element, NULL on failure.
> */
> -void *klp_shadow_get_or_alloc(void *obj, unsigned long id, void *data,
> - size_t size, gfp_t gfp_flags)
> +void *klp_shadow_get_or_alloc(void *obj, unsigned long id,
> + size_t size, gfp_t gfp_flags,
> + klp_shadow_init_func_t init_func,
> + void *init_data)

Ditto.

Thanks,
Miroslav

\
 
 \ /
  Last update: 2018-03-21 13:56    [W:0.179 / U:13.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site