> Would a similar clamp fit the SIOCINQ case?
Good catch. Yes, SIOCINQ writes the byte count to an int, so clamping to INT_MAX makes sense there. Agreed that it belongs in a separate patch.