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: <cf2ccfc1-a902-29a4-3acf-4025e5172dab@redhat.com>
Date:   Thu, 5 Oct 2017 14:01:27 -0400
From:   Waiman Long <longman@...hat.com>
To:     Davidlohr Bueso <dave@...olabs.net>
Cc:     Alexander Viro <viro@...iv.linux.org.uk>, Jan Kara <jack@...e.com>,
        Jeff Layton <jlayton@...chiereds.net>,
        "J. Bruce Fields" <bfields@...ldses.org>,
        Tejun Heo <tj@...nel.org>,
        Christoph Lameter <cl@...ux-foundation.org>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Andi Kleen <andi@...stfloor.org>,
        Dave Chinner <dchinner@...hat.com>,
        Boqun Feng <boqun.feng@...il.com>,
        Waiman Long <Waiman.Long@....com>
Subject: Re: [PATCH v6 4/6] lib/dlock-list: Make sibling CPUs share the same
 linked list

On 10/05/2017 01:40 PM, Davidlohr Bueso wrote:
> This is still spitting:
>
> lib/dlock-list.c: In function ‘cpu2idx_init’:
> lib/dlock-list.c:75:16: error: incompatible types when assigning to
> type ‘cpumask_var_t’ from type ‘struct cpumask *’
>   sibling_mask = topology_sibling_cpumask(cpu);
>                ^
> lib/dlock-list.c:76:7: warning: the address of ‘sibling_mask’ will
> always evaluate as ‘true’ [-Waddress]
>   if (sibling_mask) {
>       ^


Thanks for reporting this problem. Dealing with cpumask is always
tricky. Could you try the following patch to see if it could fix the
problem.

Thanks,
Longman

----------------------------------------------------

diff --git a/lib/dlock-list.c b/lib/dlock-list.c
index f0df7d5..3afd76d 100644
--- a/lib/dlock-list.c
+++ b/lib/dlock-list.c
@@ -60,7 +60,7 @@
 static int __init cpu2idx_init(void)
 {
        int idx, cpu;
-       cpumask_var_t sibling_mask;
+       struct cpumask *sibling_mask;
        static struct cpumask mask __initdata;
 
        cpumask_clear(&mask);
@@ -74,11 +74,9 @@ static int __init cpu2idx_init(void)
                cpumask_set_cpu(cpu, &mask);
 
                sibling_mask = topology_sibling_cpumask(cpu);
-               if (sibling_mask) {
-                       for_each_cpu(scpu, sibling_mask) {
-                               per_cpu(cpu2idx, scpu) = idx;
-                               cpumask_set_cpu(scpu, &mask);
-                       }
+               for_each_cpu(scpu, sibling_mask) {
+                       per_cpu(cpu2idx, scpu) = idx;
+                       cpumask_set_cpu(scpu, &mask);
                }
                idx++;
        }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ