From: Lance Richardson <lance.richardson....@gmail.com>
Date: Wed, 25 Apr 2018 10:21:54 -0400

> For the x32 ABI, struct timeval has two 64-bit fields. However
> the kernel currently interprets the user-space values used for
> the SO_RCVTIMEO and SO_SNDTIMEO socket options as having a pair
> of 32-bit fields.
> 
> When the seconds portion of the requested timeout is less than 2**32,
> the seconds portion of the effective timeout is correct but the
> microseconds portion is zero.  When the seconds portion of the
> requested timeout is zero and the microseconds portion is non-zero,
> the kernel interprets the timeout as zero (never timeout).
> 
> Fix by using 64-bit time for SO_RCVTIMEO/SO_SNDTIMEO as required
> for the ABI.
> 
> The code included below demonstrates the problem.
 ...
> Fixes: 515c7af85ed9 ("x32: Use compat shims for {g,s}etsockopt")
> Reported-by: Gopal RajagopalSai <gopals...@gmail.com>
> Signed-off-by: Lance Richardson <lance.richardson....@gmail.com>

Really nice commit message and test case.

Applied and queued up for -stable, thank you.

Reply via email to