[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1219057124.21867.6.camel@lgn.site>
Date: Mon, 18 Aug 2008 12:58:44 +0200
From: Kay Sievers <kay.sievers@...y.org>
To: Rusty Russell <rusty@...tcorp.com.au>
Cc: Greg KH <greg@...ah.com>, Andi Kleen <andi@...stfloor.org>,
Randy Dunlap <randy.dunlap@...cle.com>,
Stephen Rothwell <sfr@...b.auug.org.au>,
linux-next@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
linux-acpi@...r.kernel.org
Subject: Re: linux-next: Tree for August 14 (sysfs/acpi errors)
On Mon, 2008-08-18 at 19:43 +1000, Rusty Russell wrote:
> On Monday 18 August 2008 13:48:51 Greg KH wrote:
> > On Sun, Aug 17, 2008 at 05:53:07AM +0200, Andi Kleen wrote:
> > > Greg KH <greg@...ah.com> writes:
> > > >> No!
> > > >
> > > > What you are doing here is wrong, trying to create two files with the
> > > > same name. You just should not be doing that at all, it's that simple.
> > > > Fix the broken code/link order, don't paper it over in the sysfs layer.
> > >
> > > Sorry, but relying on link order for anything is a mistake. It is subtle
> > > and fragile and just means it'll eventually break again because it's
> > > near impossible to properly maintain.
> >
> > We rely on link order for all sorts of things, this isn't new at all.
>
> Sure, but this code should be rewritten to check if the directory exists,
> rather assuming it based on "previous prefix was the same".
>
> It's relying on a horribly undocumented assumption, and it broke.
>
> We need to change kernel_param_sysfs_setup() to do something
> like "kobject_find(module_kset, name)" and only allocate a new mk if that
> fails.
kobj = kset_find_obj(module_kset, name) should return an existing object
with that name (and take a reference on it, which needs to be dropped).
Kay
--
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