1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

Fix off-by-one error in cluster_locking that could case read hangs.

This commit is contained in:
Patrick Caulfield 2005-01-07 14:22:49 +00:00
parent 99dffafbb2
commit b9fb9b206e
3 changed files with 4 additions and 3 deletions

View File

@ -5,6 +5,7 @@ Version 2.00.33 -
gulm clvmd now doesn't ignore the first node in cluster.conf
Improve clvmd failure message if it's already running.
Allow user to kill clvmd during initialisation.
Fix off-by-one error in cluster_locking that could cause read hangs.
Version 2.00.32 - 22nd December 2004
====================================

View File

@ -1313,6 +1313,7 @@ static void *pre_and_post_thread(void *arg)
DEBUGLOG("Got post command condition...\n");
status = 0;
do_post_command(client);
write(pipe_fd, &status, sizeof(int));

View File

@ -139,8 +139,7 @@ static int _send_request(char *inbuf, int inlen, char **retbuf)
/* Read the returned values */
off = 1; /* we've already read the first byte */
while (off < outheader->arglen && len > 0) {
while (off <= outheader->arglen && len > 0) {
len = read(_clvmd_sock, outheader->args + off,
buflen - off - offsetof(struct clvm_header, args));
if (len > 0)
@ -150,7 +149,7 @@ static int _send_request(char *inbuf, int inlen, char **retbuf)
/* Was it an error ? */
if (outheader->status < 0) {
errno = -outheader->status;
log_error("cluster send request failed: %s", strerror(errno));
log_error("cluster request failed: %s", strerror(errno));
return 0;
}