-
Bug
-
Resolution: Fixed
-
Medium
-
None
-
None
-
3
-
9223372036854775807
LU-20221 (b94f56769f) sizes the lnetctl net show dump buffer per NI and writes the total into cb->min_dump_alloc. On kernels where that field is u16, the total wraps once it passes 65535. At ~6.5KB per NI, 0@lo plus 8 tcp NIs gives 66162, which wraps to 626. That is smaller than the U16_MAX it replaced.
Two smaller problems are in the same code:
▎ - lnet_net_size_skb() resets prev_type from its LNET_NET_ANY argument rather than the net being sized, so it charges a key table for every net.
▎ - The malformed-request exit in lnet_net_show_start() returns without freeing nlist. ->done() is not called when ->start() fails.
▎
▎ Fix: Sum into a local ssize_t and cap at the field's maximum, as lnet_route_show_start() does. This keeps large nodes at the old U16_MAX instead of making net show fail. Also track prev_type correctly and take the malformed-request exit through report_err.