[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <563011b8-52cd-3bae-a6f6-4611ab5863da@omp.ru>
Date: Wed, 29 Sep 2021 17:40:07 +0300
From: Sergey Shtylyov <s.shtylyov@....ru>
To: Guo Zhi <qtxuning1999@...u.edu.cn>,
Damien Le Moal <damien.lemoal@...nsource.wdc.com>
CC: <linux-ide@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drivers/ata: Fix kernel pointer leak
On 29.09.2021 15:16, Guo Zhi wrote:
I'd recommend the subject prefix to be just "pata_atp867x: "...
> Pointers should be printed with %p or %px rather than cast to
> 'unsigned long' and pinted with %lx
Printed.
> Change %lx to %p to print the secured pointer.
>
> Signed-off-by: Guo Zhi <qtxuning1999@...u.edu.cn>
> ---
> drivers/ata/pata_atp867x.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/ata/pata_atp867x.c b/drivers/ata/pata_atp867x.c
> index 2bc5fc81efe3..c32b95f48e50 100644
> --- a/drivers/ata/pata_atp867x.c
> +++ b/drivers/ata/pata_atp867x.c
> @@ -447,11 +447,11 @@ static int atp867x_ata_pci_sff_init_host(struct ata_host *host)
> #ifdef ATP867X_DEBUG
> atp867x_check_ports(ap, i);
> #endif
> - ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx",
> - (unsigned long)ioaddr->cmd_addr,
> - (unsigned long)ioaddr->ctl_addr);
> - ata_port_desc(ap, "bmdma 0x%lx",
> - (unsigned long)ioaddr->bmdma_addr);
> + ata_port_desc(ap, "cmd 0x%p ctl 0x%p",
> + ioaddr->cmd_addr,
This line shouldn't be broken up, it's not long at all.
> + ioaddr->ctl_addr);
> + ata_port_desc(ap, "bmdma 0x%p",
> + ioaddr->bmdma_addr);
Hmm, I've looked at the driver and got an imperession it only uses the I/O
ports, not MMIO...
[...]
MBR, Sergey
Powered by blists - more mailing lists