]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rxrpc: Fix sendmsg(MSG_WAITALL) handling
authorDavid Howells <dhowells@redhat.com>
Fri, 13 Mar 2020 17:30:27 +0000 (17:30 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Apr 2020 07:10:04 +0000 (09:10 +0200)
commitc3ec164d9c67fa8c6fdc1e9837768c26f480e8a2
treec36e9a4d13cf289d0828343b4f5eddf8074e80c6
parentc087b2e0d7ee9bc5aa913a9d2dde7ea466a39879
rxrpc: Fix sendmsg(MSG_WAITALL) handling

commit 498b577660f08cef5d9e78e0ed6dcd4c0939e98c 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: bc5e3a546d55 ("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>
net/rxrpc/sendmsg.c