[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080610213916.GC28572@ajones-laptop.nbttech.com>
Date: Tue, 10 Jun 2008 14:39:16 -0700
From: Arthur Jones <ajones@...erbed.com>
To: Doug Thompson <norsk5@...oo.com>
CC: Greg KH <greg@...ah.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"bluesmoke-devel@...ts.sourceforge.net"
<bluesmoke-devel@...ts.sourceforge.net>
Subject: Re: on static kobjects and double frees...
Hi Doug, ...
On Tue, Jun 10, 2008 at 02:14:30PM -0700, Doug Thompson wrote:
> [...]
> Arthur, thanks for tracking that down and reviewing it. All the memory controller kobjects are all
> dynamic. [...]
You're welcome, I learned a lot about kobjects
that I should have already known...
AFAICS, mc is not quite clean yet, though, as
mc_kset is static and I don't think that is right.
It does, however, look like less work than edac_pci_sysfs.c...
> [...] The edac PCI code needed to be refactored and it looks like you did it.
I only did the bare minimum, there's a lot of kobject
stuff in there that looks suspect to me, e.g.:
* the "pci" object should be a kset rather than a kobject?
* if the "pci" object is a kset, can the whole global list
thing in edac_pci just go away?
* do we really need the atomic_inc counter, wouldn't a mutex
be clearer?
* can we initialize "pci" at init time thereby removing the
need even for a mutex on the "pci" initializer? This does
change the sysfs semantics slightly, though, as the "pci"
object would no longer be created lazily. I'm not sure if
that's a problem.
and other minor things. It looks to me like it could
use a thorough scrubbing. The good news is that I don't
think the API would change much if at all. I can have a
closer look if you are interested...
Arthur
--
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