From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Sat, 23 Oct 2004 01:59:22 +0000 Subject: Re: wait_for_syfs errors Message-Id: <20041023015922.GA22720@vrfy.org> MIME-Version: 1 Content-Type: multipart/mixed; boundary="3MwIy2ne0vdjdPXF" List-Id: References: In-Reply-To: To: linux-hotplug@vger.kernel.org --3MwIy2ne0vdjdPXF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Oct 22, 2004 at 04:23:52PM -0700, Greg KH wrote: > On Fri, Oct 22, 2004 at 10:39:07PM +0200, Kay Sievers wrote: > > On Fri, Oct 22, 2004 at 10:22:29PM +0200, Marcel Paulekuhn wrote: > > > Hm yeah, I am, 2.6.9-mm1. > > > > > > So there's no other way to fix this than changing kernel? Because I > > > want to keep reiser4-support. > > > > > > > > > On Fri, 22 Oct 2004 22:17:46 +0200, Kay Sievers wrote: > > > > > > > > You are running a -mm kernel, right? There is a bug in there, that > > > > causes this. > > > > The message is not critical. It just means, that you get (useless) hotplug > > events for the class itself which should not happen. This will hopefully > > fixed soon in the -mm tree and will go away. > > Actually I just commited that change to the main kernel tree, so we need > to fix this up in wait_for_sysfs before we start to get a lot of people > complaining :) Ok, here is the fix. Bad events with no device in the class are now ignored. Thanks, Kay --3MwIy2ne0vdjdPXF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="wait-bad_event-01.patch" ===== wait_for_sysfs.c 1.27 vs edited ===== --- 1.27/wait_for_sysfs.c 2004-10-19 03:50:52 +02:00 +++ edited/wait_for_sysfs.c 2004-10-23 03:57:33 +02:00 @@ -99,6 +99,12 @@ snprintf(filename, SYSFS_PATH_MAX-1, "%s%s", sysfs_mnt_path, devpath); filename[SYSFS_PATH_MAX-1] = '\0'; + /* skip bad events where we get no device for the class */ + if (strncmp(devpath, "/class/", 7) == 0 && strchr(&devpath[7], '/') == NULL) { + dbg("no device name for '%s', bad event", devpath); + goto exit; + } + /* open the class device we are called for */ class_dev = open_class_device_wait(filename); if (!class_dev) { --3MwIy2ne0vdjdPXF-- ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ 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