lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 22 Oct 2007 20:28:36 -0700
From:	Greg KH <greg@...ah.com>
To:	Michael Ellerman <michael@...erman.id.au>
Cc:	linuxppc-dev@...abs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Allow sysfs_remove_group() to be called on non-added
	groups

On Tue, Oct 23, 2007 at 12:02:39PM +1000, Michael Ellerman wrote:
> On 9/13/07, Michael Ellerman <michael@...erman.id.au> wrote:
> > It would be nice to be able to do:
> >
> > for_each_thing(thing) {
> >         error = sysfs_create_group(&thing->kobj, attrs);
> >         if (error) {
> >                 for_each_thing(thing)
> >                         sysfs_remove_group(&thing->kobj, attrs);
> >                 return error;
> >         }
> > }
> >
> > But there's a BUG_ON() in sysfs_remove_group() which hits if the attributes
> > were never added.
> >
> > As discussed here ...
> > http://ozlabs.org/pipermail/cbe-oss-dev/2007-July/002774.html
> >
> > .. we should just return in that case instead of BUG'ing.
> >
> > Signed-off-by: Michael Ellerman <michael@...erman.id.au>
> > ---
> >  fs/sysfs/group.c |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c
> > index f318b73..a256775 100644
> > --- a/fs/sysfs/group.c
> > +++ b/fs/sysfs/group.c
> > @@ -73,7 +73,8 @@ void sysfs_remove_group(struct kobject * kobj,
> >
> >         if (grp->name) {
> >                 sd = sysfs_get_dirent(dir_sd, grp->name);
> > -               BUG_ON(!sd);
> > +               if (!sd)
> > +                       return;
> >         } else
> >                 sd = sysfs_get(dir_sd);
> >
> >
> 
> Hi Greg,
> 
> I didn't see this in your series, any objections? AFAICT it still applies.

Hm, I think I just missed it, care to forward it to me "clean" again?

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ