From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: sowmini.varadhan@oracle.com, dvyukov@google.com, netdev@vger.kernel.org
To: sowmini.varadhan@oracle.com
Subject: [PATCH RFC net-next] Cancel any pending connection attempts before taking down connection
Date: Mon, 27 Feb 2017 17:44:00 -0800 [thread overview]
Message-ID: <1488246240-159171-1-git-send-email-sowmini.varadhan@oracle.com> (raw)
This is a test patch being supplied for a trial run on syzkaller.
Explicitly cancel the workq before releasing resources that
will allow netns deletion, so that the connect request does
not trip up on a use-after free of the netns afterward.
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
---
net/rds/tcp.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/rds/tcp.c b/net/rds/tcp.c
index 57bb523..2568eb1 100644
--- a/net/rds/tcp.c
+++ b/net/rds/tcp.c
@@ -509,6 +509,8 @@ static void rds_tcp_conn_paths_destroy(struct rds_connection *conn)
for (i = 0; i < RDS_MPATH_WORKERS; i++) {
cp = &conn->c_path[i];
+ if (cancel_delayed_work_sync(&cp->cp_conn_w))
+ pr_info("cancelled on path %d\n", i);
tc = cp->cp_transport_data;
if (!tc->t_sock)
continue;
--
1.7.1
reply other threads:[~2017-03-01 0:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1488246240-159171-1-git-send-email-sowmini.varadhan@oracle.com \
--to=sowmini.varadhan@oracle.com \
--cc=dvyukov@google.com \
--cc=netdev@vger.kernel.org \
/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).