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]
Message-ID: <mvmd0p8wq28.fsf@suse.de>
Date:   Mon, 07 Jan 2019 14:33:03 +0100
From:   Andreas Schwab <schwab@...e.de>
To:     Atish Patra <atish.patra@....com>
Cc:     linux-riscv@...ts.infradead.org, palmer@...ive.com,
        linux-kernel@...r.kernel.org, anup@...infault.org,
        jeremy.linton@....com, sudeep.holla@....com
Subject: Re: [PATCH] RISC-V: Fix of_node_* refcount

On Nov 20 2018, Atish Patra <atish.patra@....com> wrote:

> diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c
> index 18cda0e8..fc185eca 100644
> --- a/arch/riscv/kernel/smpboot.c
> +++ b/arch/riscv/kernel/smpboot.c
> @@ -57,12 +57,15 @@ void __init setup_smp(void)
>  
>  	while ((dn = of_find_node_by_type(dn, "cpu"))) {
>  		hart = riscv_of_processor_hartid(dn);
> -		if (hart < 0)
> +		if (hart < 0) {
> +			of_node_put(dn);
>  			continue;
> +		}
>  
>  		if (hart == cpuid_to_hartid_map(0)) {
>  			BUG_ON(found_boot_cpu);
>  			found_boot_cpu = 1;
> +			of_node_put(dn);
>  			continue;
>  		}
>  

[    0.000000] OF: ERROR: Bad of_node_put() on /cpus/cpu@0
[    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.0.0-rc1-00013-ge0b3e41110 #4
[    0.000000] Call Trace:
[    0.000000] [<ffffffe0010c8c74>] walk_stackframe+0x0/0xa4
[    0.000000] [<ffffffe0010c8e74>] show_stack+0x2a/0x34
[    0.000000] [<ffffffe00160989c>] dump_stack+0x62/0x7c
[    0.000000] [<ffffffe0014d9660>] of_node_release+0xbe/0xc0
[    0.000000] [<ffffffe00160e560>] kobject_put+0xa6/0x1e8
[    0.000000] [<ffffffe0014d8bb8>] of_node_put+0x16/0x20
[    0.000000] [<ffffffe0014d4bc2>] of_find_node_by_type+0x66/0xa4
[    0.000000] [<ffffffe0000028bc>] 0xffffffe0000028bc
[    0.000000] [<ffffffe0000026cc>] 0xffffffe0000026cc
[    0.000000] [<ffffffe0000006ec>] 0xffffffe0000006ec
[    0.000000] [<ffffffe000000076>] 0xffffffe000000076
[    0.000000] OF: ERROR: Bad of_node_put() on /cpus/cpu@1
[    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.0.0-rc1-00013-ge0b3e41110 #4
[    0.000000] Call Trace:
[    0.000000] [<ffffffe0010c8c74>] walk_stackframe+0x0/0xa4
[    0.000000] [<ffffffe0010c8e74>] show_stack+0x2a/0x34
[    0.000000] [<ffffffe00160989c>] dump_stack+0x62/0x7c
[    0.000000] [<ffffffe0014d9660>] of_node_release+0xbe/0xc0
[    0.000000] [<ffffffe00160e560>] kobject_put+0xa6/0x1e8
[    0.000000] [<ffffffe0014d8bb8>] of_node_put+0x16/0x20
[    0.000000] [<ffffffe0014d4bc2>] of_find_node_by_type+0x66/0xa4
[    0.000000] [<ffffffe0000028bc>] 0xffffffe0000028bc
[    0.000000] [<ffffffe0000026cc>] 0xffffffe0000026cc
[    0.000000] [<ffffffe0000006ec>] 0xffffffe0000006ec
[    0.000000] [<ffffffe000000076>] 0xffffffe000000076

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@...e.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ