From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: wait_for_syfs errors
Date: Sat, 23 Oct 2004 01:59:22 +0000 [thread overview]
Message-ID: <20041023015922.GA22720@vrfy.org> (raw)
In-Reply-To: <cdb29eb1041022131243fcee79@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]
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 <kay.sievers@vrfy.org> 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
[-- Attachment #2: wait-bad_event-01.patch --]
[-- Type: text/plain, Size: 626 bytes --]
===== 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) {
prev parent reply other threads:[~2004-10-23 1:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-22 20:12 wait_for_syfs errors Marcel Paulekuhn
2004-10-22 20:17 ` Kay Sievers
2004-10-22 20:22 ` Marcel Paulekuhn
2004-10-22 20:39 ` Kay Sievers
2004-10-22 23:23 ` Greg KH
2004-10-23 1:59 ` Kay Sievers [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041023015922.GA22720@vrfy.org \
--to=kay.sievers@vrfy.org \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).