Patch "tipc: ignore requests when the connection state is not CONNECTED" has been added to the 4.9-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
tipc: ignore requests when the connection state is not CONNECTED
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
tipc-ignore-requests-when-the-connection-state-is-not-connected.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Thu Jun 15 16:35:05 CEST 2017
From: Parthasarathy Bhuvaragan <[email protected]>
Date: Tue, 24 Jan 2017 13:00:47 +0100
Subject: tipc: ignore requests when the connection state is not CONNECTED
From: Parthasarathy Bhuvaragan <[email protected]>
[ Upstream commit 4c887aa65d38633885010277f3482400681be719 ]
In tipc_conn_sendmsg(), we first queue the request to the outqueue followed by the connection state check. If the connection is not connected, we should not queue this message.
In this commit, we reject the messages if the connection state is not CF_CONNECTED.
--- net/tipc/server.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
net/tipc/server.c +7 -6
@@ -458,6 +458,11 @@ int tipc_conn_sendmsg(struct tipc_serverif (!con)return -EINVAL ; +if (!test_bit (CF_CONNECTED , &con->flags)) { +conn_put (con); +return 0 ; + } + e =tipc_alloc_entry (data, len);if (!e) {conn_put (con);
@@ -471,12 +476,8 @@ int tipc_conn_sendmsg(struct tipc_serverlist_add_tail (&e->list, &con->outqueue);spin_unlock_bh (&con->outqueue_lock); -if (test_bit (CF_CONNECTED , &con->flags)) { -if (!queue_work (s->send_wq, &con->swork)) -conn_put (con); - }else { +if (!queue_work (s->send_wq, &con->swork))conn_put (con); - }return 0 ; }
@@ -500,7 +501,7 @@ static void tipc_send_to_sock(struct tipint ret;spin_lock_bh (&con->outqueue_lock); -while (1 ) { +while (test_bit (CF_CONNECTED , &con->flags)) { e = list_entry(con->outqueue.next, struct outqueue_entry, list);if ((struct list_head *) e == &con->outqueue)
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/tipc-fix-connection-refcount-error.patch queue-4.9/tipc-fix-nametbl_lock-soft-lockup-at-node-link-events.patch queue-4.9/tipc-ignore-requests-when-the-connection-state-is-not-connected.patch queue-4.9/tipc-add-subscription-refcount-to-avoid-invalid-delete.patch