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>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 11 May 2022 11:20:19 +0800
From:   baihaowen <baihaowen@...zu.com>
To:     <paulmck@...nel.org>
CC:     Davidlohr Bueso <dave@...olabs.net>,
        Josh Triplett <josh@...htriplett.org>,
        Frederic Weisbecker <frederic@...nel.org>,
        "Neeraj Upadhyay" <quic_neeraju@...cinc.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Lai Jiangshan <jiangshanlai@...il.com>,
        Joel Fernandes <joel@...lfernandes.org>,
        <linux-kernel@...r.kernel.org>, <rcu@...r.kernel.org>
Subject: Re: [PATCH] rcutorture: remove useless INIT_LIST_HEAD()

在 2022/5/11 上午11:01, Paul E. McKenney 写道:
> On Wed, May 11, 2022 at 10:47:04AM +0800, Haowen Bai wrote:
>> list rcu_torture_freelist has been inited staticly through LIST_HEAD,
>> so there's no need to call another INIT_LIST_HEAD. Simply remove
>> it.
>>
>> Signed-off-by: Haowen Bai <baihaowen@...zu.com>
> For kernels with built-in rcutorture that starts automatically at
> boot, you are quite correct.
>
> But wouldn't there be trouble in the case where someone does a series of
> "modprobe rcutorture" "rmmod rcutorture" commands?
>
> 							Thanx, Paul
>
>> ---
>>  kernel/rcu/rcutorture.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
>> index faf6b4c7a757..0005e259c4ce 100644
>> --- a/kernel/rcu/rcutorture.c
>> +++ b/kernel/rcu/rcutorture.c
>> @@ -3247,7 +3247,6 @@ rcu_torture_init(void)
>>  
>>  	/* Set up the freelist. */
>>  
>> -	INIT_LIST_HEAD(&rcu_torture_freelist);
>>  	for (i = 0; i < ARRAY_SIZE(rcu_tortures); i++) {
>>  		rcu_tortures[i].rtort_mbtest = 0;
>>  		list_add_tail(&rcu_tortures[i].rtort_free,
>> -- 
>> 2.7.4
>>
Thank you for kindly reply, got it.

-- 
Haowen Bai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ