lkml.org 
[lkml]   [2019]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 02/12] futex: Move futex exit handling into futex code
On Thu, 7 Nov 2019, Peter Zijlstra wrote:
> On Wed, Nov 06, 2019 at 10:55:36PM +0100, Thomas Gleixner wrote:
>
> > -#ifdef CONFIG_FUTEX
> > - if (unlikely(tsk->robust_list)) {
> > - exit_robust_list(tsk);
> > - tsk->robust_list = NULL;
> > - }
> > -#ifdef CONFIG_COMPAT
> > - if (unlikely(tsk->compat_robust_list)) {
> > - compat_exit_robust_list(tsk);
> > - tsk->compat_robust_list = NULL;
> > - }
> > -#endif
> > - if (unlikely(!list_empty(&tsk->pi_state_list)))
> > - exit_pi_state_list(tsk);
> > -#endif
>
> > +void futex_mm_release(struct task_struct *tsk)
> > +{
> > + if (unlikely(tsk->robust_list)) {
> > + exit_robust_list(tsk);
> > + tsk->robust_list = NULL;
> > + }
> > +
> > + if (IS_ENABLED(CONFIG_COMPAT)) {
> > + if (unlikely(tsk->compat_robust_list)) {
> > + compat_exit_robust_list(tsk);
> > + tsk->compat_robust_list = NULL;
> > + }
> > + }
>
> I suppose it is this substitution that causes the compile error mingo
> found. The problem with IS_ENABLED() is that the whole block still needs
> to compile (before it can be thrown out), and in this case
> tsk->compat_robust_list doesn't exist.

Yeah. Tried to be overly smart :)

\
 
 \ /
  Last update: 2019-11-07 10:39    [W:0.124 / U:1.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site