sk-unix: ignore shutdown mismatch in unix sockets
Usually unix stream sockets have consistent shutdown state (if one end shutdown for read than other end will be shut down for write). However sometimes it's possible to have stream sockets with mismatched shutdown state. This happens if we connect() already shut down socket (see upcoming sockets03.c test for example). On read()/write() kernel always checks shutdown state on both ends, so from userspace POV sockets with mismatched shutdown state behave the same way as with matched state. So I think that we can just ignore shutdown mismatch during dump, and just restore sockets with matching shutdown state. Process should not see the differences. Signed-off-by:Andrey Ryabinin <aryabinin@virtuozzo.com> Acked-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
Showing
Please
register
or
sign in
to comment