]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[DLM] Fix uninitialised variable in receiving
authorPatrick Caulfield <pcaulfie@redhat.com>
Tue, 13 Mar 2007 17:08:45 +0000 (17:08 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Tue, 1 May 2007 08:10:34 +0000 (09:10 +0100)
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 <pcaulfie@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/dlm/lowcomms-tcp.c

index 07e0a122c32fcafe29546a2c02dabbcb93a019c9..9bfe7fb721e6ae0609bb0827caf4f4aa7eb2e51c 100644 (file)
@@ -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;
 
        /*