From: Patrick Caulfield Date: Tue, 13 Mar 2007 17:08:45 +0000 (+0000) Subject: [DLM] Fix uninitialised variable in receiving X-Git-Tag: v2.6.22-rc1~820^2~31 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=89adc934f3f96600e7f31447426c7e99d62c5460;p=linux-2.6-omap-h63xx.git [DLM] Fix uninitialised variable in receiving The length of the second element of the kvec array was not initialised before being added to the first one. This could cause invalid lengths to be passed to kernel_recvmsg Signed-Off-By: Patrick Caulfield Signed-off-by: Steven Whitehouse --- diff --git a/fs/dlm/lowcomms-tcp.c b/fs/dlm/lowcomms-tcp.c index 07e0a122c32..9bfe7fb721e 100644 --- a/fs/dlm/lowcomms-tcp.c +++ b/fs/dlm/lowcomms-tcp.c @@ -299,6 +299,7 @@ static int receive_from_sock(struct connection *con) */ iov[0].iov_len = con->cb.base - cbuf_data(&con->cb); iov[0].iov_base = page_address(con->rx_page) + cbuf_data(&con->cb); + iov[1].iov_len = 0; nvec = 1; /*