Nagendra Singh Tomar 017f2e37ae [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>
2007-02-02 19:45:41 -06:00
..
2006-12-07 08:39:25 -08:00
2006-12-07 08:39:25 -08:00
2007-01-06 09:05:18 -06:00
2007-01-27 09:15:46 -06:00
2006-01-01 22:21:50 +01:00
2006-09-12 17:12:31 -05:00
2006-09-12 17:12:31 -05:00
2006-11-22 14:57:56 +00:00
2006-11-22 12:06:44 -06:00
2006-06-30 19:25:36 +02:00
2006-08-06 15:59:26 -05:00
2006-11-15 16:41:27 -06:00
2006-08-06 15:59:26 -05:00
2006-11-10 09:59:49 +09:00
2006-09-12 17:12:31 -05:00
2006-11-22 14:57:56 +00:00
2006-12-07 08:39:24 -08:00
2006-11-22 12:22:29 -06:00
2006-09-23 15:33:43 -05:00
2007-01-03 16:57:38 -06:00
2006-06-25 10:00:58 -07:00
2006-12-05 10:25:35 -06:00
2006-12-05 10:25:35 -06:00
2006-09-12 17:12:31 -05:00
2006-11-30 05:24:39 +01:00
2006-11-22 14:57:56 +00:00
2006-11-22 14:57:56 +00:00
2006-11-22 14:57:56 +00:00
2006-12-19 08:33:11 +01:00
2006-08-06 15:59:26 -05:00
2006-12-07 08:39:25 -08:00
2007-01-03 16:57:38 -06:00
2006-03-23 07:38:09 -08:00
2006-06-29 11:06:30 -04:00
2006-12-05 11:33:58 -06:00
2006-11-15 16:43:50 -06:00
2006-10-25 15:12:03 -07:00