All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takahiro Yasui <tyasui@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] lvm2: fix SIGSEGV of dmeventd
Date: Wed, 19 Aug 2009 11:22:16 -0400	[thread overview]
Message-ID: <4A8C18A8.7030307@redhat.com> (raw)

Hi,

Around July 16th, 2009, the prototype of logging function was changed and
dm_errno was added as the forth argument. However plugin functions stay
unchanged and dmeventd is killed by the signal (SIGSEGV). This patch adds
the argument, dm_errno, in the plugin functions.

-- 
Takahiro Yasui
Hitachi Computer Products (America), Inc.


Signed-off-by: Takahiro Yasui <tyasui@redhat.com>
---
 daemons/dmeventd/plugins/mirror/dmeventd_mirror.c     |    1 +
 daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c |    1 +
 tools/lvm2cmd.h                                       |    2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

Index: LVM2.02.52-20090818/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c
===================================================================
--- LVM2.02.52-20090818.orig/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c
+++ LVM2.02.52-20090818/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c
@@ -128,6 +128,7 @@ out_parse:
 
 static void _temporary_log_fn(int level, const char *file __attribute((unused)),
 			      int line __attribute((unused)),
+			      int dm_errno __attribute((unused)),
 			      const char *format)
 {
 	if (!strncmp(format, "WARNING: ", 9) && (level < 5))
Index: LVM2.02.52-20090818/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
===================================================================
--- LVM2.02.52-20090818.orig/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
+++ LVM2.02.52-20090818/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c
@@ -57,6 +57,7 @@ static pthread_mutex_t _event_mutex = PT
 static void _temporary_log_fn(int level,
 			      const char *file __attribute((unused)),
 			      int line __attribute((unused)),
+			      int dm_errno __attribute((unused)),
 			      const char *format)
 {
 	if (!strncmp(format, "WARNING: ", 9) && (level < 5))
Index: LVM2.02.52-20090818/tools/lvm2cmd.h
===================================================================
--- LVM2.02.52-20090818.orig/tools/lvm2cmd.h
+++ LVM2.02.52-20090818/tools/lvm2cmd.h
@@ -18,7 +18,7 @@
 
 #ifndef _LVM_LOG_H
 typedef void (*lvm2_log_fn_t) (int level, const char *file, int line,
-			       const char *message);
+			       int dm_errno, const char *message);
 #endif
 
 #define LVM2_LOG_SUPPRESS	0



                 reply	other threads:[~2009-08-19 15:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A8C18A8.7030307@redhat.com \
    --to=tyasui@redhat.com \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.