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] [day] [month] [year] [list]
Message-ID: <CALMQjD-JB-53dpJ92V4tdmiD_mO0AiyDthRv8obnpw=1FtRJ1g@mail.gmail.com>
Date:   Tue, 18 Jul 2023 10:51:53 +0200
From:   Kjetil Oftedal <oftedal@...il.com>
To:     sunran001@...suo.com
Cc:     davem@...emloft.net, sparclinux@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] floppy: add missing put_device()

On Tue, 18 Jul 2023 at 10:15, <sunran001@...suo.com> wrote:
>
> The of_find_device_by_node() takes a reference to the underlying device
> structure, we should release that reference.
>
> Detected by coccinelle with the following ERROR:
> ./arch/sparc/include/asm/floppy_64.h:595:3-9: ERROR: missing put_device;
> call of_find_device_by_node on line 589, but without a corresponding
> object release within this function.
>
> Signed-off-by: Ran Sun <sunran001@...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..e74a4d4e6519 100644
> --- a/arch/sparc/include/asm/floppy_64.h
> +++ b/arch/sparc/include/asm/floppy_64.h
> @@ -592,6 +592,7 @@ static unsigned long __init sun_floppy_init(void)
>
>           state_prop = of_get_property(op->dev.of_node, "status", NULL);
>           if (state_prop && !strncmp(state_prop, "disabled", 8))
> +            put_device(&op->dev);

>From the same domain as "Liubin" earlier, introducing the same kind of error
(Not adding curly braces)


>               return 0;
>
>           FLOPPY_IRQ = op->archdata.irqs[0];

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ