From: rao.shoaib@oracle.com
To: hch@lst.de, pabeni@redhat.com, jbi.octave@gmail.com,
linux-api@vger.kernel.org
Cc: Rao Shoaib <rao.shoaib@oracle.com>
Subject: [RFC net-next af_unix v1 1/1] af_unix: Allow delivery of SIGURG on AF_UNIX streams socket
Date: Sat, 28 Nov 2020 18:52:12 -0800 [thread overview]
Message-ID: <1606618332-23345-2-git-send-email-rao.shoaib@oracle.com> (raw)
In-Reply-To: <1606618332-23345-1-git-send-email-rao.shoaib@oracle.com>
From: Rao Shoaib <rao.shoaib@oracle.com>
For AF_UNIX stream socket send SIGURG to the peer if
the msg has MSG_OOB flag set.
Signed-off-by: Rao Shoaib <rao.shoaib@oracle.com>
---
net/unix/af_unix.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 92784e5..4f01d74 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1840,8 +1840,6 @@ static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg,
return err;
err = -EOPNOTSUPP;
- if (msg->msg_flags&MSG_OOB)
- goto out_err;
if (msg->msg_namelen) {
err = sk->sk_state == TCP_ESTABLISHED ? -EISCONN : -EOPNOTSUPP;
@@ -1906,6 +1904,9 @@ static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg,
sent += size;
}
+ if (msg->msg_flags & MSG_OOB)
+ sk_send_sigurg(other);
+
scm_destroy(&scm);
return sent;
--
1.8.3.1
next prev parent reply other threads:[~2020-11-29 3:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-29 2:52 [RFC net-next af_unix v1 0/1] Allow delivery of SIGURG on AF_UNIX streams socket rao.shoaib
2020-11-29 2:52 ` rao.shoaib [this message]
2020-11-29 4:02 ` Andy Lutomirski
2020-11-30 6:24 ` Rao Shoaib
2020-12-07 16:35 ` Matthew Wilcox
2020-12-07 17:00 ` Andy Lutomirski
2020-12-07 18:51 ` Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1606618332-23345-2-git-send-email-rao.shoaib@oracle.com \
--to=rao.shoaib@oracle.com \
--cc=hch@lst.de \
--cc=jbi.octave@gmail.com \
--cc=linux-api@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).