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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200213114952.4638-1-yaohongbo@huawei.com>
Date:   Thu, 13 Feb 2020 19:49:52 +0800
From:   Hongbo Yao <yaohongbo@...wei.com>
To:     <paulmck@...nel.or>
CC:     <linux-kernel@...r.kernel.org>, <yaohongbo@...wei.com>,
        <chenzhou10@...wei.com>, <dave@...olabs.net>,
        <josh@...htriplett.org>
Subject: [PATCH -next] torture: avoid build error without CONFIG_RCU_TORTURE_TEST

If TORTURE_TEST=y(selected by TORTURE_LOCK_TEST) and RCU_TORTURE_TEST=n,
the following error is seen while building kernel/torture.c

kernel/torture.c: In function torture_onoff:
kernel/torture.c:239:3: error: implicit declaration of function
rcutorture_sched_setaffinity; did you mean __NR_ia32_sched_setaffinity?
[-Werror=implicit-function-declaration]
   rcutorture_sched_setaffinity(current->pid, cpumask_of(0));

Using sched_setaffnity() instead of rcutorture_sched_setaffinity() to
avoid the error.

Reported-by: Hulk Robot <hulkci@...wei.com>
Fixes: bc3db9afb849 ("EXP: rcutorture hack to force CPU hotplug onto CPU 0")
Signed-off-by: Hongbo Yao <yaohongbo@...wei.com>
---
 kernel/torture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/torture.c b/kernel/torture.c
index b29adec50e01..834214cbd1cd 100644
--- a/kernel/torture.c
+++ b/kernel/torture.c
@@ -236,7 +236,7 @@ torture_onoff(void *arg)
 			schedule_timeout_interruptible(HZ / 10);
 			continue;
 		}
-		rcutorture_sched_setaffinity(current->pid, cpumask_of(0));
+		sched_setaffinity(current->pid, cpumask_of(0));
 		cpu = (torture_random(&rand) >> 4) % (maxcpu + 1);
 		if (!torture_offline(cpu,
 				     &n_offline_attempts, &n_offline_successes,
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ