lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date: Mon, 31 Jul 2023 10:41:43 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <dan.carpenter@...aro.org>
CC: <kuniyu@...zon.com>, <linux-kselftest@...r.kernel.org>,
	<netdev@...r.kernel.org>
Subject: Re: [bug report] selftest: Add test for SO_INCOMING_CPU.

Hi Dan,

From:   Dan Carpenter <dan.carpenter@...aro.org>
Date:   Mon, 31 Jul 2023 17:18:37 +0300
> Hello Kuniyuki Iwashima,
> 
> The patch 6df96146b202: "selftest: Add test for SO_INCOMING_CPU."
> from Oct 21, 2022 (linux-next), leads to the following Smatch static
> checker warning:
> 
> 	./tools/testing/selftests/net/so_incoming_cpu.c:163 create_clients()
> 	error: uninitialized symbol 'ret'.
> 
> ./tools/testing/selftests/net/so_incoming_cpu.c
>     146 void create_clients(struct __test_metadata *_metadata,
>     147                     FIXTURE_DATA(so_incoming_cpu) *self)
>     148 {
>     149         cpu_set_t cpu_set;
>     150         int i, j, fd, ret;
>     151 
>     152         for (i = 0; i < NR_SERVER; i++) {
>     153                 CPU_ZERO(&cpu_set);
>     154 
>     155                 CPU_SET(i, &cpu_set);
>     156                 ASSERT_EQ(CPU_COUNT(&cpu_set), 1);
>     157                 ASSERT_NE(CPU_ISSET(i, &cpu_set), 0);
>     158 
>     159                 /* Make sure SYN will be processed on the i-th CPU
>     160                  * and finally distributed to the i-th listener.
>     161                  */
>     162                 sched_setaffinity(0, sizeof(cpu_set), &cpu_set);
> 
> Presumabley ret = sched_setaffinity() was intended.

Right, thanks for reporting.
I'll post a patch.

Thanks!


> 
> --> 163                 ASSERT_EQ(ret, 0);
>     164 
>     165                 for (j = 0; j < CLIENT_PER_SERVER; j++) {
>     166                         fd  = socket(AF_INET, SOCK_STREAM, 0);
>     167                         ASSERT_NE(fd, -1);
>     168 
>     169                         ret = connect(fd, &self->addr, self->addrlen);
>     170                         ASSERT_EQ(ret, 0);
>     171 
>     172                         close(fd);
>     173                 }
>     174         }
>     175 }
> 
> regards,
> dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ