Re: [PATCH] slab: fix the kernel-doc of kmalloc_flex() on counter overflowy

From: Arina Kharlamova

Date: Sun Nov 29 2026 - 00:59:45 EST


Hi Harry,

> Please consider improving readability of the commit message and the
> comment.

Sorry about that. I will send a v2 with a short changelog and shorter
comments.

> Yup, which is benign as the counter is only used by hardening checks,
> right?
>
> And they should be skipped with such a compiler?

Not with Clang from 20.1 up to 22.1. CC_HAS_COUNTED_BY is set there, so
the checks run, but CC_HAS_BROKEN_COUNTED_BY_REF turns __flex_counter()
into NULL and kmalloc_flex() does not set the counter. That is fine as
long as the caller sets it.


Thanks,
Arina