Skip to contentSkip to conversation

2.6.18.5 usb/sysfs bug.

DISCUSSION Chuck Ebbert 1 participant 1 message Dec 17, 2006

lore
Share & tools
lore
#0 lore raw

In-Reply-To: <[email protected]>

Quoted 5 lines · Dave Jones
Quoted 2 lines

That's strange. Remove_files called sysfs_hash_and_remove() with dir==0xfffffff3 (-13 decimal.)

Hmm, That's -EACCESS. Something not checking a return code at a lower level maybe ?

In fs/sysfs/group.c:

void sysfs_remove_group(struct kobject * kobj,
const struct attribute_group * grp)

{
        struct dentry * dir;

        if (grp->name)
                dir = lookup_one_len(grp->name, kobj->dentry,
                                strlen(grp->name));
        else
                dir = dget(kobj->dentry);

        remove_files(dir,grp);
        if (grp->name)
                sysfs_remove_subdir(dir);
        /* release the ref. taken in this routine */
        dput(dir);
}

'dir' is being used without checking whether lookup_one_len() succeeded.

Quoted 1 line

It's odd that something disconnects during boot, as nothing gets plugged.

Sometimes notebooks have USB devices built-in and they get treated as if they were hotplugged.

Signature · 1 line
MBTI: IXTP