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: <dc8e51c6-6859-df73-feb1-98d38a4dfc67@acm.org>
Date:   Mon, 16 Aug 2021 20:14:09 -0700
From:   Bart Van Assche <bvanassche@....org>
To:     Christian Löhle <CLoehle@...erstone.com>,
        "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>
Subject: Re: [PATCH] scsi: sd: Do not exit sd_spinup_disk quietly

On 8/16/21 2:37 AM, Christian Löhle wrote:
> The sd_spinup_disk function logs what is happening nicely.
> Unfortunately this output stops if the media was marked removed
> in the meantime. To prevent a puzzling output, add a print
> for this case, too.
> 
> Signed-off-by: Christian Loehle <cloehle@...erstone.com>
> ---
>  drivers/scsi/sd.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index b8d55af763f9..7e556f5b57e0 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -2180,8 +2180,10 @@ sd_spinup_disk(struct scsi_disk *sdkp)
>  			 * doesn't have any media in it, don't bother
>  			 * with any more polling.
>  			 */
> -			if (media_not_present(sdkp, &sshdr))
> +			if (media_not_present(sdkp, &sshdr)) {
> +				sd_printk(KERN_NOTICE, sdkp, "Media removed, stopped polling\n");
>  				return;
> +			}
>  
>  			if (the_result)
>  				sense_valid = scsi_sense_valid(&sshdr);
> 

Reviewed-by: Bart Van Assche <bvanassche@....org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ