Messages in this thread | | | Date | Wed, 13 Feb 2019 16:18:55 +0100 | From | Frederic Weisbecker <> | 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@kernel.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.
| |