From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Buesch Date: Sat, 05 Feb 2005 14:47:21 +0000 Subject: [PATCH, UDEV] fix initialization of struct sigaction Message-Id: <200502051547.27583.mbuesch@freenet.de> MIME-Version: 1 Content-Type: multipart/mixed; boundary="nextPart4818848.NqLvIqDER3" List-Id: To: linux-hotplug@vger.kernel.org --nextPart4818848.NqLvIqDER3 Content-Type: multipart/mixed; boundary="Boundary-01=_5xNBC2XEcGdZdo4" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_5xNBC2XEcGdZdo4 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, This fixes the initialization of struct sigaction act; Valgrind complains about this as follows: =3D=3D4304=3D=3D Syscall param sigaction(act) contains uninitialised or una= ddressable byte(s) =3D=3D4304=3D=3D at 0x804A37B: (within /sbin/udevd) =3D=3D4304=3D=3D Address 0x52BFE7FC is on thread 1's stack =2D-=20 Regards Michael Buesch [ http://www.tuxsoft.de.vu ] =3D=3D=3D=3D=3D udevd.c 1.64 vs edited =3D=3D=3D=3D=3D =2D-- 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)); =20 /* set signal handlers */ + memset(&act, 0x00, sizeof(act)); act.sa_handler =3D (void (*) (int))sig_handler; sigemptyset(&act.sa_mask); act.sa_flags =3D SA_RESTART; --Boundary-01=_5xNBC2XEcGdZdo4 Content-Type: text/x-diff; charset="us-ascii"; name="udevd_sigaction_init_fix.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="udevd_sigaction_init_fix.diff" =3D=3D=3D=3D=3D udevd.c 1.64 vs edited =3D=3D=3D=3D=3D =2D-- 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)); =20 /* set signal handlers */ + memset(&act, 0x00, sizeof(act)); act.sa_handler =3D (void (*) (int))sig_handler; sigemptyset(&act.sa_mask); act.sa_flags =3D SA_RESTART; --Boundary-01=_5xNBC2XEcGdZdo4-- --nextPart4818848.NqLvIqDER3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQBCBNx/FGK1OIvVOP4RAn6yAKDR8rx/mhirAngBkXmh2vT1aTtgSgCgzqyN CiHkvaSGGh5cG3OoGmpvhzk= =uwfI -----END PGP SIGNATURE----- --nextPart4818848.NqLvIqDER3-- ------------------------------------------------------- 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