From 25c72c786cb571cfdf39a31f9f64d143d8623a7a Mon Sep 17 00:00:00 2001 From: Jun Tian Date: Mon, 12 May 2014 16:54:57 +0100 Subject: [PATCH] goldfish: fix kernel panic when using multiple adb connection When using multiple adb on 64 bit kernel to transfer data, the goldfish pipe interrupt will crash the kernel. Signed-off-by: Jun Tian Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/platform/goldfish/goldfish_pipe.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c index f33c6e0e7fb0..670b9b94f74b 100644 --- a/drivers/platform/goldfish/goldfish_pipe.c +++ b/drivers/platform/goldfish/goldfish_pipe.c @@ -469,6 +469,9 @@ static irqreturn_t goldfish_pipe_interrupt(int irq, void *dev_id) #ifdef CONFIG_64BIT channel = (u64)readl(dev->base + PIPE_REG_CHANNEL_HIGH) << 32; + + if (channel == 0) + break; #endif channel |= readl(dev->base + PIPE_REG_CHANNEL);