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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 20 Jun 2018 11:34:39 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Hugo Lefeuvre <hle@....eu.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        devel@...verdev.osuosl.org,
        Marcus Wolf <linux@...f-entwicklungen.de>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] staging: pi433: fix race condition in pi433_open

On Tue, Jun 19, 2018 at 10:33:26PM -0400, Hugo Lefeuvre wrote:
> @@ -1178,6 +1152,11 @@ static int pi433_probe(struct spi_device *spi)
>  	device->tx_active = false;
>  	device->interrupt_rx_allowed = false;
>  
> +	/* init rx buffer */
> +	device->rx_buffer = kmalloc(MAX_MSG_SIZE, GFP_KERNEL);
> +	if (!device->rx_buffer)
> +		return -ENOMEM;

We need to free device.

> +
>  	/* init wait queues */
>  	init_waitqueue_head(&device->tx_wait_queue);
>  	init_waitqueue_head(&device->rx_wait_queue);
> @@ -1280,6 +1259,7 @@ static int pi433_probe(struct spi_device *spi)
>  minor_failed:
>  	free_gpio(device);
>  GPIO_failed:
> +	kfree(device->rx_buffer);
>  	kfree(device);
>  
>  	return retval;

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ