Skip to content

[BUG] [spinlock] spin_lock should imply sched_lock to avoid dead lock #16107

Open
@jinliangli

Description

@jinliangli

Description / Steps to reproduce the issue

Task A takes a spinlock, however it may still preempted by higher priority task, that's very dangerous! If the higher priority task acquire the same spinlock, then dead lock occurs.

spin_lock api behave like linux's spinlock, that imply preempt_disable. That's different api with spin_lock_irqsave.

If there are no objections, I will fix this bug.

On which OS does this issue occur?

[OS: Linux]

What is the version of your OS?

ubuntu 20.04

NuttX Version

master

Issue Architecture

[Arch: arm], [Arch: all]

Issue Area

[Area: Kernel]

Host information

No response

Verification

  • I have verified before submitting the report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Arch: allIssues that apply to all architecturesArch: armIssues related to ARM (32-bit) architectureArea: KernelKernel issuesOS: LinuxIssues related to Linux (building system, etc)Type: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions