linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH, UDEV] fix initialization of struct sigaction
@ 2005-02-05 14:47 Michael Buesch
  2005-02-05 15:23 ` Kay Sievers
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Buesch @ 2005-02-05 14:47 UTC (permalink / raw)
  To: linux-hotplug


[-- Attachment #1.1: Type: text/plain, Size: 747 bytes --]

Hi,

This fixes the initialization of
struct sigaction act;
Valgrind complains about this as follows:

==4304== Syscall param sigaction(act) contains uninitialised or unaddressable byte(s)
==4304==    at 0x804A37B: (within /sbin/udevd)
==4304==  Address 0x52BFE7FC is on thread 1's stack

-- 
Regards Michael Buesch  [ http://www.tuxsoft.de.vu ]


===== udevd.c 1.64 vs edited =====
--- 1.64/udevd.c	2005-01-16 16:53:07 +01:00
+++ edited/udevd.c	2005-02-05 15:42:39 +01:00
@@ -690,6 +690,7 @@
 		dbg("error fcntl on write pipe: %s", strerror(errno));
 
 	/* set signal handlers */
+	memset(&act, 0x00, sizeof(act));
 	act.sa_handler = (void (*) (int))sig_handler;
 	sigemptyset(&act.sa_mask);
 	act.sa_flags = SA_RESTART;

[-- Attachment #1.2: udevd_sigaction_init_fix.diff --]
[-- Type: text/x-diff, Size: 385 bytes --]

===== udevd.c 1.64 vs edited =====
--- 1.64/udevd.c	2005-01-16 16:53:07 +01:00
+++ edited/udevd.c	2005-02-05 15:42:39 +01:00
@@ -690,6 +690,7 @@
 		dbg("error fcntl on write pipe: %s", strerror(errno));
 
 	/* set signal handlers */
+	memset(&act, 0x00, sizeof(act));
 	act.sa_handler = (void (*) (int))sig_handler;
 	sigemptyset(&act.sa_mask);
 	act.sa_flags = SA_RESTART;

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [PATCH, UDEV] fix initialization of struct sigaction
  2005-02-05 14:47 [PATCH, UDEV] fix initialization of struct sigaction Michael Buesch
@ 2005-02-05 15:23 ` Kay Sievers
  0 siblings, 0 replies; 2+ messages in thread
From: Kay Sievers @ 2005-02-05 15:23 UTC (permalink / raw)
  To: linux-hotplug

On Sat, 2005-02-05 at 15:47 +0100, Michael Buesch wrote:
> This fixes the initialization of
> struct sigaction act;
> Valgrind complains about this as follows:
> 
> =4304= Syscall param sigaction(act) contains uninitialised or unaddressable byte(s)
> =4304=    at 0x804A37B: (within /sbin/udevd)
> =4304=  Address 0x52BFE7FC is on thread 1's stack

Applied.

Thanks,
Kay



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

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

end of thread, other threads:[~2005-02-05 15:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-05 14:47 [PATCH, UDEV] fix initialization of struct sigaction Michael Buesch
2005-02-05 15:23 ` Kay Sievers

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 NNTP newsgroup(s).