docs: livepatch: adopt type-aware kzalloc
Subsystems (2)
PATCH 1/1 docs: livepatch: adopt type-aware kzalloc
Hi, I would like to help with the introduction of new code, but I can't figure out what do to with 'hw->sta_data_size'. 'gfp' can be dropped, because it's the new default.
Thanks
Manuel
Signed-off-by Manuel Ebner <[email protected]>
--- Documentation/livepatch/shadow-vars.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/livepatch/shadow-vars.rst +1 -1
@@ -127,7 +127,7 @@ allocate a shadow copy of the ps_lock pointer, then initialize it:: spinlock_t *ps_lock; /* Parent structure is created */ - sta = kzalloc(sizeof(*sta) + hw->sta_data_size, gfp); + sta = kzalloc_obj(*sta); /* Attach a corresponding shadow variable, then initialize it */ ps_lock = klp_shadow_alloc(sta, PS_LOCK, sizeof(*ps_lock), gfp,
Signature · 1 line
2.54.0