From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick Caulfield Date: Tue, 13 Mar 2007 17:34:40 +0000 Subject: [Cluster-devel] [PATCH] dlm: Fix uninitialised variable in receiving In-Reply-To: <45F6DA9D.7080206@redhat.com> References: <45F6DA9D.7080206@redhat.com> Message-ID: <45F6E0B0.4030807@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Patrick Caulfield wrote: > 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 > > > ------------------------------------------------------------------------ > > diff --git a/fs/dlm/lowcomms-tcp.c b/fs/dlm/lowcomms-tcp.c > index 07e0a12..9bfe7fb 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; > > /* Just to add that this is already in RHEL5, but it needs to go upstream. -- patrick