scsi: scsi_debug: num_tgts must be >= 0
authorMaurizio Lombardi <mlombard@redhat.com>
Fri, 15 Nov 2019 16:37:27 +0000 (17:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 Jan 2020 18:18:15 +0000 (19:18 +0100)
commit9d411fa766a87315ceecd2a098531e0e322835a1
tree69c73fc74c40d5758a884dd1c74babe1c2a167d6
parent17e6ff3d46add0e8618d0791dbd2adddc8b09b65
scsi: scsi_debug: num_tgts must be >= 0

[ Upstream commit aa5334c4f3014940f11bf876e919c956abef4089 ]

Passing the parameter "num_tgts=-1" will start an infinite loop that
exhausts the system memory

Link: https://lore.kernel.org/r/20191115163727.24626-1-mlombard@redhat.com
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/scsi_debug.c