[LTP] [PATCH] pidns32: fix PID namespace nesting depth off-by-one

Andrea Cervesato andrea.cervesato@suse.com
Mon Mar 30 12:23:11 CEST 2026


Hi Vasileios,

> -	if (tst_atomic_inc(level) == MAXNEST)
> +	if (tst_atomic_load(level) == MAXNEST)
>  		return cpid;
> 
> +	tst_atomic_inc(level);

Makes sense, the old code incremented before checking, so the counter
hit 32 after only 31 clones. Splitting load and increment fixes it.

Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>

Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com


More information about the ltp mailing list