The patch titled parisc: fix a overflow bug on 32bit architectures has been added to the -mm tree. Its filename is parisc-fix-a-overflow-bug-on-32bit-architectures.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: parisc: fix a overflow bug on 32bit architectures From: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx> On 32bit2 boxes, boundary_size becomes zero due to a overflow and we hit BUG_ON in iommu_is_span_boundary. Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx> Cc: Kyle McMartin <kyle@xxxxxxxxxxxxxxxx> Cc: Matthew Wilcox <matthew@xxxxxx> Cc: Grant Grundler <grundler@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/parisc/ccio-dma.c | 4 ++-- drivers/parisc/sba_iommu.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff -puN drivers/parisc/ccio-dma.c~parisc-fix-a-overflow-bug-on-32bit-architectures drivers/parisc/ccio-dma.c --- a/drivers/parisc/ccio-dma.c~parisc-fix-a-overflow-bug-on-32bit-architectures +++ a/drivers/parisc/ccio-dma.c @@ -366,8 +366,8 @@ ccio_alloc_range(struct ioc *ioc, struct ** ggg sacrifices another 710 to the computer gods. */ - boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1, 1 << IOVP_SHIFT); - boundary_size >>= IOVP_SHIFT; + boundary_size = ALIGN((unsigned long long)dma_get_seg_boundary(dev) + 1, + 1ULL << IOVP_SHIFT) >> IOVP_SHIFT; if (pages_needed <= 8) { /* diff -puN drivers/parisc/sba_iommu.c~parisc-fix-a-overflow-bug-on-32bit-architectures drivers/parisc/sba_iommu.c --- a/drivers/parisc/sba_iommu.c~parisc-fix-a-overflow-bug-on-32bit-architectures +++ a/drivers/parisc/sba_iommu.c @@ -341,8 +341,8 @@ sba_search_bitmap(struct ioc *ioc, struc unsigned long shift; int ret; - boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1, 1 << IOVP_SHIFT); - boundary_size >>= IOVP_SHIFT; + boundary_size = ALIGN((unsigned long long)dma_get_seg_boundary(dev) + 1, + 1ULL << IOVP_SHIFT) >> IOVP_SHIFT; #if defined(ZX1_SUPPORT) BUG_ON(ioc->ibase & ~IOVP_MASK); _ Patches currently in -mm which might be from fujita.tomonori@xxxxxxxxxxxxx are origin.patch alpha-convert-iommu-to-use-align.patch alpha-iommu-had-better-access-to-the-free-space-bitmap-at-only-one-place.patch alpha-make-iommu-respect-the-segment-boundary-limits.patch alpha-remove-unused-debug_forcedac-define-in-iommu.patch iommu-export-iommu_is_span_boundary-helper-function.patch iommu-parisc-pass-struct-device-to-iommu_alloc_range.patch iommu-parisc-make-the-iommus-respect-the-segment-boundary-limits.patch parisc-fix-a-overflow-bug-on-32bit-architectures.patch git-scsi-misc.patch mpt-fusion-dont-oops-if-numphys==0.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html