Comment 1 for bug 2000667

Revision history for this message
Po-Hsu Lin (cypressyew) wrote (last edit ): Re: cmsg_so_mark.sh in net from ubuntu_kernel_selftests hang with K-RISCV kernel

Discussion upstream:
https://lore.kernel<email address hidden>/t/

strace, dmesg, syslog did not provide any useful information.

Investigation with gdb shows the cmsg_sender will stuck in an infinity loop when parsing arguments in cs_parse_args().

while ((o = getopt(argc, argv, "46sS:p:m:M:d:tf:F:c:C:l:L:H:")) != -1)

The "char o" is the culprit here, should be an int instead.
Otherwise it will get stuck as char(-1) is 255 on these riscv instances, it will never match the -1 here.