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:   Thu, 9 Mar 2023 09:28:53 -0800
From:   Bart Van Assche <bvanassche@....org>
To:     Ziqi Chen <quic_ziqichen@...cinc.com>, quic_asutoshd@...cinc.com,
        quic_cang@...cinc.com, quic_nguyenb@...cinc.com, mani@...nel.org,
        stanley.chu@...iatek.com, adrian.hunter@...el.com,
        beanhuo@...ron.com, avri.altman@....com, junwoo80.lee@...sung.com,
        martin.petersen@...cle.com
Cc:     linux-scsi@...r.kernel.org, Alim Akhtar <alim.akhtar@...sung.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1] scsi: ufs: core: print trs for pending requests in MCQ
 mode

On 3/8/23 21:01, Ziqi Chen wrote:
> +static void ufshcd_print_trs_all(struct ufs_hba *hba, bool pr_prdt)
> +{
> +	const struct ufshcd_lrb *lrbp;
> +	int tag;
> +
> +	for (tag = 0; tag < hba->nutrs; tag++) {
> +		lrbp = &hba->lrb[tag];
> +
> +		if (lrbp->cmd)
> +			ufshcd_print_tr(hba, tag, pr_prdt);
>   	}
>   }

There is a race in this code: lrbp->cmd may be cleared after it has been 
read and before or while ufshcd_print_tr() is in progress. How about 
preventing that race by blk_mq_tagset_busy_iter() to iterate over 
pending SCSI commands?

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ