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

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

 



On Fri, May 28, 2010 at 09:12:17PM +0200, Rolf Eike Beer wrote:
> 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.
> 

Thanks, I was unaware of devres.  I'll look into it.

> > @@ -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.

Ok, I'll look into these as well.

> 
> Eike


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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