HomeFreeBSD

linux(4): Prevent an endless loop.

Description

linux(4): Prevent an endless loop.

In the futex_atomic_op() the encoded_op is a user-supplied parameter.
If the user specifies an incorrect value for this parameter paired with a valid
*uaddr parameter the caller will go into the endless loop. To prevent this check
futex_atomic_op() result and break the loop in case of ENOSYS.

MFC after: 2 weeks

(cherry picked from commit ef4251e271486227f577494b8cc48623772a74ab)

Details

Provenance
dchaginAuthored on Jul 20 2021, 11:40 AM
Parents
rGee847258e369: linux(4): Eliminate bogus comment.
Branches
Unknown
Tags
Unknown