aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorCasey Dahlin <cdahlin@redhat.com>2009-07-28 13:29:05 -0400
committerDavid Teigland <teigland@redhat.com>2009-08-18 16:09:24 -0400
commitb5711b8e5a437ca7d35321d19de568b4f76a7739 (patch)
tree945c9f712833ed2810e3179ab626fb974e438996 /fs/dlm
parentdf4ecf1524c7793de3121b2d4e5fc6bcc0da3bfb (diff)
dlm: fix double-release of socket in error exit path
The last correction to the tcp_connect_to_sock error exit path, commit a89d63a159b1ba5833be2bef00adf8ad8caac8be, can free an already freed socket, due to collision with a previous (incomplete) attempt to fix the same issue, commit 311f6fc77c51926dbdfbeab0a5d88d70f01fa3f4. Signed-off-by: Casey Dahlin <cdahlin@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/lowcomms.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 618a60f03886..210d52c48808 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -926,10 +926,8 @@ static void tcp_connect_to_sock(struct connection *con)
926 goto out_err; 926 goto out_err;
927 927
928 memset(&saddr, 0, sizeof(saddr)); 928 memset(&saddr, 0, sizeof(saddr));
929 if (dlm_nodeid_to_addr(con->nodeid, &saddr)) { 929 if (dlm_nodeid_to_addr(con->nodeid, &saddr))
930 sock_release(sock);
931 goto out_err; 930 goto out_err;
932 }
933 931
934 sock->sk->sk_user_data = con; 932 sock->sk->sk_user_data = con;
935 con->rx_action = receive_from_sock; 933 con->rx_action = receive_from_sock;