* It seems kobject_put for mci->edac_mci_kobj were called more than kobject_get
@ 2010-02-25 3:06 jason.yqhu
0 siblings, 0 replies; only message in thread
From: jason.yqhu @ 2010-02-25 3:06 UTC (permalink / raw)
To: bluesmoke-devel
Hi,
It seems that mci->edac_mci_kobj is put more that expected.
A typical call sequence to add a mc device is :
1. call edac_mc_alloc
mci->edac_mci_kobj was initialized by calling edac_mc_register_sysfs_main_kobj
2. ...
3. edac_mc_add_mc:
added to global list, but no reference count operation for mci->edac_mci_kobj
And to remove a mc device
1. call edac_mc_del_mc
edac_remove_sysfs_mci_device(mci) was called:
/* unregister this instance's kobject */
kobject_put(&mci->edac_mci_kobj);
We can see from the log here that mci is freed.
2. edac_mc_free:
edac_mc_unregister_sysfs_main_kobj(mci) was called:
/* delete the kobj from the mc_kset */
kobject_put(&mci->edac_mci_kobj)
Since mci has been freed. This operation will do nothing if mci is not
reused by others, other wise, a panic occurs.
And sometimes if mci is used after it is freed, there will be strange
debug message output:
EDAC DEBUG: edac_mc_del_mc()
EDAC DEBUG: edac_mc_workq_teardown() mci-0
EDAC DEBUG: edac_remove_sysfs_mci_device()
EDAC DEBUG: edac_remove_sysfs_mci_device() unreg csrow-0
EDAC DEBUG: edac_csrow_instance_release()
EDAC DEBUG: edac_remove_sysfs_mci_device() remove_link
EDAC DEBUG: edac_remove_sysfs_mci_device() remove_mci_instance
EDAC DEBUG: edac_remove_sysfs_mci_device() unregister this mci kobj
EDAC DEBUG: edac_mci_control_release() mci instance idx=0 releasing
EDAC MC: Removed device 0 for <NULL> <NULL>: DEV <NULL>
EDAC DEBUG: edac_mc_del_mc() mc_devices list is now EMPTY
Could some one help me confirm this ?
Thanks
Jason
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-02-25 3:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-25 3:06 It seems kobject_put for mci->edac_mci_kobj were called more than kobject_get jason.yqhu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).