From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carl-Daniel Hailfinger Date: Tue, 23 Mar 2004 17:04:16 +0000 Subject: Re: libsysfs/udev hang Message-Id: <40606E10.8030800@gmx.net> List-Id: References: <4060259D.4000905@gmx.net> In-Reply-To: <4060259D.4000905@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org Greg KH wrote: > On Tue, Mar 23, 2004 at 12:55:09PM +0100, Carl-Daniel Hailfinger wrote: > >> sysfs_dev = sysfs_get_classdev_device(class_dev); >> if (sysfs_dev != NULL) >> printf("follow the class device's \"device\"\n"); >> >> /* look the device chain upwards */ >> while (sysfs_dev != NULL) { > > > > >> sysfs_dev_parent = sysfs_get_device_parent(sysfs_dev); >> printf("point4\n"); >> if (sysfs_dev_parent = NULL) >> break; >> printf("point5\n"); >> >> sysfs_dev = sysfs_dev_parent; >> printf("point6\n"); >> } >> printf("point7\n"); >> sysfs_close_device(sysfs_dev); > > > At this point in time, sysfs_dev will not point to the oritinal device > you got from the sysfs_get_glassdev_device() call, right? Right. > That's probably the bug. Then it has to be fixed in udevinfo.c:print_device_chain, too. Unfortunately this does not explain why the lockup vanishes once I compile with DEBUG=true. Added debugging should not change the behaviour of a library, right? Thanks, Carl-Daniel ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click _______________________________________________ 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