Re: [PATCH 08/24] hpsa: fix leak of ioremapped memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stephen M. Cameron wrote:
> From: Stephen M. Cameron <scameron@xxxxxxxxxxxxxxxxxx>
> 
> hpsa: fix leak of ioremapped memory
> in hpsa_pci_init error path.

If you had used devres to track your resources you got this for free.

> @@ -3474,6 +3477,12 @@ static int __devinit hpsa_pci_init(struct ctlr_info
> *h) return 0;
> 
>  err_out_free_res:
> +	if (h->transtable)
> +		iounmap(h->transtable);
> +	if (h->cfgtable)
> +		iounmap(h->cfgtable);
> +	if (h->vaddr)
> +		iounmap(h->vaddr);

I wonder if that shouldn't use pci_iomap() instead. Also the page aligning 
tricks in remap_pci_mem() look a bit dubious to me. If your pci BAR is >= 
PAGE_SIZE this isn't needed at all anyway since those mappings are aligned to 
at least their size in physical address space anyway and the logical address 
shouldn't matter for the driver.

Eike

Attachment: signature.asc
Description: This is a digitally signed message part.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux