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]
Message-ID: <53639BEF.60008@linutronix.de>
Date:	Fri, 02 May 2014 15:21:51 +0200
From:	Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:	Steven Rostedt <rostedt@...dmis.org>
CC:	linux-kernel@...r.kernel.org,
	linux-rt-users <linux-rt-users@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Carsten Emde <C.Emde@...dl.org>,
	John Kacur <jkacur@...hat.com>,
	Paul Gortmaker <paul.gortmaker@...driver.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH RT 2/2] rtmutex: Remove duplicate rt_mutex_init()

On 05/02/2014 03:12 PM, Steven Rostedt wrote:
>> This does not apply cleanly on v3.14-rt
> 
> That's because I sent this out before 3.14-rt was released :-)

Ach right. Sorry, my memory…

>>> --- a/include/linux/rtmutex.h
>>> +++ b/include/linux/rtmutex.h
>>> @@ -62,25 +62,19 @@ struct hrtimer_sleeper;
>>> # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \
>>> 	, .name = #mutexname, .file = __FILE__, .line = __LINE__
>>>
>>> -# define rt_mutex_init(mutex)					\
>>> -	do {							\
>>> -		raw_spin_lock_init(&(mutex)->wait_lock);	\
>>> -		__rt_mutex_init(mutex, #mutex);			\
>>> -	} while (0)
>>> -
>>
>> The macro is the same in CONFIG_DEBUG_RT_MUTEXES and the else path.
>> Shouldn't you remove both and define it before the ifdef?
> 
> That's exactly what the patch did! Except that it defined it *after* the ifdef.
> 
> Here's the patch again (as it was cut in the reply):
> 
> --- a/include/linux/rtmutex.h
> +++ b/include/linux/rtmutex.h
> @@ -62,25 +62,19 @@ struct hrtimer_sleeper;
>  # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \
>  	, .name = #mutexname, .file = __FILE__, .line = __LINE__
>  
> -# define rt_mutex_init(mutex)					\
> -	do {							\
> -		raw_spin_lock_init(&(mutex)->wait_lock);	\
> -		__rt_mutex_init(mutex, #mutex);			\
> -	} while (0)
> -
>   extern void rt_mutex_debug_task_free(struct task_struct *tsk);
>  #else
>  # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname)
>  
> +# define rt_mutex_debug_task_free(t)			do { } while (0)
> +#endif
> +
>  # define rt_mutex_init(mutex)					\
>  	do {							\
>  		raw_spin_lock_init(&(mutex)->wait_lock);	\
>  		__rt_mutex_init(mutex, #mutex);			\
>  	} while (0)
>  
> -# define rt_mutex_debug_task_free(t)			do { } while (0)
> -#endif
> -
>  #define __RT_MUTEX_INITIALIZER_PLAIN(mutexname) \
>  	.wait_lock = __RAW_SPIN_LOCK_UNLOCKED(mutexname.wait_lock) \
>  	, .wait_list = PLIST_HEAD_INIT(mutexname.wait_list) \
> 
> Take special note of the movement of the "#endif".

Ah. That is the trick. So lets try it again…

> -- Steve

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ