浏览代码

[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 <pcaulfie@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Patrick Caulfield 18 年之前
父节点
当前提交
89adc934f3
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      fs/dlm/lowcomms-tcp.c

+ 1 - 0
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;
 
 	/*