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:   Fri, 14 Jul 2023 08:06:55 +0200
From:   Sam Ravnborg <sam@...nborg.org>
To:     liubin001@...suo.com
Cc:     davem@...emloft.net, sparclinux@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] floppy:ERROR: missing put_device; call
 of_find_device_by_node on line 589, but without a corresponding object
 release within this function. Add the put_device function before return to
 release memory

Hi LiuBin

On Fri, Jul 14, 2023 at 12:56:29PM +0800, liubin001@...suo.com wrote:
> Signed-off-by: LiuBin <liubin001@...suo.com>
> ---
>  arch/sparc/include/asm/floppy_64.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/sparc/include/asm/floppy_64.h
> b/arch/sparc/include/asm/floppy_64.h
> index 070c8c1f5c8f..c4c51f494f25 100644
> --- a/arch/sparc/include/asm/floppy_64.h
> +++ b/arch/sparc/include/asm/floppy_64.h
> @@ -588,6 +588,7 @@ static unsigned long __init sun_floppy_init(void)
> 
>          op = of_find_device_by_node(dp);
>          if (!op)
> +            put_device(op);
>              return 0;

This does not look right as the code will always return 0 now,
independent on the if test. You missed a set of curly braces.

	Sam

> 
>          state_prop = of_get_property(op->dev.of_node, "status", NULL);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ