From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ananth N Mavinakayanahalli Date: Thu, 16 Dec 2004 04:55:07 +0000 Subject: Re: Bug#285281: core dump on amd64 (gcc-3.4) Message-Id: <20041216045312.GA8896@in.ibm.com> List-Id: References: <20041215085045.GA4444@wonderland.linux.it> In-Reply-To: <20041215085045.GA4444@wonderland.linux.it> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Wed, Dec 15, 2004 at 02:27:13PM +0100, Kay Sievers wrote: > On Wed, 2004-12-15 at 09:50 +0100, Marco d'Itri wrote: > > clsdev->directory is NULL, is this a bug in libsysfs or udev? > > Apparently this only happens on amd64. > > > > ----- Forwarded message from martin-deb@zero-based.org ----- > > > #0 0x0000000000403024 in sysfs_get_classdev_attr (clsdev=0x518260, name=0x40dcac "dev") at libsysfs/sysfs_class.c:643 > > 643 if (clsdev->directory->subdirs = NULL) > > (gdb) backtrace > > It is caused by the vc class behavior, to emit events on every open() > and close(). We get a lot of events on bootup for every vc device, cause > it is several times reopened. This causes the sysfs-dir to go away while > the device is opened in libsysfs. This simple test program: > > This seems to fix it: > > === libsysfs/sysfs_class.c 1.11 vs edited ==> --- 1.11/libsysfs/sysfs_class.c 2004-10-20 05:15:26 +02:00 > +++ edited/libsysfs/sysfs_class.c 2004-12-15 14:20:13 +01:00 > @@ -640,6 +640,9 @@ > return cur; > } > > + if (clsdev->directory = NULL) > + return NULL; > + > if (clsdev->directory->subdirs = NULL) > if ((sysfs_read_dir_subdirs(clsdev->directory)) != 0 || > clsdev->directory->subdirs = NULL) > Thanks for the patch Kay. I have applied this to my tree too. Thanks, Ananth ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ 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