Re: [PATCH 06/25] slab: make kmem_cache_create() work with 32-bit sizes

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

 



On Mon, 5 Mar 2018, Alexey Dobriyan wrote:

> struct kmem_cache::size and ::align were always 32-bit.
>
> Out of curiosity I created 4GB kmem_cache, it oopsed with division by 0.
> kmem_cache_create(1UL<<32+1) created 1-byte cache as expected.

Could you add a check to avoid that in the future?

> size_t doesn't work and never did.

Its not so simple. Please verify that the edge cases of all object size /
alignment etc calculations are doable with 32 bit entities first.

And size_t makes sense as a parameter.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[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