Re: [Resend PATCH] SCSI: scan: fix use-after-free

2016-10-11 Thread Martin K. Petersen
> "Ming" == Ming Lei writes: Ming> This patch fixes one use-after-free report[1] by KASAN. In Ming> __scsi_scan_target(), when a type 31 device is probed, Ming> SCSI_SCAN_TARGET_PRESENT is returned and the target will be Ming> scanned again. Applied to 4.9/scsi-fixes. -- Martin K. Peterse

Re: [Resend PATCH] SCSI: scan: fix use-after-free

2016-10-09 Thread Christoph Hellwig
Looks fine: Reviewed-by: Christoph Hellwig

[Resend PATCH] SCSI: scan: fix use-after-free

2016-10-08 Thread Ming Lei
This patch fixes one use-after-free report[1] by KASAN. In __scsi_scan_target(), when a type 31 device is probed, SCSI_SCAN_TARGET_PRESENT is returned and the target will be scanned again. Inside the following scsi_report_lun_scan(), one new scsi_device instance is allocated, and scsi_probe_and_a