mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 22:54:01 +00:00
rxrpc: Fix sendmsg(MSG_WAITALL) handling
commit498b577660
upstream. Fix the handling of sendmsg() with MSG_WAITALL for userspace to round the timeout for when a signal occurs up to at least two jiffies as a 1 jiffy timeout may end up being effectively 0 if jiffies wraps at the wrong time. Fixes:bc5e3a546d
("rxrpc: Use MSG_WAITALL to tell sendmsg() to temporarily ignore signals") Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f40ff192ca
commit
e9de0d1bc1
1 changed files with 2 additions and 2 deletions
|
@ -62,8 +62,8 @@ static int rxrpc_wait_for_tx_window_nonintr(struct rxrpc_sock *rx,
|
|||
|
||||
rtt = READ_ONCE(call->peer->rtt);
|
||||
rtt2 = nsecs_to_jiffies64(rtt) * 2;
|
||||
if (rtt2 < 1)
|
||||
rtt2 = 1;
|
||||
if (rtt2 < 2)
|
||||
rtt2 = 2;
|
||||
|
||||
timeout = rtt2;
|
||||
tx_start = READ_ONCE(call->tx_hard_ack);
|
||||
|
|
Loading…
Reference in a new issue