From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8644 invoked by alias); 11 Oct 2011 09:23:48 -0000 Received: (qmail 8626 invoked by uid 9737); 11 Oct 2011 09:23:48 -0000 Date: Tue, 11 Oct 2011 09:23:00 -0000 Message-ID: <20111011092348.8624.qmail@sourceware.org> From: zkabelac@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/daemons/clvmd clvmd.c Mailing-List: contact lvm2-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: lvm2-cvs-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00038.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: zkabelac@sourceware.org 2011-10-11 09:23:48 Modified files: daemons/clvmd : clvmd.c Log message: Add FIXMEs for init_test Usage of thread unprotected init_test is not correct and needs probably lvm lock since it part of lvm library. Current implementation may probably fail with test mode and actually create something unexpectedly (and vice versa). Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd.c.diff?cvsroot=lvm2&r1=1.111&r2=1.112 --- LVM2/daemons/clvmd/clvmd.c 2011/10/11 09:18:49 1.111 +++ LVM2/daemons/clvmd/clvmd.c 2011/10/11 09:23:48 1.112 @@ -1514,9 +1514,9 @@ if (replyargs != NULL) { /* Run the command */ - status = - do_command(NULL, msg, msglen, &replyargs, buflen, - &replylen); + /* FIXME: usage of init_test() is unprotected */ + status = do_command(NULL, msg, msglen, &replyargs, + buflen, &replylen); } else { status = ENOMEM; } @@ -1651,6 +1651,7 @@ /* Loop around doing PRE and POST functions until the client goes away */ while (!client->bits.localsock.finished) { /* Execute the code */ + /* FIXME: usage of init_test() is unprotected as in do_command() */ status = do_pre_command(client); if (status) @@ -1733,6 +1734,7 @@ if (replybuf == NULL) return -1; + /* FIXME: usage of init_test() is unprotected */ status = do_command(client, msg, msglen, &replybuf, buflen, &replylen); if (status)