Skip to content
Commit fbf8e721 authored by Shuah Khan's avatar Shuah Khan Committed by David S. Miller
Browse files

selftests/net: psock_fanout seg faults in sock_fanout_read_ring()



The while loop in sock_fanout_read_ring() checks mmap region
bounds after access, causing it to segfault. Fix it to check
count before accessing header->tp_status. This problem can be
reproduced consistently when the test in run as follows:

    make -C tools/testing/selftests TARGETS=net run_tests
    or
    make run_tests from tools/testing/selftests
    or
    make run_test from tools/testing/selftests/net

Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent caa13a9f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment