Re: [PATCH RT 0/9] Linux v4.19.255-rt114-rc1

From: Daniel Wagner
Date: Mon Oct 24 2022 - 06:54:23 EST


On Mon, Oct 24, 2022 at 12:44:16PM +0200, Daniel Wagner wrote:
> Dear RT Folks,
>
> This is the RT stable review cycle of patch 4.19.255-rt114-rc1.
>
> Please scream at me if I messed something up. Please test the patches
> too.
>
> The -rc release will be uploaded to kernel.org and will be deleted
> when the final release is out. This is just a review release (or
> release candidate).
>
> The pre-releases will not be pushed to the git repository, only the
> final release is.
>
> If all goes well, this patch will be converted to the next main
> release on 2022-10-31.

Timer changes seem not to be correct though:

[ 24.674424] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974
[ 24.674426] in_atomic(): 0, irqs_disabled(): 1, pid: 23, name: ktimersoftd/1
[ 25.730421] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974
[ 25.730424] in_atomic(): 0, irqs_disabled(): 1, pid: 11, name: ktimersoftd/0

I get those for when running any of the rttests. I suppose I am missing
an additional fix:

- if (!IS_ENABLED(CONFIG_PREEMPT_RT_FULL) &&
- timer->flags & TIMER_IRQSAFE) {
+ if (timer->flags & TIMER_IRQSAFE) {
raw_spin_unlock(&base->lock);
call_timer_fn(timer, fn);
base->running_timer = NULL;


is now queuing up fn callbacks with TIMER_IRQSAFE which then triggers:

+ if (IS_ENABLED(CONFIG_PREEMPT_RT) && !(timer->flags & TIMER_IRQSAFE))
+ might_sleep();

in del_timer_sync(). But this is just a guess.

Daniel