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: <fbbed055-fa60-cdee-589b-5d8c12672e94@gmail.com>
Date:   Sun, 12 Jun 2022 21:37:29 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...il.com>
To:     Li Qiong <liqiong@...china.com>,
        Sergey Shtylyov <s.shtylyov@....ru>,
        Damien Le Moal <damien.lemoal@...nsource.wdc.com>
Cc:     linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org,
        yuzhe@...china.com, renyu@...china.com
Subject: Re: [PATCH v2] ata: pata_pxa: handle failure of devm_ioremap()

On 6/12/22 3:57 PM, Li Qiong wrote:

> As the possible failure of the devm_ioremap(), the return value
> could be NULL. Therefore it should be better to check it and
> print error message, return '-ENOMEM' error code.
> 
> Signed-off-by: Li Qiong <liqiong@...china.com>
> Reviewed-by: Sergey Shtylyov <s.shtylyov@....ru>
> ---
> v2:
> - add driver's name (pata_pxa) to subject.
> ---
>  drivers/ata/pata_pxa.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/ata/pata_pxa.c b/drivers/ata/pata_pxa.c
> index 985f42c4fd70..cd1a8f37f920 100644
> --- a/drivers/ata/pata_pxa.c
> +++ b/drivers/ata/pata_pxa.c
> @@ -228,6 +228,11 @@ static int pxa_ata_probe(struct platform_device *pdev)
>  	ap->ioaddr.bmdma_addr	= devm_ioremap(&pdev->dev, dma_res->start,
>  						resource_size(dma_res));

   Looking again into this driver, this statement doesn't make sense: dma_res
points to a DMA resource, calling devm_ioremap() on it is just wrong... and
'ap->ioaddr.bmdma_addr' doesn;t seem to be used anyways...

MBR, Sergey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ