summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx/ql4_init.c
diff options
context:
space:
mode:
authorNagendra Singh Tomar <nagendra_tomar@adaptec.com>2007-02-02 13:04:56 +0100
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-02-03 02:45:41 +0100
commit017f2e37ae19ccd28e5edd965741fc374194c5dd (patch)
tree10e7f93abebfc1797ccbb342f6ed38f072dd4092 /drivers/scsi/qla4xxx/ql4_init.c
parent[SCSI] st: A MTIOCTOP/MTWEOF within the early warning will cause the file num... (diff)
downloadlinux-017f2e37ae19ccd28e5edd965741fc374194c5dd.tar.xz
linux-017f2e37ae19ccd28e5edd965741fc374194c5dd.zip
[SCSI] sd: udev accessing an uninitialized scsi_disk field results in a crash
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: Nagendra Singh Tomar <nagendra_tomar@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_init.c')
0 files changed, 0 insertions, 0 deletions