scsi: tcmu: check if dev is configured before block/reset
authorMike Christie <mchristi@redhat.com>
Mon, 23 Jul 2018 19:07:47 +0000 (14:07 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 31 Jul 2018 03:17:53 +0000 (23:17 -0400)
commita30b0473b62652f9b8ccb1e4f4a3a3c31d2b72b3
tree9a45302ea322125bb5109a0c390931c1019ee600
parent63d5be0f6a8053ba0c084dd6e2d5538e9376e7da
scsi: tcmu: check if dev is configured before block/reset

Do not allow userspace to block or reset the ring until the device has been
configured. This will prevent the bug where userspace can write to those
files and access mb_addr before it has been setup.

Signed-off-by: Mike Christie <mchristi@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_user.c