[PATCH] arm64: restore get_current() optimisation
mark.rutland at arm.com
Fri Mar 3 11:48:47 PST 2017
On Fri, Mar 03, 2017 at 03:32:22PM +0000, Jon Hunter wrote:
> Hi Mark,
> On 02/03/17 16:46, Mark Rutland wrote:
> > Perhaps a caller is deriving that from an uninitialised variable? The
> > code and stack layout changes as a result of my patch could easily
> > tickle that.
> You are correct, the reg passed to regcache_flat_read() is indeed dodgy
> and the above BUG() did trip it up.
> Commit e411b0b5eb9b ('ASoC: dapm: Support second register for DAPM
> control updates') introduced a 2nd register set into the
> snd_soc_dapm_update struct and if the 'has_second_set' is true then it
> tries to access this register. One of our out-of-tree audio patches was
> not initialising the 'has_second_set' and hence it was trying to write a
> bogus register (need to get this upstream!).
Phew. That's get_current() off the hook!
> I should have caught this, but the bisect threw me off the scent! I
> think that with reverting this patch we were just getting lucky and the
> problem could have still occurred. I went back and tried it again and it
> still works when reverting this change, but its just luck.
> Sorry for the noise and thanks for pointing me in the right direction!
No worries; it's always a pain to debug this sort of thing, especially
with a bisect seeming so reliable.
More information about the linux-arm-kernel