This is the stress-ng upstream project git repository. stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces.
Since the buffer is already set to zero at the beginning with memset will already have cleared the buffer, there's no need for the `else`` conditional.
It is possible for reads from the
/sys
filesystem to rarely return -EBUSY.When that happens,
stress_system_read()
will write to a stack location outside the bufferThe
ret
value is set to-EBUSY
atSET
and then used in theUSE
statement, which will be before the buffer in the stack of the caller.The corresponding
strace
shows this happening:Since the buffer is already set to zero at the beginning with
memset
will already have cleared the buffer, there's no need for the `else`` conditional.