]> git.baikalelectronics.ru Git - kernel.git/commit
pvcalls-back: do not return error on inet_accept EAGAIN
authorStefano Stabellini <sstabellini@kernel.org>
Sat, 3 Feb 2018 01:34:09 +0000 (17:34 -0800)
committerJuergen Gross <jgross@suse.com>
Tue, 6 Feb 2018 14:50:52 +0000 (15:50 +0100)
commitb47a28a59a7018384963b42517b0ac921bacef51
tree87d37ef6b565a0f25dc1c9b73a8e818cc0c106f5
parentbac3a8667e7bd75652b0799fc86d454218b296f5
pvcalls-back: do not return error on inet_accept EAGAIN

When the client sends a regular blocking accept request, the backend is
expected to return only when the accept is completed, simulating a
blocking behavior, or return an error.

Specifically, on EAGAIN from inet_accept, the backend shouldn't return
"EAGAIN" to the client. Instead, it should simply continue the wait.
Otherwise, the client will send another accept request, which will cause
another EAGAIN to be sent back, which is a waste of resources and not
conforming to the expected behavior. Change the behavior by turning the
"goto error" into a return.

Signed-off-by: Stefano Stabellini <stefano@aporeto.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/pvcalls-back.c