Re: client side "current->alloc_tag not set WARNING: ./include/linux/alloc_tag.h:161" at accessing CIFS share

From: Paulo Alcantara

Date: Tue Sep 01 2026 - 19:20:44 EST


Erhard Furtner <erhard_f@xxxxxxxxxxx> writes:

> Getting this "current->alloc_tag not set WARNING:" every time on my
> client PC when I open files on the CIFS share (exported via KSMBD) from
> my host PC:

The warning is triggered by running the following in
netfs_alloc_request() with CONFIG_MEM_ALLOC_PROFILING_DEBUG=y kernels:

rreq = mempool->alloc(gfp, mempool->pool_data);

for the non-writeback path.

@mempool->alloc is set to mempool_alloc_slab(), which calls
kmem_cache_alloc_noprof() directly and expects the caller to have
already set current->alloc_tag.

It doesn't occur in the writeback path, however, because we call
mempool_alloc() macro that wraps to

alloc_hooks(mempool_alloc_noprof(...))

and it sets current->alloc_tag before the allocation.

I'll look for a possible solution and then let you know.

Thanks for the report.