Skip to contentSkip to conversation

DLM: Telnet to port 21064 can stop all lockspaces

PATCH New Patrick Caulfield 2 participants 2 messages Jun 27, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 DLM: Telnet to port 21064 can stop all lockspaces

This patch fixes Red Hat bz#245892

Opening a tcp connection from a cluster member to another cluster member targeting the dlm port it is enough to stop every dlm operation in the cluster. This means that GFS and rgmanager will hang.

Signature · 9 lines
Patrick

Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street,
Windsor, Berkshire, SL4 ITE, UK.
Registered in England and Wales under Company Registration No. 3798903
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: lowcomms-dos-patch.upstream
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20070627/3c92ee72/attachment.ksh>
#1 lore raw

PATCH 1/1 DLM: Telnet to port 21064 can stop all lockspaces

Hi,

Now applied to the -nmw git tree. Thanks,

Steve.

Quoted 35 lines · Patrick Caulfield

This patch fixes Red Hat bz#245892

Opening a tcp connection from a cluster member to another cluster member targeting the dlm port it is enough to stop every dlm operation in the cluster. This means that GFS and rgmanager will hang.

plain text document attachment (lowcomms-dos-patch.upstream)

fs/dlm/lowcomms.c +10 -4
index fc0bff7..73d44f5 100644
@@ -720,11 +720,17 @@ static int tcp_accept_from_sock(struct connection *con)
 			INIT_WORK(&othercon->rwork, process_recv_sockets);
 			set_bit(CF_IS_OTHERCON, &othercon->flags);
 			newcon->othercon = othercon;
+			othercon->sock = newsock;
+			newsock->sk->sk_user_data = othercon;
+			add_sock(newsock, othercon);
+			addcon = othercon;
+		}
+		else {
+			printk("Extra connection from node %d attempted\n", nodeid);
+			result = -EAGAIN;
+			up_write(&newcon->sock_sem);
+			goto accept_err;
 		}
-		othercon->sock = newsock;
-		newsock->sk->sk_user_data = othercon;
-		add_sock(newsock, othercon);
-		addcon = othercon;
 	}
 	else {
 		newsock->sk->sk_user_data = newcon;