Any ideas about how to fix the core issue of tb->fast* being
effectively invalid?

ie. currently any reader of tb->fastreuse(port) which isn't simply
testing for it being >= 0 is basically a bug (-1 is the empty tb case,
so that AFAICT keeps on working).

For example sk_reuseport_match(tb, sk) can both fail to match when it
should, and can match when it shouldn't...

(at a quick glance, all the readers, and thus bugs are constrained to
the inet_csk_get_port() function)

Do we just delete that entire 'tb->fast*' optimization?  It would
certainly make the code much simpler...

Do we put special case per-family/protocol code (ie. presumably
another indirect call) to fix up tb->fast in the
setsockopt(SOREUSEADDR/PORT) codepath?

Something else?

(btw. I'm not certain if both 0->1 and 1->0 transitions on a bound
socket are equally buggy, I think one is more dangerous then the
other)

Reply via email to