]> git.baikalelectronics.ru Git - 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)
committerWill Deacon <will.deacon@arm.com>
Fri, 26 Apr 2019 12:57:49 +0000 (13:57 +0100)
commit0cc6bab748cbc441c6349628a3eaf7eba0e004fb
treefb89e32a00cffd6f64c652571bd51aa783472c4a
parentc298bc6d505785e056764492ac7ed22f352d2152
arm64: futex: Avoid copying out uninitialised stack in failed cmpxchg()

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>
arch/arm64/include/asm/futex.h