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]
Message-ID: <1ed76406-443d-63e2-3b3b-f6528a13f95a@linux.intel.com>
Date: Fri, 26 Apr 2024 12:06:45 +0300 (EEST)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: lumingyindetect@....com
cc: LKML <linux-kernel@...r.kernel.org>, 
    linux-serial <linux-serial@...r.kernel.org>, 
    Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, 
    Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
    Jiri Slaby <jirislaby@...nel.org>, 
    LuMingYin <11570291+yin-luming@...r.noreply.gitee.com>
Subject: Re: [PATCH] "drivers:Fixed memory leak in /linux/drivers/tty/serial/8250/8250_lpss.c
 file.

On Fri, 26 Apr 2024, lumingyindetect@....com wrote:

> From: LuMingYin <11570291+yin-luming@...r.noreply.gitee.com>

Use:

git log --oneline -- drivers/tty/serial/8250/8250_lpss.c

to learn what prefix you should use for shortlog (on the subject line). 
Beyond the correct prefix, don't use filename in the shortlog at all.

"Fixed" -> "Fix"

"in xx file" is awfully generic, please be more specific where the leak 
is.

> In the lpss8250_probe function in the file /linux/drivers/tty/serial/8250/8250_lpss.c, there were certain return paths where pci_free_irq_vectors was not called to release memory related to pdev, leading to a memory leak. This commit fixes that issue." 

- Wrap this properly.
- Don't write full paths like that.
- Put () into description when talking about functions.
- Use imperative language, don't use "This patch ...".

- Add Fixes tag

> Signed-off-by: LuMingYin <11570291+yin-luming@...r.noreply.gitee.com>

> ---
>  drivers/tty/serial/8250/8250_lpss.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/8250/8250_lpss.c b/drivers/tty/serial/8250/8250_lpss.c
> index 776ec1ef29d6..2bb86f9cad5b 100644
> --- a/drivers/tty/serial/8250/8250_lpss.c
> +++ b/drivers/tty/serial/8250/8250_lpss.c
> @@ -344,11 +344,11 @@ static int lpss8250_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  	uart.port.mapbase = pci_resource_start(pdev, 0);
>  	uart.port.membase = pcim_iomap(pdev, 0, 0);
>  	if (!uart.port.membase)
> -		return -ENOMEM;
> +		goto early_err_exit;
>  
>  	ret = lpss->board->setup(lpss, &uart.port);
>  	if (ret)
> -		return ret;
> +		goto early_err_exit;
>  
>  	dw8250_setup_port(&uart.port);
>  
> @@ -367,6 +367,7 @@ static int lpss8250_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>  
>  err_exit:
>  	lpss->board->exit(lpss);
> +early_err_exit:

This label could be more specific that it's about freeing the vectors.

>  	pci_free_irq_vectors(pdev);
>  	return ret;
>  }
> 

-- 
 i.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ