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] [day] [month] [year] [list]
Date:   Fri, 19 May 2023 15:20:39 -0700
From:   Bart Van Assche <bvanassche@....org>
To:     Kiwoong Kim <kwmad.kim@...sung.com>, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org, alim.akhtar@...sung.com,
        avri.altman@....com, jejb@...ux.ibm.com,
        martin.petersen@...cle.com, beanhuo@...ron.com,
        adrian.hunter@...el.com, sc.suh@...sung.com, hy50.seo@...sung.com,
        sh425.lee@...sung.com, kwangwon.min@...sung.com,
        junwoo80.lee@...sung.com
Subject: Re: [PATCH v3] ufs: poll pmc until another pa request is completed

On 5/15/23 20:52, Kiwoong Kim wrote:
> +		spin_lock_irqsave(hba->host->host_lock, flags);
> +		hba->active_uic_cmd = NULL;
> +		if (ufshcd_is_link_broken(hba)) {
> +			spin_unlock_irqrestore(hba->host->host_lock, flags);
> +			ret = -ENOLINK;
> +			goto out;
> +		}
> +		hba->uic_async_done = cnf;
> +		cmd->argument2 = 0;
> +		cmd->argument3 = mode;
> +		ret = __ufshcd_send_uic_cmd(hba, cmd, true);
> +		spin_unlock_irqrestore(hba->host->host_lock, flags);

Please consider adding 	lockdep_assert_held(&hba->uic_cmd_mutex) near
the start of __ufshcd_poll_uic_pwr() to document that this function is
serialized against other contexts that submit an UIC.

Additionally, I don't think that it is necessary to hold the host lock
around the ufshcd_is_link_broken() or __ufshcd_send_uic_cmd() calls.

Thanks,

Bart.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ