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 12:41:00 +0000 (13:41 +0100)
commitcda09f74dd19281b12237de293ab36a72f0b5b15
tree1acfd51041a64c4dcd57cfb3faff7b153911d548
parentbc07cb62c2dfbd79c8886db56bd751d091f20657
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