public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW daemons/dmeventd/dmeventd.c
@ 2011-12-21 13:03 zkabelac
  0 siblings, 0 replies; 4+ messages in thread
From: zkabelac @ 2011-12-21 13:03 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2011-12-21 13:03:07

Modified files:
	.              : WHATS_NEW 
	daemons/dmeventd: dmeventd.c 

Log message:
	Fix missing thread list manipulation
	
	For manipulation with thread list to avoid race with timeout thread,
	take also _timeout_mutex.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2208&r2=1.2209
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/dmeventd.c.diff?cvsroot=lvm2&r1=1.84&r2=1.85

--- LVM2/WHATS_NEW	2011/12/21 12:59:22	1.2208
+++ LVM2/WHATS_NEW	2011/12/21 13:03:06	1.2209
@@ -1,5 +1,6 @@
 Version 2.02.89 - 
 ==================================
+  Fix missing thread list manipulation protection in dmeventd.
   Do not derefence lv pointer in _percent_run() function before NULL check.
   Allow empty strings for description and creation_host config fields.
   Issue deprecation warning when removing last lvm1-format snapshot.
--- LVM2/daemons/dmeventd/dmeventd.c	2011/09/14 09:53:32	1.84
+++ LVM2/daemons/dmeventd/dmeventd.c	2011/12/21 13:03:07	1.85
@@ -739,8 +739,10 @@
 			return;
 		}
 	thread->status = DM_THREAD_DONE;
+	pthread_mutex_lock(&_timeout_mutex);
 	UNLINK_THREAD(thread);
 	LINK(thread, &_thread_registry_unused);
+	pthread_mutex_unlock(&_timeout_mutex);
 	_unlock_mutex();
 }
 
@@ -1078,8 +1080,10 @@
 	 * unlink and terminate its monitoring thread.
 	 */
 	if (!thread->events) {
+		pthread_mutex_lock(&_timeout_mutex);
 		UNLINK_THREAD(thread);
 		LINK(thread, &_thread_registry_unused);
+		pthread_mutex_unlock(&_timeout_mutex);
 	}
 	_unlock_mutex();
 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* LVM2 ./WHATS_NEW daemons/dmeventd/dmeventd.c
@ 2011-02-28 19:47 zkabelac
  0 siblings, 0 replies; 4+ messages in thread
From: zkabelac @ 2011-02-28 19:47 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2011-02-28 19:47:23

Modified files:
	.              : WHATS_NEW 
	daemons/dmeventd: dmeventd.c 

Log message:
	Test result of dm_task_set_uuid

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1930&r2=1.1931
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/dmeventd.c.diff?cvsroot=lvm2&r1=1.74&r2=1.75

--- LVM2/WHATS_NEW	2011/02/28 19:35:09	1.1930
+++ LVM2/WHATS_NEW	2011/02/28 19:47:22	1.1931
@@ -1,5 +1,6 @@
 Version 2.02.85 - 
 ===================================
+  Add test for failed allocation from dm_task_set_uuid() in dmeventd.
   Improve pvremove error message when PV belongs to a VG.
   Extend normal policy to allow mirror logs on same PVs as images if necessary.
   Improve cling policy to recognise PVs already used during the transaction.
--- LVM2/daemons/dmeventd/dmeventd.c	2011/01/17 23:14:05	1.74
+++ LVM2/daemons/dmeventd/dmeventd.c	2011/02/28 19:47:22	1.75
@@ -387,7 +387,9 @@
 	if (!dmt)
 		return 0;
 
-	dm_task_set_uuid(dmt, ts->device.uuid);
+	if (!dm_task_set_uuid(dmt, ts->device.uuid))
+		goto fail;
+
 	if (!dm_task_run(dmt))
 		goto fail;
 
@@ -732,7 +734,8 @@
 	if (!dmt)
 		return NULL;
 
-	dm_task_set_uuid(dmt, ts->device.uuid);
+	if (!dm_task_set_uuid(dmt, ts->device.uuid))
+                return NULL;
 
 	if (!dm_task_run(dmt)) {
 		dm_task_destroy(dmt);


^ permalink raw reply	[flat|nested] 4+ messages in thread

* LVM2 ./WHATS_NEW daemons/dmeventd/dmeventd.c
@ 2010-12-20 14:08 zkabelac
  0 siblings, 0 replies; 4+ messages in thread
From: zkabelac @ 2010-12-20 14:08 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2010-12-20 14:08:46

Modified files:
	.              : WHATS_NEW 
	daemons/dmeventd: dmeventd.c 

Log message:
	Add check for unlink errors

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1846&r2=1.1847
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/dmeventd.c.diff?cvsroot=lvm2&r1=1.72&r2=1.73

--- LVM2/WHATS_NEW	2010/12/20 13:57:19	1.1846
+++ LVM2/WHATS_NEW	2010/12/20 14:08:46	1.1847
@@ -1,5 +1,6 @@
 Version 2.02.79 -  
 ===================================
+  Add check for unlink error result in remove_lockfile() (dmeventd).
   Use dm_free for dm_malloc-ed areas in _clog_ctr/_clog_dtr (cmirrord).
   Add checks for allocation errors in config node clonning.
   Fix error path if regex engine cannot be created in _build_matcher().
--- LVM2/daemons/dmeventd/dmeventd.c	2010/12/13 10:43:57	1.72
+++ LVM2/daemons/dmeventd/dmeventd.c	2010/12/20 14:08:46	1.73
@@ -1642,7 +1642,8 @@
 
 static void remove_lockfile(void)
 {
-	unlink(DMEVENTD_PIDFILE);
+	if (unlink(DMEVENTD_PIDFILE))
+		perror(DMEVENTD_PIDFILE ": unlink failed");
 }
 
 static void _daemonize(void)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* LVM2 ./WHATS_NEW daemons/dmeventd/dmeventd.c
@ 2010-03-31 12:01 mpatocka
  0 siblings, 0 replies; 4+ messages in thread
From: mpatocka @ 2010-03-31 12:01 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	mpatocka@sourceware.org	2010-03-31 12:01:50

Modified files:
	.              : WHATS_NEW 
	daemons/dmeventd: dmeventd.c 

Log message:
	Don't kill the parent if debugging.
	
	If dmeventd runs with -d flag, it doesn't fork into backgroud.
	The command kill(getppid(), SIGTERM) attempts to kill the parent dmeventd
	process, however, if there is no parent, it kills whatever process spawned
	dmeventd. In case of debugging with gdb, the parent is gdb, thus
	kill(getppid(), SIGTERM) kills the debugger.
	
	Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1490&r2=1.1491
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/dmeventd/dmeventd.c.diff?cvsroot=lvm2&r1=1.57&r2=1.58

--- LVM2/WHATS_NEW	2010/03/31 07:43:41	1.1490
+++ LVM2/WHATS_NEW	2010/03/31 12:01:49	1.1491
@@ -1,5 +1,6 @@
 Version 2.02.63 -  
 ================================
+  When dmeventd is not forking because of -d flag, don't kill the parent process
   Fix 'make install' when $(builddir) is different from $(srcdir).
   Fix dso resource leak in error path of dmeventd.
   Use C locales and use_mlockall for dmeventd.
--- LVM2/daemons/dmeventd/dmeventd.c	2010/03/30 14:40:30	1.57
+++ LVM2/daemons/dmeventd/dmeventd.c	2010/03/31 12:01:50	1.58
@@ -1737,7 +1737,8 @@
 		exit(EXIT_FIFO_FAILURE);
 
 	/* Signal parent, letting them know we are ready to go. */
-	kill(getppid(), SIGTERM);
+	if (!_debug)
+		kill(getppid(), SIGTERM);
 	syslog(LOG_NOTICE, "dmeventd ready for processing.");
 
 	while (!_exit_now) {


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-12-21 13:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-21 13:03 LVM2 ./WHATS_NEW daemons/dmeventd/dmeventd.c zkabelac
  -- strict thread matches above, loose matches on Subject: below --
2011-02-28 19:47 zkabelac
2010-12-20 14:08 zkabelac
2010-03-31 12:01 mpatocka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).