]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
dma-mapping: fix off-by-one error in dma_capable()
authorJan Beulich <JBeulich@novell.com>
Wed, 16 Dec 2009 00:47:43 +0000 (16:47 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 16 Dec 2009 15:20:12 +0000 (07:20 -0800)
commitac2b3e67dd59b8c6ef8c199641444c6ea03535a6
treece7ac263fc47517ed42a15670a5359094b2a1f05
parentbbead2104e912571c3afb2aafe5ece1b446b56d9
dma-mapping: fix off-by-one error in dma_capable()

dma_mask is, when interpreted as address, the last valid byte, and hence
comparison msut also be done using the last valid of the buffer in
question.

Also fix the open-coded instances in lib/swiotlb.c.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Becky Bruce <beckyb@kernel.crashing.org>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/ia64/include/asm/dma-mapping.h
arch/powerpc/include/asm/dma-mapping.h
arch/x86/include/asm/dma-mapping.h
lib/swiotlb.c