Skip to contentSkip to conversation

fix iovec length in recvmsg

PATCH New Steven Whitehouse 1 participant 1 message Oct 20, 2006 Distributed lock manager (DLM)

lore
Share & tools
lore
#0 lore raw

PATCH 1/8 fix iovec length in recvmsg

Quoted 1 line

From 42fb00838a644d03f9a2a5fbbe0b668a5ff5df4d Mon Sep 17 00:00:00 2001

From: Patrick Caulfield <[email protected]>
Date: Fri, 13 Oct 2006 17:12:05 +0100
Subject: [DLM] fix iovec length in recvmsg

I didn't spot that the msg_iovlen was set to 2 if there were two elements in the iovec but left at zero if not :(

I think this might be why bob was still seeing trouble.

---
 fs/dlm/lowcomms.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/dlm/lowcomms.c +1 -0
index 867f93d..6da6b14 100644
@@ -519,6 +519,7 @@ static int receive_from_sock(void)
 	msg.msg_flags = 0;
 	msg.msg_control = incmsg;
 	msg.msg_controllen = sizeof(incmsg);
+	msg.msg_iovlen = 1;
 
 	/* I don't see why this circular buffer stuff is necessary for SCTP
 	 * which is a packet-based protocol, but the whole thing breaks under
Signature · 1 line
1.4.1