1. 04 Nov, 2004 5 commits
    • Tejun Heo's avatar
      [PATCH] driver-model: kobject_add() error path reference counting fix · 0a0250bb
      Tejun Heo authored
       df_04_kobject_add_ref_fix.patch
      
      In kobject_add(), @kobj wasn't put'd properly on error path.  This
      patch fixes it.
      Signed-off-by: default avatarTejun Heo <tj@home-tj.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      0a0250bb
    • Tejun Heo's avatar
      [PATCH] driver-model: sysfs_release() dangling pointer reference fix · 9522144b
      Tejun Heo authored
       df_03_sysfs_release_fix.patch
      
      Some attributes are allocated dynamically (e.g. module and device
      parameters) and are usually deallocated when the assoicated kobject is
      released.  So, it's not safe to access attr after putting the kobject.
      Signed-off-by: default avatarTejun Heo <tj@home-tj.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      9522144b
    • Tejun Heo's avatar
      [PATCH] driver-model: bus_recan_devices() locking fix · fa39fa6b
      Tejun Heo authored
       df_02_bus_rescan_devcies_fix.patch
      
       bus_rescan_devices() eventually calls device_attach() and thus
      requires write locking the corresponding bus.  The original code just
      called bus_for_each_dev() which only read locks the bus.  This patch
      separates __bus_for_each_dev() and __bus_for_each_drv(), which don't
      do locking themselves, out from the original functions and call them
      with read lock in the original functions and with write lock in
      bus_rescan_devices().
      Signed-off-by: default avatarTejun Heo <tj@home-tj.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      fa39fa6b
    • Tejun Heo's avatar
      [PATCH] driver-model: comment fix in bus.c · ddd55a74
      Tejun Heo authored
       df_01_driver_attach_comment_fix.patch
      
      bus_match() was renamed to driver_probe_device() but the comment for
      device_attach() wasn't updated.  This patch updates it.
      Signed-off-by: default avatarTejun Heo <tj@home-tj.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      ddd55a74
    • Kay Sievers's avatar
      [PATCH] add the physical device and the bus to the hotplug environment · 8f2a5465
      Kay Sievers authored
      Add the sysfs path of the physical device to the hotplug event of class
      and block devices. This should solve the userspace issue not to know if
      the device is a virtual one and the "device" symlink will never be created,
      but we sit there and wait for it to show up not knowing when we should
      give up.
      
      Also the bus name is added to the hotplug event, so we don't need to
      reverse lookup in the /sys/bus/* directory which bus our physical
      device belongs to. This is e.g. the value matched against the BUS= key,
      that may be used in an udev rule.
      
      This is a PCI network card:
        ACTION=add
        SUBSYSTEM=net
        DEVPATH=/class/net/eth0
        PHYSDEVPATH=/devices/pci0000:00/0000:00:1e.0/0000:02:01.0
        PHYSDEVBUS=pci
        INTERFACE=eth0
        SEQNUM=827
        PATH=/sbin:/bin:/usr/sbin:/usr/bin
        HOME=/
      
      This is a IDE CDROM:
        ACTION=add
        SUBSYSTEM=block
        DEVPATH=/block/hdc
        PHYSDEVPATH=/devices/pci0000:00/0000:00:1f.1/ide1/1.0
        PHYSDEVBUS=ide
        SEQNUM=1017
        PATH=/sbin:/bin:/usr/sbin:/usr/bin
        HOME=/
      
      This is an USB-stick partition:
        ACTION=add
        SUBSYSTEM=block
        DEVPATH=/block/sda/sda1
        PHYSDEVPATH=/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/host1/target1:0:0/1:0:0:0
        PHYSDEVBUS=scsi
        SEQNUM=1032
        PATH=/sbin:/bin:/usr/sbin:/usr/bin
        HOME=/
      Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
      8f2a5465
  2. 03 Nov, 2004 2 commits
  3. 02 Nov, 2004 33 commits