lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 19 Dec 2007 00:15:24 +0100
From:	Jiri Slaby <jirislaby@...il.com>
To:	Haavard Skinnemoen <hskinnemoen@...el.com>
CC:	Andrew Victor <linux@...im.org.za>, Remy Bohmer <linux@...mer.net>,
	ARM Linux Mailing List 
	<linux-arm-kernel@...ts.arm.linux.org.uk>,
	Russell King - ARM Linux <linux@....linux.org.uk>,
	linux-kernel@...r.kernel.org, kernel@...32linux.org
Subject: Re: [PATCH 4/5] atmel_serial: Split the interrupt handler

On 12/18/2007 06:06 PM, Haavard Skinnemoen wrote:
> From: Remy Bohmer <hskinnemoen@...el.com>
> 
> This patch splits up the interrupt handler of the serial port
> into a interrupt top-half and a tasklet.
[...]
> [hskinnemoen@...el.com: misc cleanups and simplifications]
> Signed-off-by: Remy Bohmer <linux@...mer.net>
> Signed-off-by: Haavard Skinnemoen <hskinnemoen@...el.com>
> ---
>  drivers/serial/atmel_serial.c |  215 ++++++++++++++++++++++++++++++++---------
>  1 files changed, 169 insertions(+), 46 deletions(-)
> 
> diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c
> index a6b3828..990d3ab 100644
> --- a/drivers/serial/atmel_serial.c
> +++ b/drivers/serial/atmel_serial.c
[...]
> @@ -994,11 +1108,19 @@ static int atmel_serial_resume(struct platform_device *pdev)
>  static int __devinit atmel_serial_probe(struct platform_device *pdev)
>  {
>  	struct atmel_uart_port *port;
> +	void *data;
>  	int ret;
>  
> +	BUILD_BUG_ON(!is_power_of_2(ATMEL_SERIAL_RINGSIZE));
> +
>  	port = &atmel_ports[pdev->id];
>  	atmel_init_port(port, pdev);
>  
> +	data = kmalloc(ATMEL_SERIAL_RINGSIZE, GFP_KERNEL);
> +	if (!data)

{
        clk_disable(atmel_port->clk);
        clk_put(atmel_port->clk);


> +		return -ENOMEM;

}

> +	port->rx_ring.buf = data;
> +
>  	ret = uart_add_one_port(&atmel_uart, &port->uart);
>  	if (!ret) {
>  		device_init_wakeup(&pdev->dev, 1);
> @@ -1022,6 +1144,7 @@ static int __devexit atmel_serial_remove(struct platform_device *pdev)
>  
>  	if (port) {
>  		ret = uart_remove_one_port(&atmel_uart, port);

Don't you need tasklet_kill() here (or somewhere)?

> +		kfree(atmel_port->rx_ring.buf);
>  		kfree(port);
>  	}
>  
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ