Re: [PATCH] can: gw: prefer kfree_rcu() over call_rcu() with cgw_job_free_rcu()

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

 



On 3/13/24 13:55, Eric Dumazet wrote:

kmem_cache_free(struct kmem_cache *s, void *x) has additional checks
to make sure the object @x was allocated
from the @s kmem_cache.

Look for SLAB_CONSISTENCY_CHECKS and CONFIG_SLAB_FREELIST_HARDENED

Yes. Using kfree_rcu() bypasses these (optional) debugging/consistency
checks.

Your patch is not 'trivial' as you think.

You're shifting from "not going to work" to "not trivial" so nicely.

Otherwise, we will soon have dozen of patches submissions replacing
kmem_cache_free() with kfree()

No. The question is about freeing on some (where the freeing callback
function is trivial) RCU-protected paths only.

Dmitry





[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux