Skip to content

Commit

Permalink
[DLM] Fix uninitialised variable in receiving
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Patrick Caulfield authored and Steven Whitehouse committed May 1, 2007
1 parent 5c7342d commit 89adc93
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/dlm/lowcomms-tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down

0 comments on commit 89adc93

Please sign in to comment.