mm, slab: warn when increasing refcount on large kmalloc page

Since slab pages are now frozen, increasing refcount on a page
containing a kmalloc() allocation is not possible anymore. Large kmalloc
pages should ideally behave the same, because the decision for which
allocation size to use them is the slab allocator's implementation
detail, and sizes passed to kmalloc() might depend on e.g. user input.

Because of some unexpected fallout in the slab pages case (see commit
b9c0e49abfca ("mm: decline to manipulate the refcount on a slab page"),
let's take a more cautious approach and before making large kmalloc
pages actually frozen, start warning about code that would try to
increase refcount on them.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
1 file changed