rxrpc: Fix the lack of notification when sendmsg() fails on a DATA packet
authorDavid Howells <dhowells@redhat.com>
Tue, 30 Jul 2019 13:42:50 +0000 (14:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2019 06:28:35 +0000 (08:28 +0200)
commit4db2043eec468ed358ff1100a3024dcae3b1b5ad
tree681e4ae26ff8c63ae73b09cd4fa38e1ecc855071
parent0d68fbc2d07b5914fb8712b05549bd558fccf1c8
rxrpc: Fix the lack of notification when sendmsg() fails on a DATA packet

[ Upstream commit c69565ee6681e151e2bb80502930a16e04b553d1 ]

Fix the fact that a notification isn't sent to the recvmsg side to indicate
a call failed when sendmsg() fails to transmit a DATA packet with the error
ENETUNREACH, EHOSTUNREACH or ECONNREFUSED.

Without this notification, the afs client just sits there waiting for the
call to complete in some manner (which it's not now going to do), which
also pins the rxrpc call in place.

This can be seen if the client has a scope-level IPv6 address, but not a
global-level IPv6 address, and we try and transmit an operation to a
server's IPv6 address.

Looking in /proc/net/rxrpc/calls shows completed calls just sat there with
an abort code of RX_USER_ABORT and an error code of -ENETUNREACH.

Fixes: c54e43d752c7 ("rxrpc: Fix missing start of call timeout")
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Marc Dionne <marc.dionne@auristor.com>
Reviewed-by: Jeffrey Altman <jaltman@auristor.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/rxrpc/sendmsg.c