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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <VE1PR04MB663853E48FC2DA385134C66A89810@VE1PR04MB6638.eurprd04.prod.outlook.com>
Date:   Fri, 12 Jun 2020 02:25:23 +0000
From:   Robin Gong <yibin.gong@....com>
To:     Krzysztof Kozlowski <krzk@...nel.org>,
        Vinod Koul <vkoul@...nel.org>,
        Dan Williams <dan.j.williams@...el.com>,
        Peng Ma <peng.ma@....com>, Fabio Estevam <festevam@...il.com>,
        "dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 1/2] dmaengine: fsl-edma: Add lockdep assert for exported
 function

On 2020/06/11 20:18 Krzysztof Kozlowski <krzk@...nel.org> wrote:
> Add lockdep assert for an exported function expected to be called under spin
> lock.  Since this function is called in different modules, the lockdep assert will
> be self-documenting note about need for locking.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@...nel.org>
Reviewed-by: Robin Gong <yibin.gong@....com> 
> ---
>  drivers/dma/fsl-edma-common.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/dma/fsl-edma-common.c
> b/drivers/dma/fsl-edma-common.c index 5697c3622699..4550818cca4a
> 100644
> --- a/drivers/dma/fsl-edma-common.c
> +++ b/drivers/dma/fsl-edma-common.c
> @@ -589,6 +589,8 @@ void fsl_edma_xfer_desc(struct fsl_edma_chan
> *fsl_chan)  {
>  	struct virt_dma_desc *vdesc;
> 
> +	lockdep_assert_held(&fsl_chan->vchan.lock);
> +
>  	vdesc = vchan_next_desc(&fsl_chan->vchan);
>  	if (!vdesc)
>  		return;
> --
> 2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ