search for: sk_stream_error

Displaying 6 results from an estimated 6 matches for "sk_stream_error".

2023 Aug 31
0
[RFC PATCH v2 0/2] vsock: handle writes to shutdowned socket
...utdown()' (both sides - local with >SHUT_WR flag, peer - with SHUT_RD flag). According POSIX we must send >SIGPIPE in such cases (but SIGPIPE is not send when MSG_NOSIGNAL is set). > >First patch is implemented in the same way as net/ipv4/tcp.c:tcp_sendmsg_locked(). >It uses 'sk_stream_error()' function which handles EPIPE error. Another >way is to use code from net/unix/af_unix.c:unix_stream_sendmsg() where >same logic from 'sk_stream_error()' is implemented "from scratch", but >it doesn't check 'sk_err' field. I think error from this field h...
2023 Aug 22
0
[RFC PATCH v1 1/2] vsock: send SIGPIPE on write to shutdowned socket
...1921,6 +1921,9 @@ static int vsock_connectible_sendmsg(struct socket *sock, struct msghdr *msg, >>>>> ??????????? err = total_written; >>>>> ????} >>>>> out: >>>>> +??? if (sk->sk_type == SOCK_STREAM) >>>>> +??????? err = sk_stream_error(sk, msg->msg_flags, err); >>>> >>>> Do you know why we don't need this for SOCK_SEQPACKET and SOCK_DGRAM? >>> >>> Yes, here is my explanation: >>> >>> This function checks that input error is SIGPIPE, and if so it sends SIGPIPE to t...
2023 Aug 31
0
[RFC PATCH v2 1/2] vsock: send SIGPIPE on write to shutdowned socket
...7e4..013b65241b65 100644 >--- a/net/vmw_vsock/af_vsock.c >+++ b/net/vmw_vsock/af_vsock.c >@@ -1921,6 +1921,9 @@ static int vsock_connectible_sendmsg(struct socket *sock, struct msghdr *msg, > err = total_written; > } > out: >+ if (sk->sk_type == SOCK_STREAM) >+ err = sk_stream_error(sk, msg->msg_flags, err); >+ > release_sock(sk); > return err; > } >-- >2.25.1 >
2023 Aug 04
0
[RFC PATCH v1 1/2] vsock: send SIGPIPE on write to shutdowned socket
...t/vmw_vsock/af_vsock.c >>> @@ -1921,6 +1921,9 @@ static int vsock_connectible_sendmsg(struct socket *sock, struct msghdr *msg, >>> ??????????? err = total_written; >>> ????} >>> out: >>> +??? if (sk->sk_type == SOCK_STREAM) >>> +??????? err = sk_stream_error(sk, msg->msg_flags, err); >> >> Do you know why we don't need this for SOCK_SEQPACKET and SOCK_DGRAM? > >Yes, here is my explanation: > >This function checks that input error is SIGPIPE, and if so it sends SIGPIPE to the 'current' thread >(except case when...
2023 Aug 04
0
[RFC PATCH v1 1/2] vsock: send SIGPIPE on write to shutdowned socket
...1921,6 +1921,9 @@ static int vsock_connectible_sendmsg(struct socket *sock, struct msghdr *msg, >>>>> ??????????? err = total_written; >>>>> ????} >>>>> out: >>>>> +??? if (sk->sk_type == SOCK_STREAM) >>>>> +??????? err = sk_stream_error(sk, msg->msg_flags, err); >>>> >>>> Do you know why we don't need this for SOCK_SEQPACKET and SOCK_DGRAM? >>> >>> Yes, here is my explanation: >>> >>> This function checks that input error is SIGPIPE, and if so it sends SIGPIPE to t...
2023 Aug 22
0
[RFC PATCH v1 1/2] vsock: send SIGPIPE on write to shutdowned socket
...ctible_sendmsg(struct socket *sock, struct msghdr *msg, >>>>>>> ??????????? err = total_written; >>>>>>> ????} >>>>>>> out: >>>>>>> +??? if (sk->sk_type == SOCK_STREAM) >>>>>>> +??????? err = sk_stream_error(sk, msg->msg_flags, err); >>>>>> >>>>>> Do you know why we don't need this for SOCK_SEQPACKET and SOCK_DGRAM? >>>>> >>>>> Yes, here is my explanation: >>>>> >>>>> This function checks that input e...