Re: [PATCH] avoid releasing twice the same region on ide_release_iomio_dma()

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

 



Hello.

Aristeu Sergio Rozanski Filho wrote:

In ide_release_iomio_dma() it's possible to release twice
hwif->dma_base if hwif->dma_base2 is not null and never releasing
hwif->dma_base2:
int ide_release_iomio_dma (ide_hwif_t *hwif)
{
        if ((hwif->dma_extra) && (hwif->channel == 0))
                release_region((hwif->dma_base + 16), hwif->dma_extra);
        release_region(hwif->dma_base, 8);
        if (hwif->dma_base2)
                release_region(hwif->dma_base, 8);
                                     ^^^^^^^^^
        return 1;
}
This patch fixes this typo.

Signed-off-by: Aristeu S. Rozanski F. <aris@xxxxxxxxxxxxxxxxx>

Index: ppc-2.6/drivers/ide/ide-dma.c
===================================================================
--- ppc-2.6.orig/drivers/ide/ide-dma.c	2006-07-24 12:25:20.000000000 -0300
+++ ppc-2.6/drivers/ide/ide-dma.c	2006-07-24 12:26:26.000000000 -0300
@@ -802,7 +802,7 @@
 		release_region((hwif->dma_base + 16), hwif->dma_extra);
 	release_region(hwif->dma_base, 8);
 	if (hwif->dma_base2)
-		release_region(hwif->dma_base, 8);
+		release_region(hwif->dma_base2, 8);
 	return 1;
 }

   dma_base2 should go away altogether -- this is the IDE maintainer's opinion:

http://marc.theaimsgroup.com/?l=linux-ide&m=114345699807546&w=2

   I have posted this patch doing this back in March:

http://marc.theaimsgroup.com/?l=linux-ide&m=114357441529834&w=2

and it was in the -mm tree for some months but has been removed recently -- I still need to coordinate it with SGI.

WBR, Sergei
-
: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux