OSDN Git Service

swiotlb: fix wrong panic
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Fri, 25 Feb 2011 22:44:16 +0000 (14:44 -0800)
committerYoshinori Sato <ysato@users.sourceforge.jp>
Mon, 28 Feb 2011 08:17:02 +0000 (17:17 +0900)
commit0068acfa84593e70f1ca6d21e186247739aa5fd1
tree2809c59023fef29eb258fb8fdda64a7324b943ba
parent16f978094247e488e3d4f6065f212a659841aacc
swiotlb: fix wrong panic

swiotlb's map_page wrongly calls panic() when it can't find a buffer fit
for device's dma mask.  It should return an error instead.

Devices with an odd dma mask (i.e.  under 4G) like b44 network card hit
this bug (the system crashes):

   http://marc.info/?l=linux-kernel&m=129648943830106&w=2

If swiotlb returns an error, b44 driver can use the own bouncing
mechanism.

Reported-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Arkadiusz Miskiewicz <arekm@maven.pl>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/swiotlb.c