Re: [PATCH] mvsas: always iounmap resources

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

 



On Fri, Jun 12, 2015 at 08:31:38AM +0200, Hannes Reinecke wrote:
> On 05/22/2015 11:15 AM, Johannes Thumshirn wrote:
> > In case pci_resource_start() or pci_resource_len() reutrn 0, mvsas_ioremap
> > returns without doing an iounmap() of mvi->regs_ex.
> > 
> > Found by the cocinelle tool.
> > 
> > Signed-off-by: Johannes Thumshirn <jthumshirn@xxxxxxx>
> > ---
> >  drivers/scsi/mvsas/mv_init.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
> > index 53030b0..04a3205 100644
> > --- a/drivers/scsi/mvsas/mv_init.c
> > +++ b/drivers/scsi/mvsas/mv_init.c
> > @@ -339,8 +339,11 @@ int mvs_ioremap(struct mvs_info *mvi, int bar, int bar_ex)
> >  
> >  	res_start = pci_resource_start(pdev, bar);
> >  	res_len = pci_resource_len(pdev, bar);
> > -	if (!res_start || !res_len)
> > +	if (!res_start || !res_len) {
> > +		iounmap(mvi->regs_ex);
> > +		mvi->regs_ex = NULL;
> >  		goto err_out;
> > +	}
> >  
> >  	res_flag = pci_resource_flags(pdev, bar);
> >  	if (res_flag & IORESOURCE_CACHEABLE)
> > 
> Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
> 

James, any update on this?
Do you intent to take it for 4.2?

Thank,
	Johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in



[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