[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1201791141-12545-1-git-send-email-hskinnemoen@atmel.com>
Date: Thu, 31 Jan 2008 15:52:21 +0100
From: Haavard Skinnemoen <hskinnemoen@...el.com>
To: akpm@...ux-foundation.org
Cc: linux@...mer.net, linux@...im.org.za,
michael <trimarchi@...dalf.sssup.it>,
linux-kernel@...r.kernel.org,
Haavard Skinnemoen <hskinnemoen@...el.com>
Subject: [PATCH -mm] atmel_serial: Fix broken RX buffer allocation
Introduced by atmel_serial-split-the-interrupt-handler.patch.
Thanks to michael <trimarchi@...dalf.sssup.it> for spotting it.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@...el.com>
---
It was surprisingly difficult to actually provoke a crash without this
patch, but the system did start to behave rather funny after
transferring a lot of data.
drivers/serial/atmel_serial.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
index 62654ab..477950f 100644
--- a/drivers/serial/atmel_serial.c
+++ b/drivers/serial/atmel_serial.c
@@ -1477,7 +1477,8 @@ static int __devinit atmel_serial_probe(struct platform_device *pdev)
if (!atmel_use_dma_rx(&port->uart)) {
ret = -ENOMEM;
- data = kmalloc(ATMEL_SERIAL_RINGSIZE, GFP_KERNEL);
+ data = kmalloc(sizeof(struct atmel_uart_char)
+ * ATMEL_SERIAL_RINGSIZE, GFP_KERNEL);
if (!data)
goto err_alloc_ring;
port->rx_ring.buf = data;
--
1.5.3.8
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists