1. 07 1月, 2009 4 次提交
  2. 17 10月, 2008 3 次提交
    • E
      kobject: Fix kobject_rename and !CONFIG_SYSFS · 030c1d2b
      Eric W. Biederman 提交于
      When looking at kobject_rename I found two bugs with
      that exist when sysfs support is disabled in the kernel.
      
      kobject_rename does not change the name on the kobject when
      sysfs support is not compiled in.
      
      kobject_rename without locking attempts to check the
      validity of a rename operation, which the kobject layer
      simply does not have the infrastructure to do.
      
      This patch documents the previously unstated requirement of
      kobject_rename that is the responsibility of the caller to
      provide mutual exclusion and to be certain that the new_name
      for the kobject is valid.
      
      This patch modifies sysfs_rename_dir in !CONFIG_SYSFS case
      to call kobject_set_name to actually change the kobject_name.
      
      This patch removes the bogus and misleading check in kobject_rename
      that attempts to see if a rename is valid.  The check is bogus
      because we do not have the proper locking.  The check is misleading
      because it looks like we can and do perform checking at the kobject
      level that we don't.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      030c1d2b
    • C
      Driver core: Fix cleanup in device_create_vargs(). · 286661b3
      Cornelia Huck 提交于
      If device_register() in device_create_vargs() fails, the device
      must be cleaned up with put_device() (which is also fine on NULL)
      instead of kfree().
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      286661b3
    • C
      Driver core: Clarify device cleanup. · 5739411a
      Cornelia Huck 提交于
      Make the comments on how to use device_initialize(), device_add()
      and device_register() a bit clearer - in particular, explicitly
      note that put_device() must be used once we tried to add the device
      to the hierarchy.
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5739411a
  3. 09 10月, 2008 1 次提交
    • T
      driver-core: use klist for class device list and implement iterator · 5a3ceb86
      Tejun Heo 提交于
      Iterating over entries using callback usually isn't too fun especially
      when the entry being iterated over can't be manipulated freely.  This
      patch converts class->p->class_devices to klist and implements class
      device iterator so that the users can freely build their own control
      structure.  The users are also free to call back into class code
      without worrying about locking.
      
      class_for_each_device() and class_find_device() are converted to use
      the new iterators, so their users don't have to worry about locking
      anymore either.
      
      Note: This depends on klist-dont-iterate-over-deleted-entries patch
      because class_intf->add/remove_dev() depends on proper synchronization
      with device removal.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
      5a3ceb86
  4. 22 8月, 2008 3 次提交
  5. 27 7月, 2008 1 次提交
  6. 22 7月, 2008 11 次提交
  7. 12 6月, 2008 1 次提交
  8. 30 5月, 2008 1 次提交
  9. 21 5月, 2008 1 次提交
    • G
      Driver core: add device_create_vargs and device_create_drvdata · 8882b394
      Greg Kroah-Hartman 提交于
      We want to have the drvdata field set properly when creating the device
      as sysfs callbacks can assume it is present and it can race the later
      setting of this field.
      
      So, create two new functions, deviec_create_vargs() and
      device_create_drvdata() that take this new field.
      
      device_create_drvdata() will go away in 2.6.27 as the drvdata field will
      just be moved to the device_create() call as it should be.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8882b394
  10. 15 5月, 2008 1 次提交
  11. 27 4月, 2008 1 次提交
  12. 20 4月, 2008 4 次提交
  13. 19 4月, 2008 1 次提交
  14. 25 3月, 2008 1 次提交
  15. 05 3月, 2008 3 次提交
  16. 03 2月, 2008 2 次提交
  17. 28 1月, 2008 1 次提交
    • G
      Driver core: Fix up build when CONFIG_BLOCK=N · 4e886c29
      Greg Kroah-Hartman 提交于
      This fixes up the driver core build errors when CONFIG_BLOCK=N
      
      Thanks to Alexander van Heukelum <heukelum@mailshack.com> for the basis
      of this patch, and to Jeremy Fitzhardinge <jeremy@goop.org> for
      reporting the problem.
      
      
      Cc: Alexander van Heukelum <heukelum@mailshack.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4e886c29