lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8c87879b-ad28-e7bd-71ec-0c8a2ee99e7c@huawei.com>
Date:   Fri, 8 Oct 2021 13:00:25 +0100
From:   John Garry <john.garry@...wei.com>
To:     Dexuan Cui <decui@...rosoft.com>, <kys@...rosoft.com>,
        <sthemmin@...rosoft.com>, <wei.liu@...nel.org>,
        <jejb@...ux.ibm.com>, <martin.petersen@...cle.com>,
        <haiyangz@...rosoft.com>, <ming.lei@...hat.com>,
        <bvanassche@....org>, <linux-scsi@...r.kernel.org>,
        <linux-hyperv@...r.kernel.org>, <longli@...rosoft.com>,
        <mikelley@...rosoft.com>
CC:     <linux-kernel@...r.kernel.org>, <stable@...r.kernel.org>
Subject: Re: [PATCH v3] scsi: core: Fix shost->cmd_per_lun calculation in
 scsi_add_host_with_dma()

On 08/10/2021 05:35, Dexuan Cui wrote:
> After commit ea2f0f77538c, a 416-CPU VM running on Hyper-V hangs during
> boot because the hv_storvsc driver sets scsi_driver.can_queue to an "int"
> value that exceeds SHRT_MAX, and hence scsi_add_host_with_dma() sets
> shost->cmd_per_lun to a negative "short" value.
> 
> Use min_t(int, ...) to fix the issue.
> 
> Fixes: ea2f0f77538c ("scsi: core: Cap scsi_host cmd_per_lun at can_queue")
> Cc:stable@...r.kernel.org
> Signed-off-by: Dexuan Cui<decui@...rosoft.com>
> Reviewed-by: Haiyang Zhang<haiyangz@...rosoft.com>
> Reviewed-by: Ming Lei<ming.lei@...hat.com>

Reviewed-by: John Garry <john.garry@...wei.com>

thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ