]> sourceware.org Git - lvm2.git/commitdiff
Avoid cookie sharing between forked processes
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 10 Jan 2011 19:31:02 +0000 (19:31 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 10 Jan 2011 19:31:02 +0000 (19:31 +0000)
Before fork, ensure cookie is reset so it's not shared between processes.

WHATS_NEW
lib/misc/lvm-exec.c
tools/polldaemon.c

index 1e66f42c56fc7b46a83250bc17d92c3e2616bcb4..4a5382325d467ded7d0b241652e8a44abfd2764c 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.81 - 
 ===================================
+  Fix cookie sharing between forked lvm processes (2.02.80).
 
 Version 2.02.80 - 10th January 2011
 ===================================
index 5cad79eb2996d8c51e717a279bf13230b12f667d..6dde265c6ffef30eb2c61e53d03c03d70f291006 100644 (file)
@@ -54,6 +54,8 @@ int exec_cmd(struct cmd_context *cmd, const char *const argv[], int *rstatus)
 
        log_verbose("Executing: %s", _verbose_args(argv, buf, sizeof(buf)));
 
+       fs_unlock(); /* Flush oops and ensure cookie is not shared */
+
        if ((pid = fork()) == -1) {
                log_error("fork failed: %s", strerror(errno));
                return 0;
index 4da27fed701b2d9d68070a3d7c5c5549c22c6bfb..0ee7a8c596425d8320e601931edf92881697201f 100644 (file)
@@ -42,6 +42,8 @@ static int _become_daemon(struct cmd_context *cmd)
 
        sigaction(SIGCHLD, &act, NULL);
 
+       fs_unlock(); /* Flush oops and ensure cookie is not shared */
+
        if ((pid = fork()) == -1) {
                log_error("fork failed: %s", strerror(errno));
                return -1;
This page took 0.050144 seconds and 5 git commands to generate.