All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC net-next] Cancel any pending connection attempts before taking down connection
@ 2017-02-28  1:44 Sowmini Varadhan
  0 siblings, 0 replies; only message in thread
From: Sowmini Varadhan @ 2017-02-28  1:44 UTC (permalink / raw)
  To: sowmini.varadhan, dvyukov, netdev, sowmini.varadhan

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-01  0:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-28  1:44 [PATCH RFC net-next] Cancel any pending connection attempts before taking down connection Sowmini Varadhan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.