]> git.ipfire.org Git - people/arne_f/kernel.git/commit
arm64: futex: Avoid copying out uninitialised stack in failed cmpxchg()
authorWill Deacon <will.deacon@arm.com>
Wed, 10 Apr 2019 10:49:11 +0000 (11:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jul 2019 11:16:03 +0000 (13:16 +0200)
commit9a53f4f87109ddb1a1a5a29d41d5e540dbafb969
tree6a12f15b19c045967ab231f2864e606ac63462a1
parent5a8221bcb056d35c2eee5c5374d05e769f16d138
arm64: futex: Avoid copying out uninitialised stack in failed cmpxchg()

commit 8e4e0ac02b449297b86498ac24db5786ddd9f647 upstream.

Returning an error code from futex_atomic_cmpxchg_inatomic() indicates
that the caller should not make any use of *uval, and should instead act
upon on the value of the error code. Although this is implemented
correctly in our futex code, we needlessly copy uninitialised stack to
*uval in the error case, which can easily be avoided.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/include/asm/futex.h