1. 21 4月, 2011 1 次提交
  2. 31 3月, 2011 1 次提交
  3. 17 3月, 2011 1 次提交
  4. 07 1月, 2011 1 次提交
  5. 24 10月, 2010 5 次提交
    • M
      i7core_edac: don't use a freed mci struct · accf74ff
      Mauro Carvalho Chehab 提交于
      This is a nasty bug. Since kobject count will be reduced by zero by
      edac_mc_del_mc(), and this triggers the kobj release method, the
      mci memory will be freed automatically. So, all we have left is ctl_name,
      as shown by enabling debug:
      
      [   80.822186] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 1020: edac_remove_sysfs_mci_device()  remove_link
      [   80.832590] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 1024: edac_remove_sysfs_mci_device()  remove_mci_instance
      [   80.843776] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 640: edac_mci_control_release() mci instance idx=0 releasing
      [   80.855163] EDAC MC: Removed device 0 for i7core_edac.c i7 core #0: DEV 0000:3f:03.0
      [   80.862936] EDAC DEBUG: in drivers/edac/i7core_edac.c, line at 2089: (null): free structs
      [   80.871134] EDAC DEBUG: in drivers/edac/edac_mc.c, line at 238: edac_mc_free()
      [   80.878379] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 726: edac_mc_unregister_sysfs_main_kobj()
      [   80.888043] EDAC DEBUG: in drivers/edac/i7core_edac.c, line at 1232: drivers/edac/i7core_edac.c: i7core_put_devices()
      
      Also, kfree(mci) shouldn't happen at the kobj.release, as it happens
      when edac_remove_sysfs_mci_device() is called, but the logic is:
      	edac_remove_sysfs_mci_device(mci);
      	edac_printk(KERN_INFO, EDAC_MC,
      		"Removed device %d for %s %s: DEV %s\n", mci->mc_idx,
      		mci->mod_name, mci->ctl_name, edac_dev_name(mci));
      So, as the edac_printk() needs the mci struct, this generates an OOPS.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      accf74ff
    • M
      edac_core: Print debug messages at release calls · bbc560ae
      Mauro Carvalho Chehab 提交于
      This is important to track a nasty bug at the free logic.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      bbc560ae
    • M
      edac_core: Don't let free(mci) happen while using it · ac99768c
      Mauro Carvalho Chehab 提交于
      A very nasty bug were happening on edac core, due to the way mci objects are
      freed. mci memory is freed when kobject count reaches zero, by
      edac_mci_control_release(). However, from the logs, this is clearly happening
      before the final usage of mci struct:
      
      [15799.607454] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 640: edac_mci_control_release() mci instance idx=0 releasing
      [15799.618773] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 769: edac_inst_grp_release()
      [15799.627326] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 894: edac_remove_mci_instance_attributes() end of seeking for group all_channel_counts
      [15799.640887] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 877: edac_remove_mci_instance_attributes() sysfs_attrib = ffffffffa01d7240
      [15799.653412] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 1020: edac_remove_sysfs_mci_device()  remove_link
      [15799.663753] EDAC DEBUG: in drivers/edac/edac_mc_sysfs.c, line at 1024: edac_remove_sysfs_mci_device()  remove_mci_instance
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      ac99768c
    • M
      edac_core: Do a better job with node removal · 6fe1108f
      Mauro Carvalho Chehab 提交于
      Make sure we remove groups at the right order
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      6fe1108f
    • M
      i7core_edac: Properly mark const static vars as such · 1288c18f
      Mauro Carvalho Chehab 提交于
      There are two groups of sysfs attributes: one for rdimm and another
      for udimm. Instead of changing dynamically the unique static struct
      for handling udimm's, declare two vars and make them constant.
      
      This avoids the risk of having two or more memory controllers, each
      needing a different set of attributes.
      
      While here, use const on all places where it is applicable.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      
      edac_core: use const for constant sysfs arguments
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      1288c18f
  6. 21 10月, 2010 2 次提交
  7. 03 8月, 2010 1 次提交
    • B
      edac, mc: Improve scrub rate handling · eba042a8
      Borislav Petkov 提交于
      Fortify the interface to not accept negative values, remove
      memctrl_int_store() as a result. Also, sanitize bandwidth setting by
      making the argument a simple u32 instead of strange u32 pointer being
      passed around for no obvious reason. Then, fix error handling and teach
      it to return proper error values. Finally, make code more readable,
      simplify debug messages.
      
      Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
      Cc: Arthur Jones <ajones@riverbed.com>
      Signed-off-by: NBorislav Petkov <borislav.petkov@amd.com>
      Acked-by: NDoug Thompson <dougthompson@xmission.com>
      eba042a8
  8. 10 5月, 2010 4 次提交
  9. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  10. 08 3月, 2010 1 次提交
  11. 01 7月, 2009 1 次提交
  12. 26 7月, 2008 4 次提交
  13. 08 2月, 2008 1 次提交
  14. 25 1月, 2008 3 次提交
  15. 13 10月, 2007 1 次提交
  16. 27 7月, 2007 1 次提交
  17. 20 7月, 2007 11 次提交