mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
selftests: net: fix cmsg_so_mark.sh test hang
[ Upstream commit 1573c68820
]
This cmsg_so_mark.sh test will hang on non-amd64 systems because of the
infinity loop for argument parsing in cmsg_sender.
Variable "o" in cs_parse_args() for taking getopt() should be an int,
otherwise it will be 255 when getopt() returns -1 on non-amd64 system
and thus causing infinity loop.
Link: https://lore.kernel.org/lkml/CA+G9fYsM2k7mrF7W4V_TrZ-qDauWM394=8yEJ=-t1oUg8_40YA@mail.gmail.com/t/
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
307e8d9eef
commit
5744ba445c
1 changed files with 1 additions and 1 deletions
|
@ -110,7 +110,7 @@ static void __attribute__((noreturn)) cs_usage(const char *bin)
|
|||
|
||||
static void cs_parse_args(int argc, char *argv[])
|
||||
{
|
||||
char o;
|
||||
int o;
|
||||
|
||||
while ((o = getopt(argc, argv, "46sS:p:m:M:d:tf:F:c:C:l:L:H:")) != -1) {
|
||||
switch (o) {
|
||||
|
|
Loading…
Reference in a new issue