summaryrefslogtreecommitdiffstats
path: root/rfc.sh
diff options
context:
space:
mode:
authorXavi Hernandez <xhernandez@redhat.com>2019-12-11 18:21:14 +0100
committerRaghavendra G <rgowdapp@redhat.com>2019-12-12 17:56:19 +0000
commitb202e0e01d0eb8085eb8006dfa77b7b4b06978e6 (patch)
tree48d975b3c730c6dd7476cca5bd4dcb655f5bafca /rfc.sh
parentd7e049160a9dea988ded5816491c2234d40ab6b3 (diff)
socket: fix error handling
When __socket_proto_state_machine() detected a problem in the size of the request or it couldn't allocate an iobuf of the requested size, it returned -ENOMEM (-12). However the caller was expecting only -1 in case of error. For this reason the error passes undetected initially, adding back the socket to the epoll object. On further processing, however, the error is finally detected and the connection terminated. Meanwhile, another thread could receive a poll_in event from the same connection, which could cause races with the connection destruction. When this happened, the process crashed. To fix this, all error detection conditions have been hardened to be more strict on what is valid and what not. Also, we don't return -ENOMEM anymore. We always return -1 in case of error. An additional change has been done to prevent destruction of the transport object while it may still be needed. Change-Id: I6e59cd81cbf670f7adfdde942625d4e6c3fbc82d Fixes: bz#1782495 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
Diffstat (limited to 'rfc.sh')
0 files changed, 0 insertions, 0 deletions