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]
Message-ID: <47bca068-9bc2-73c7-dfa4-ddd5ce78618c@gmail.com>
Date:   Sat, 5 Mar 2022 16:38:07 +0800
From:   Jia-Ju Bai <baijiaju1990@...il.com>
To:     Michael Tretter <m.tretter@...gutronix.de>
Cc:     vkoul@...nel.org, michal.simek@...inx.com, yukuai3@...wei.com,
        lars@...afoo.de, libaokun1@...wei.com, dmaengine@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        kernel@...gutronix.de
Subject: Re: [PATCH] dma: xilinx: check the return value of dma_set_mask() in
 zynqmp_dma_probe()



On 2022/3/4 16:20, Michael Tretter wrote:
> On Wed, 02 Mar 2022 18:43:34 -0800, Jia-Ju Bai wrote:
>> The function dma_set_mask() in zynqmp_dma_probe() can fail, so its
>> return value should be checked.
>>
>> Fixes: b0cc417c1637 ("dmaengine: Add Xilinx zynqmp dma engine driver support")
>> Reported-by: TOTE Robot <oslab@...nghua.edu.cn>
>> Signed-off-by: Jia-Ju Bai <baijiaju1990@...il.com>
>> ---
>>   drivers/dma/xilinx/zynqmp_dma.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/dma/xilinx/zynqmp_dma.c b/drivers/dma/xilinx/zynqmp_dma.c
>> index 7aa63b652027..963fb1de93af 100644
>> --- a/drivers/dma/xilinx/zynqmp_dma.c
>> +++ b/drivers/dma/xilinx/zynqmp_dma.c
>> @@ -1050,7 +1050,8 @@ static int zynqmp_dma_probe(struct platform_device *pdev)
>>   	zdev->dev = &pdev->dev;
>>   	INIT_LIST_HEAD(&zdev->common.channels);
>>   
>> -	dma_set_mask(&pdev->dev, DMA_BIT_MASK(44));
>> +	if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(44)))
>> +		return -EIO;
> Thanks.
>
> You may print an error message with dev_err_probe and forward the return value
> of dma_set_mask.

Hi Michael,

Thanks for the advice.
I will send a V2 patch.


Best wishes,
Jia-Ju Bai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ