Re: [PATCH v3] kmemleaak: survive in a low-memory situation

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

 



On Tue, 26 Mar 2019, Qian Cai wrote:

> +	if (!object) {
> +		/*
> +		 * The tracked memory was allocated successful, if the kmemleak
> +		 * object failed to allocate for some reasons, it ends up with
> +		 * the whole kmemleak disabled, so let it success at all cost.

"let it succeed at all costs"

> +		 */
> +		gfp = (in_atomic() || irqs_disabled()) ? GFP_ATOMIC :
> +		       gfp_kmemleak_mask(gfp) | __GFP_DIRECT_RECLAIM;
> +		object = kmem_cache_alloc(object_cache, gfp);
> +	}
> +
>  	if (!object) {

If the alloc must succeed then this check is no longer necessary.




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

  Powered by Linux