summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WHATS_NEW1
-rw-r--r--daemons/clvmd/clvmd.c14
2 files changed, 13 insertions, 2 deletions
diff --git a/WHATS_NEW b/WHATS_NEW
index 85398adb..9c53e390 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.87 -
===============================
+ If pipe in clvmd fails, return busy instead of using uninitialised descriptors.
Add dmeventd monitoring shared library for RAID.
Add RAID metadata devices to considered devices in _add_lv_to_dtree.
Fix renaming of RAID logical volumes.
diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c
index 07883eaa..cffb7456 100644
--- a/daemons/clvmd/clvmd.c
+++ b/daemons/clvmd/clvmd.c
@@ -1263,9 +1263,19 @@ static int read_from_local_sock(struct local_client *thisfd)
}
/* Create a pipe and add the reading end to our FD list */
- if (pipe(comms_pipe))
+ if (pipe(comms_pipe)) {
+ struct clvm_header reply;
DEBUGLOG("creating pipe failed: %s\n", strerror(errno));
-
+ reply.cmd = CLVMD_CMD_REPLY;
+ reply.status = EBUSY;
+ reply.arglen = 0;
+ reply.flags = 0;
+ send_message(&reply, sizeof(reply), our_csid,
+ thisfd->fd,
+ "Error sending EBUSY reply to local user");
+ return len;
+ }
+
newfd = malloc(sizeof(struct local_client));
if (!newfd) {
struct clvm_header reply;