All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] OP-TEE driver fix for v5.11
@ 2021-01-22  7:42 Jens Wiklander
  2021-01-22 14:25 ` Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jens Wiklander @ 2021-01-22  7:42 UTC (permalink / raw)
  To: arm, soc; +Cc: op-tee, Linux Kernel Mailing List, Rouven Czerwinski

Hello arm-soc maintainers,

Please pull this small patch taking care of a rcu_sched trace in some
corner cases when OP-TEE is invoked.

Thanks,
Jens

The following changes since commit e71ba9452f0b5b2e8dc8aa5445198cd9214a6a62:

  Linux 5.11-rc2 (2021-01-03 15:55:30 -0800)

are available in the Git repository at:

  git://git.linaro.org/people/jens.wiklander/linux-tee.git tags/optee-rcu-sched-trace-for-v5.11

for you to fetch changes up to dcb3b06d9c34f33a249f65c08805461fb0c4325b:

  tee: optee: replace might_sleep with cond_resched (2021-01-21 10:36:48 +0100)

----------------------------------------------------------------
Fix rcu_sched trace from OP-TEE invoke

Replaces might_sleep() with a conditional call to cond_resched()
in order to avoid the rcu_sched trace in some corner cases.

----------------------------------------------------------------
Rouven Czerwinski (1):
      tee: optee: replace might_sleep with cond_resched

 drivers/tee/optee/call.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] OP-TEE driver fix for v5.11
  2021-01-22  7:42 [GIT PULL] OP-TEE driver fix for v5.11 Jens Wiklander
@ 2021-01-22 14:25 ` Arnd Bergmann
  2021-01-22 23:00 ` patchwork-bot+linux-soc
  2021-01-22 23:00 ` patchwork-bot+linux-soc
  2 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2021-01-22 14:25 UTC (permalink / raw)
  To: Jens Wiklander
  Cc: arm-soc, SoC Team, op-tee, Linux Kernel Mailing List, Rouven Czerwinski

On Fri, Jan 22, 2021 at 8:42 AM Jens Wiklander
<jens.wiklander@linaro.org> wrote:
> for you to fetch changes up to dcb3b06d9c34f33a249f65c08805461fb0c4325b:
>
>   tee: optee: replace might_sleep with cond_resched (2021-01-21 10:36:48 +0100)
>
> ----------------------------------------------------------------
> Fix rcu_sched trace from OP-TEE invoke
>
> Replaces might_sleep() with a conditional call to cond_resched()
> in order to avoid the rcu_sched trace in some corner cases.

Hi Rouven,

The bugfix looks correct in the sense that it fixes the issue, but
it took me a while to understand what you actually try to do here
because of the unusual way it's written as

              if (need_resched())
                          cond_resched();

which /looks/ like you are doing something fishy here. In the
end I concluded that this was probably just a misunderstanding
of what cond_resched() does.

Can you replace it with a normal

       cond_resched()

without the second need_resched() check and make sure this
still works? cond_resched() by definition performs the check
to ensure that rescheduling is needed, so unless you want to
explicitly hide the might_sleep() in it from being seen, it's
better to call that.

        Arnd

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] OP-TEE driver fix for v5.11
  2021-01-22  7:42 [GIT PULL] OP-TEE driver fix for v5.11 Jens Wiklander
  2021-01-22 14:25 ` Arnd Bergmann
@ 2021-01-22 23:00 ` patchwork-bot+linux-soc
  2021-01-25  7:21   ` Jens Wiklander
  2021-01-22 23:00 ` patchwork-bot+linux-soc
  2 siblings, 1 reply; 8+ messages in thread
From: patchwork-bot+linux-soc @ 2021-01-22 23:00 UTC (permalink / raw)
  To: Jens Wiklander; +Cc: soc

Hello:

This pull request was applied to soc/soc.git (refs/heads/arm/fixes):

On Fri, 22 Jan 2021 08:42:34 +0100 you wrote:
> Hello arm-soc maintainers,
> 
> Please pull this small patch taking care of a rcu_sched trace in some
> corner cases when OP-TEE is invoked.
> 
> Thanks,
> Jens
> 
> [...]

Here is the summary with links:
  - [GIT,PULL] OP-TEE driver fix for v5.11
    https://git.kernel.org/soc/soc/c/156d02914b7d

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] OP-TEE driver fix for v5.11
  2021-01-22  7:42 [GIT PULL] OP-TEE driver fix for v5.11 Jens Wiklander
  2021-01-22 14:25 ` Arnd Bergmann
  2021-01-22 23:00 ` patchwork-bot+linux-soc
@ 2021-01-22 23:00 ` patchwork-bot+linux-soc
  2 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+linux-soc @ 2021-01-22 23:00 UTC (permalink / raw)
  To: Jens Wiklander; +Cc: soc

Hello:

This pull request was applied to soc/soc.git (refs/heads/for-next):

On Fri, 22 Jan 2021 08:42:34 +0100 you wrote:
> Hello arm-soc maintainers,
> 
> Please pull this small patch taking care of a rcu_sched trace in some
> corner cases when OP-TEE is invoked.
> 
> Thanks,
> Jens
> 
> [...]

Here is the summary with links:
  - [GIT,PULL] OP-TEE driver fix for v5.11
    https://git.kernel.org/soc/soc/c/156d02914b7d

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] OP-TEE driver fix for v5.11
  2021-01-22 23:00 ` patchwork-bot+linux-soc
@ 2021-01-25  7:21   ` Jens Wiklander
  2021-01-25  9:30     ` Arnd Bergmann
  0 siblings, 1 reply; 8+ messages in thread
From: Jens Wiklander @ 2021-01-25  7:21 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: SoC Team

Hi Arnd,

Was this merged by mistake? You had some concerns about the need_resched() test.

Thanks,
Jens

On Sat, Jan 23, 2021 at 12:00 AM <patchwork-bot+linux-soc@kernel.org> wrote:
>
> Hello:
>
> This pull request was applied to soc/soc.git (refs/heads/arm/fixes):
>
> On Fri, 22 Jan 2021 08:42:34 +0100 you wrote:
> > Hello arm-soc maintainers,
> >
> > Please pull this small patch taking care of a rcu_sched trace in some
> > corner cases when OP-TEE is invoked.
> >
> > Thanks,
> > Jens
> >
> > [...]
>
> Here is the summary with links:
>   - [GIT,PULL] OP-TEE driver fix for v5.11
>     https://git.kernel.org/soc/soc/c/156d02914b7d
>
> You are awesome, thank you!
> --
> Deet-doot-dot, I am a bot.
> https://korg.docs.kernel.org/patchwork/pwbot.html
>
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] OP-TEE driver fix for v5.11
  2021-01-25  7:21   ` Jens Wiklander
@ 2021-01-25  9:30     ` Arnd Bergmann
  2021-01-26 20:22       ` Arnd Bergmann
  0 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2021-01-25  9:30 UTC (permalink / raw)
  To: Jens Wiklander; +Cc: SoC Team

On Mon, Jan 25, 2021 at 8:21 AM Jens Wiklander
<jens.wiklander@linaro.org> wrote:
>
> Was this merged by mistake? You had some concerns about the need_resched() test.
>

Indeed, thanks for noticing!

Could you send a fixup to remove the need_resched() check after verifying that
it works? Alternatively I can remove the patch I merged by accident and send
my next pull request without it, but I'd prefer to avoid rebasing the fixes I
merged later.

       Arnd

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] OP-TEE driver fix for v5.11
  2021-01-25  9:30     ` Arnd Bergmann
@ 2021-01-26 20:22       ` Arnd Bergmann
  2021-01-27  7:50         ` Jens Wiklander
  0 siblings, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2021-01-26 20:22 UTC (permalink / raw)
  To: Jens Wiklander; +Cc: SoC Team

On Mon, Jan 25, 2021 at 10:30 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> On Mon, Jan 25, 2021 at 8:21 AM Jens Wiklander
> <jens.wiklander@linaro.org> wrote:
> >
> > Was this merged by mistake? You had some concerns about the need_resched() test.
> >
>
> Indeed, thanks for noticing!
>
> Could you send a fixup to remove the need_resched() check after verifying that
> it works? Alternatively I can remove the patch I merged by accident and send
> my next pull request without it, but I'd prefer to avoid rebasing the fixes I
> merged later.

I need to send out the fixes branch for upstream. As it was my mistake to
merge the fix while complaining about it, and the it's also harmless, I'll
leave the version I pulled now.

It would be nice to get a follow-up in your pull request for v5.12 though.

        Arnd

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [GIT PULL] OP-TEE driver fix for v5.11
  2021-01-26 20:22       ` Arnd Bergmann
@ 2021-01-27  7:50         ` Jens Wiklander
  0 siblings, 0 replies; 8+ messages in thread
From: Jens Wiklander @ 2021-01-27  7:50 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: SoC Team

On Tue, Jan 26, 2021 at 9:22 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> On Mon, Jan 25, 2021 at 10:30 AM Arnd Bergmann <arnd@kernel.org> wrote:
> >
> > On Mon, Jan 25, 2021 at 8:21 AM Jens Wiklander
> > <jens.wiklander@linaro.org> wrote:
> > >
> > > Was this merged by mistake? You had some concerns about the need_resched() test.
> > >
> >
> > Indeed, thanks for noticing!
> >
> > Could you send a fixup to remove the need_resched() check after verifying that
> > it works? Alternatively I can remove the patch I merged by accident and send
> > my next pull request without it, but I'd prefer to avoid rebasing the fixes I
> > merged later.
>
> I need to send out the fixes branch for upstream. As it was my mistake to
> merge the fix while complaining about it, and the it's also harmless, I'll
> leave the version I pulled now.

Thanks, it seems it takes a little time to get the updating patch verified.

>
> It would be nice to get a follow-up in your pull request for v5.12 though.

I'll see to that.

Thanks,
Jens

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-01-27  7:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-22  7:42 [GIT PULL] OP-TEE driver fix for v5.11 Jens Wiklander
2021-01-22 14:25 ` Arnd Bergmann
2021-01-22 23:00 ` patchwork-bot+linux-soc
2021-01-25  7:21   ` Jens Wiklander
2021-01-25  9:30     ` Arnd Bergmann
2021-01-26 20:22       ` Arnd Bergmann
2021-01-27  7:50         ` Jens Wiklander
2021-01-22 23:00 ` patchwork-bot+linux-soc

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.