1. 03 2月, 2007 1 次提交
    • N
      [SCSI] sd: udev accessing an uninitialized scsi_disk field results in a crash · 017f2e37
      Nagendra Singh Tomar 提交于
      	sd_probe() calls class_device_add() even before initializing the
      sdkp->device variable. class_device_add() eventually results in the user mode
      udev program to be called. udev program can read the the allow_restart
      attribute of the newly created scsi device. This is resulting in a crash as
      the show function for allow_restart (i.e sd_show_allow_restart) returns the
      attribute value by reading the sdkp->device->allow_restart variable. As the
      sdkp->device is not initialized before calling the user mode hotplug helper,
      this results in a crash.
      	The patch below solves it by calling class_device_add() only after the
      necessary fields in the scsi_disk structure are initialized properly.
      Signed-off-by: NNagendra Singh Tomar <nagendra_tomar@adaptec.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      017f2e37
  2. 27 1月, 2007 39 次提交