On Tue, Dec 01, 2026 at 06:24:38PM +0000, Amir Hosseini wrote:
> On Tue, Dec 01, 2026 at 04:55:03PM +0200, Mike Rapoport wrote:
> > Since that table is allocated in an initcall why not simply replace it with > > kvmalloc_array()?
> > Good idea, that's much simpler. I tested it with the same fail_page_alloc > setup and the crash is gone. I'll send a patch. >
> > You are right that the loop should respect the low_limit, but the entire > > alloc_large_system_hash() is quite convoluted and I believe it requires > > more drastic refactoring.
> > TCP is where I hit this, but UDP depends on low_limit too. > udp_lib_get_port() keeps a bitmap on the stack that assumes at least 128 > slots, so if the table shrinks to 64 it writes past the end. KASAN catches > it on a bind to port 0. This is very unlikely in practice. I can send a > small patch that just stops the loop at low_limit, unless you prefer to > fold it into your cleanup.
Yes, please. A small patch can be backported, a larger cleanup can't :)
> Thanks, > Amir
-- Sincerely yours, Mike.