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]
Date:   Tue, 28 Mar 2023 10:56:33 -0500
From:   Mike Christie <michael.christie@...cle.com>
To:     Ye Bin <yebin@...weicloud.com>, jejb@...ux.ibm.com,
        martin.petersen@...cle.com, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     Ye Bin <yebin10@...wei.com>
Subject: Re: [PATCH v2 3/3] scsi: blocking IO when host is set blocked

On 3/28/23 9:34 AM, Ye Bin wrote:
> From: Ye Bin <yebin10@...wei.com>
> 
> As previous patch introduce 'blocked' sysfs api to set 'host_blockio'.
> If 'host_blockio' is true will blocking IO.
> 
> Signed-off-by: Ye Bin <yebin10@...wei.com>
> ---
>  drivers/scsi/scsi_lib.c  | 2 ++
>  include/scsi/scsi_host.h | 5 +++++
>  2 files changed, 7 insertions(+)
> 
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index b7c569a42aa4..20d618300a46 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -1724,6 +1724,8 @@ static blk_status_t scsi_queue_rq(struct blk_mq_hw_ctx *hctx,
>  	}
>  
>  	ret = BLK_STS_RESOURCE;
> +	if (unlikely(scsi_host_blocked(shost)))
> +		goto out_put_budget;

You can just put this check in scsi_host_queue_ready with the
host_self_blocked check.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ