On Thu, Mar 16, 2006 at 01:27:34PM +0100, Oliver Neukum wrote:
> Am Donnerstag, 16. M?rz 2006 00:45 schrieb Greg KH:
> > On Wed, Mar 15, 2006 at 05:18:10PM -0600, Paul Fulghum wrote:
> > > On Wed, 2006-03-15 at 14:53 -0800, Greg KH wrote:
> > > 
> > > > Ok, this is the problem right here.  Now, how has this ever worked in
> > > > the past?  Why don't cdc-acm devices with the other configuration not
> > > > also cause this issue?
> > > 
> > > Most people don't run with slab debug turned on.
> > 
> > SuSE has been shipping kernels with that on for the past month or so
> > with their beta releases.  So has Fedora.  And a number of us developers
> > always run with that :)
> > 
> > > Most people don't unplug the device during an active session.
> > 
> > More people than I would like do that...
> > 
> > Anyway, hopefully the patch should fix the issue.
> 
> While we are at it, isn't this from sysfs_add_link() missing a put in the
> error path?
> 
>       error = sysfs_make_dirent(parent_sd, NULL, sl, S_IFLNK|S_IRWXUGO,
>                               SYSFS_KOBJ_LINK);
>       if (!error)
>               return 0;
> 
>       kfree(sl->link_name);
> exit2:
>       kfree(sl);
> exit1:
>       return error;

I think you're right.  It only looks like this would ever happen if we
ran out of memory, but the patch below should fix this properly.

Maneesh, any objection to this, or the other sysfs patch I cc:ed you on?

thanks,

greg k-h

---
 fs/sysfs/symlink.c |    1 +
 1 file changed, 1 insertion(+)

--- gregkh-2.6.orig/fs/sysfs/symlink.c
+++ gregkh-2.6/fs/sysfs/symlink.c
@@ -66,6 +66,7 @@ static int sysfs_add_link(struct dentry 
        if (!error)
                return 0;
 
+       kobject_put(target);
        kfree(sl->link_name);
 exit2:
        kfree(sl);


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to