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: <45B872BB.1010703@joow.be>
Date:	Thu, 25 Jan 2007 06:04:59 -0300
From:	Pieter Palmers <pieterp@...w.be>
To:	Ingo Molnar <mingo@...e.hu>
CC:	Lee Revell <rlrevell@...-job.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: status of: tasklet_unlock_wait() causes soft lockup with -rt
 and ieee1394	audio

Ingo Molnar wrote:
> * Pieter Palmers <pieterp@...w.be> wrote:
> 
>> Dear all,
>>
>> What is the status with respect to this problem? I see that in the 
>> current -rt patch the problematic code piece is different. I 
>> personally haven't tried to reproduce this myself on a more recent 
>> kernel, but I just got a report from one of our users who experienced 
>> the same problem with 2.6.19-rt15 and RT preemption (desktop 
>> preemption works fine).
>>
>> Should the latest -rt patches be fixed with respect to this issue? If 
>> so I'll try and test them, otherwise I omit the effort.
> 
> it's not fixed yet. Could you try the patch below?

Ingo,

I couldn't get my laptop booting on 2.6.20-rc3 or 2.6.19, but I passed 
the patch on to one of our users and he reports that it is working (on 
2.6.19-rt15).

Thanks,

Pieter

> 
> 	Ingo
> 
> ---
>  include/linux/interrupt.h |    6 ++----
>  kernel/softirq.c          |   20 ++++++++++++++++++++
>  2 files changed, 22 insertions(+), 4 deletions(-)
> 
> Index: linux/include/linux/interrupt.h
> ===================================================================
> --- linux.orig/include/linux/interrupt.h
> +++ linux/include/linux/interrupt.h
> @@ -328,10 +328,8 @@ static inline void tasklet_unlock(struct
>  	clear_bit(TASKLET_STATE_RUN, &(t)->state);
>  }
>  
> -static inline void tasklet_unlock_wait(struct tasklet_struct *t)
> -{
> -	while (test_bit(TASKLET_STATE_RUN, &(t)->state)) { barrier(); }
> -}
> +extern void tasklet_unlock_wait(struct tasklet_struct *t);
> +
>  #else
>  # define tasklet_trylock(t)		1
>  # define tasklet_tryunlock(t)		1
> Index: linux/kernel/softirq.c
> ===================================================================
> --- linux.orig/kernel/softirq.c
> +++ linux/kernel/softirq.c
> @@ -20,6 +20,7 @@
>  #include <linux/mm.h>
>  #include <linux/notifier.h>
>  #include <linux/percpu.h>
> +#include <linux/delay.h>
>  #include <linux/cpu.h>
>  #include <linux/kthread.h>
>  #include <linux/rcupdate.h>
> @@ -656,6 +657,25 @@ void __init softirq_init(void)
>  	open_softirq(HI_SOFTIRQ, tasklet_hi_action, NULL);
>  }
>  
> +#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT_RT)
> +
> +void tasklet_unlock_wait(struct tasklet_struct *t)
> +{
> +	while (test_bit(TASKLET_STATE_RUN, &(t)->state)) {
> +		/*
> +		 * Hack for now to avoid this busy-loop:
> +		 */
> +#ifdef CONFIG_PREEMPT_RT
> +		msleep(1);
> +#else
> +		barrier();
> +#endif
> +	}
> +}
> +EXPORT_SYMBOL(tasklet_unlock_wait);
> +
> +#endif
> +
>  static int ksoftirqd(void * __data)
>  {
>  	struct sched_param param = { .sched_priority = MAX_USER_RT_PRIO/2 };
> 

-
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