[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190213151854.GE8524@lenoir>
Date: Wed, 13 Feb 2019 16:18:55 +0100
From: Frederic Weisbecker <frederic@...nel.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Mauro Carvalho Chehab <mchehab@...pensource.com>,
"David S . Miller" <davem@...emloft.net>,
Thomas Gleixner <tglx@...utronix.de>,
"Paul E . McKenney" <paulmck@...ux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Pavan Kondeti <pkondeti@...eaurora.org>,
Ingo Molnar <mingo@...nel.org>,
Joel Fernandes <joel@...lfernandes.org>
Subject: Re: [PATCH 09/32] locking/lockdep: Save stack trace for each softirq
vector involved
On Tue, Feb 12, 2019 at 09:47:39AM -0800, Linus Torvalds wrote:
> On Tue, Feb 12, 2019 at 9:15 AM Frederic Weisbecker <frederic@...nel.org> wrote:
> >
> >
> > +static int save_trace_mask(struct lock_class *class, u64 mask)
> > +{
> > + int bit = 0;
> > +
> > + while (mask) {
> > + long fs = __ffs64(mask) + 1;
> > +
> > + mask >>= fs;
> > + bit += fs;
>
> Same buggy pattern of "ffs+1" and overflow of shift count.
You're right and there are more. I'll unify all that around
a safe iterator.
Thanks.
Powered by blists - more mailing lists