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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 7 Aug 2018 10:59:35 +0200 (CEST)
From:   Julia Lawall <julia.lawall@...6.fr>
To:     Mao Wenan <maowenan@...wei.com>
cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Will Deacon <will.deacon@....com>,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] rtmutex: Drop pointless static qualifier in
 rt_mutex_adjust_prio_chain()



On Tue, 7 Aug 2018, Mao Wenan wrote:

> There is no need to have the 'T *v' variable static
> since new value always be assigned before use it.

The code is:

		static int prev_max;

		/*
		 * Print this only once. If the admin changes the limit,
		 * print a new message when reaching the limit again.
		 */
		if (prev_max != max_lock_depth) {

So it is referenced before it is initialized.

julia


>
> Signed-off-by: Mao Wenan <maowenan@...wei.com>
> ---
>  kernel/locking/rtmutex.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
> index 2823d41..ba70db8 100644
> --- a/kernel/locking/rtmutex.c
> +++ b/kernel/locking/rtmutex.c
> @@ -472,7 +472,7 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task,
>  	 * We limit the lock chain length for each invocation.
>  	 */
>  	if (++depth > max_lock_depth) {
> -		static int prev_max;
> +		int prev_max;
>
>  		/*
>  		 * Print this only once. If the admin changes the limit,
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ