1. 25 1月, 2008 4 次提交
  2. 23 12月, 2007 1 次提交
    • G
      Modules: fix memory leak of module names · d172f4ef
      Greg Kroah-Hartman 提交于
      Due to the change in kobject name handling, the module kobject needs to
      have a null release function to ensure that the name it previously set
      will be properly cleaned up.
      
      All of this wierdness goes away in 2.6.25 with the rework of the kobject
      name and cleanup logic, but this is required for 2.6.24.
      
      Thanks to Alexey Dobriyan for finding the problem, and to Kay Sievers
      for pointing out the simple way to fix it after I tried many complex
      ways.
      
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      d172f4ef
  3. 15 11月, 2007 1 次提交
  4. 19 10月, 2007 1 次提交
    • D
      param_sysfs_builtin memchr argument fix · faf8c714
      Dave Young 提交于
      If memchr argument is longer than strlen(kp->name), there will be some
      weird result.
      
      It will casuse duplicate filenames in sysfs for the "nousb".  kernel
      warning messages are as bellow:
      
      sysfs: duplicate filename 'usbcore' can not be created
      WARNING: at fs/sysfs/dir.c:416 sysfs_add_one()
       [<c01c4750>] sysfs_add_one+0xa0/0xe0
       [<c01c4ab8>] create_dir+0x48/0xb0
       [<c01c4b69>] sysfs_create_dir+0x29/0x50
       [<c024e0fb>] create_dir+0x1b/0x50
       [<c024e3b6>] kobject_add+0x46/0x150
       [<c024e2da>] kobject_init+0x3a/0x80
       [<c053b880>] kernel_param_sysfs_setup+0x50/0xb0
       [<c053b9ce>] param_sysfs_builtin+0xee/0x130
       [<c053ba33>] param_sysfs_init+0x23/0x60
       [<c024d062>] __next_cpu+0x12/0x20
       [<c052aa30>] kernel_init+0x0/0xb0
       [<c052aa30>] kernel_init+0x0/0xb0
       [<c052a856>] do_initcalls+0x46/0x1e0
       [<c01bdb12>] create_proc_entry+0x52/0x90
       [<c0158d4c>] register_irq_proc+0x9c/0xc0
       [<c01bda94>] proc_mkdir_mode+0x34/0x50
       [<c052aa30>] kernel_init+0x0/0xb0
       [<c052aa92>] kernel_init+0x62/0xb0
       [<c0104f83>] kernel_thread_helper+0x7/0x14
       =======================
      kobject_add failed for usbcore with -EEXIST, don't try to register things with the same name in the same directory.
       [<c024e466>] kobject_add+0xf6/0x150
       [<c053b880>] kernel_param_sysfs_setup+0x50/0xb0
       [<c053b9ce>] param_sysfs_builtin+0xee/0x130
       [<c053ba33>] param_sysfs_init+0x23/0x60
       [<c024d062>] __next_cpu+0x12/0x20
       [<c052aa30>] kernel_init+0x0/0xb0
       [<c052aa30>] kernel_init+0x0/0xb0
       [<c052a856>] do_initcalls+0x46/0x1e0
       [<c01bdb12>] create_proc_entry+0x52/0x90
       [<c0158d4c>] register_irq_proc+0x9c/0xc0
       [<c01bda94>] proc_mkdir_mode+0x34/0x50
       [<c052aa30>] kernel_init+0x0/0xb0
       [<c052aa92>] kernel_init+0x62/0xb0
       [<c0104f83>] kernel_thread_helper+0x7/0x14
       =======================
      Module 'usbcore' failed to be added to sysfs, error number -17
      The system will be unstable now.
      Signed-off-by: NDave Young <hidave.darkstar@gmail.com>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      faf8c714
  5. 17 10月, 2007 1 次提交
  6. 31 7月, 2007 1 次提交
  7. 12 7月, 2007 1 次提交
    • T
      sysfs: kill unnecessary attribute->owner · 7b595756
      Tejun Heo 提交于
      sysfs is now completely out of driver/module lifetime game.  After
      deletion, a sysfs node doesn't access anything outside sysfs proper,
      so there's no reason to hold onto the attribute owners.  Note that
      often the wrong modules were accounted for as owners leading to
      accessing removed modules.
      
      This patch kills now unnecessary attribute->owner.  Note that with
      this change, userland holding a sysfs node does not prevent the
      backing module from being unloaded.
      
      For more info regarding lifetime rule cleanup, please read the
      following message.
      
        http://article.gmane.org/gmane.linux.kernel/510293
      
      (tweaked by Greg to not delete the field just yet, to make it easier to
      merge things properly.)
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7b595756
  8. 09 5月, 2007 1 次提交
  9. 03 5月, 2007 1 次提交
  10. 13 4月, 2007 1 次提交
  11. 24 2月, 2007 1 次提交
  12. 17 2月, 2007 2 次提交
  13. 08 2月, 2007 3 次提交
  14. 06 1月, 2007 1 次提交
  15. 30 9月, 2006 2 次提交
  16. 01 7月, 2006 1 次提交
  17. 29 3月, 2006 1 次提交
  18. 26 3月, 2006 1 次提交
  19. 21 3月, 2006 1 次提交
    • G
      [PATCH] fix module sysfs files reference counting · 03e88ae1
      Greg Kroah-Hartman 提交于
      The module files, refcnt, version, and srcversion did not properly
      increment the owner's module reference count, allowing the modules to
      be removed while the files were open, causing oopses.
      
      This patch fixes this, and also fixes the problem that the version and
      srcversion files were not showing up, unless CONFIG_MODULE_UNLOAD was
      enabled, which is not correct.
      
      Cc: Nathan Lynch <ntl@pobox.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      03e88ae1
  20. 21 12月, 2005 1 次提交
  21. 31 10月, 2005 1 次提交
    • T
      [PATCH] fix missing includes · 4e57b681
      Tim Schmielau 提交于
      I recently picked up my older work to remove unnecessary #includes of
      sched.h, starting from a patch by Dave Jones to not include sched.h
      from module.h. This reduces the number of indirect includes of sched.h
      by ~300. Another ~400 pointless direct includes can be removed after
      this disentangling (patch to follow later).
      However, quite a few indirect includes need to be fixed up for this.
      
      In order to feed the patches through -mm with as little disturbance as
      possible, I've split out the fixes I accumulated up to now (complete for
      i386 and x86_64, more archs to follow later) and post them before the real
      patch.  This way this large part of the patch is kept simple with only
      adding #includes, and all hunks are independent of each other.  So if any
      hunk rejects or gets in the way of other patches, just drop it.  My scripts
      will pick it up again in the next round.
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4e57b681
  22. 28 9月, 2005 1 次提交
  23. 08 9月, 2005 1 次提交
  24. 21 6月, 2005 1 次提交
  25. 17 4月, 2005 2 次提交
    • B
      [PATCH] kernel/param.c: don't use .max when .num is NULL in param_array_set() · 31143a12
      Bert Wesarg 提交于
      there seems to be a bug, at least for me, in kernel/param.c for arrays with
      .num == NULL.  If .num == NULL, the function param_array_set() uses &.max
      for the call to param_array(), wich alters the .max value to the number of
      arguments.  The result is, you can't set more array arguments as the last
      time you set the parameter.
      
      example:
      
      # a module 'example' with
      # static int array[10] = { 0, };
      # module_param_array(array, int, NULL, 0644);
      
      $ insmod example.ko array=1,2,3
      $ cat /sys/module/example/parameters/array
      1,2,3
      $ echo "4,3,2,1" > /sys/module/example/parameters/array
      $ dmesg | tail -n 1
      kernel: array: can take only 3 arguments
      Signed-off-by: NBert Wesarg <wesarg@informatik.uni-halle.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      31143a12
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4