1. 25 3月, 2009 2 次提交
  2. 29 1月, 2009 1 次提交
  3. 21 1月, 2009 1 次提交
    • R
      driver core: Convert '/' to '!' in dev_set_name() · 7143f7a1
      Roland Dreier 提交于
      Commit 3ada8b7e ("block: struct device - replace bus_id with dev_name(),
      dev_set_name()") deleted the code in register_disk() that changed a '/'
      to a '!' in the device name when registering a disk, but dev_set_name()
      does not perform this conversion.
      
      This leads to amusing problems with disks that have '/' in their names:
      for example a failure to boot with the root partition on a cciss device,
      even though the kernel says it knows about the root device:
      
          VFS: Cannot open root device "cciss/c0d0p6" or unknown-block(0,0)
          Please append a correct "root=" boot option; here are the available partitions:
          6800        71652960 cciss/c0d0 driver: cciss
            6802               1 cciss/c0d0p2
            6805         2931831 cciss/c0d0p5
            6806        34354908 cciss/c0d0p6
          6810        71652960 cciss/c0d1 driver: cciss
      
      Fix this by adding code to change '/' to '!' in dev_set_name() to handle
      this until dev_set_name() is converted to use kobject_set_name().
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      Acked-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      7143f7a1
  4. 10 1月, 2009 2 次提交
  5. 07 1月, 2009 5 次提交
  6. 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
  7. 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
  8. 22 8月, 2008 3 次提交
  9. 27 7月, 2008 1 次提交
  10. 22 7月, 2008 11 次提交
  11. 12 6月, 2008 1 次提交
  12. 30 5月, 2008 1 次提交
  13. 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
  14. 15 5月, 2008 1 次提交
  15. 27 4月, 2008 1 次提交
  16. 20 4月, 2008 4 次提交
  17. 19 4月, 2008 1 次提交