public inbox for ecos-bugs@sourceware.org help / color / mirror / Atom feed
From: bugzilla-daemon@bugs.ecos.sourceware.org To: unassigned@bugs.ecos.sourceware.org Subject: [Bug 1001982] New: scheduler must be unlocked atomically on thread_entry (in SMP systems) Date: Fri, 09 May 2014 11:48:00 -0000 [thread overview] Message-ID: <bug-1001982-777@http.bugs.ecos.sourceware.org/> (raw) Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001982 Bug ID: 1001982 Summary: scheduler must be unlocked atomically on thread_entry (in SMP systems) Product: eCos Version: 3.0 Target: All Architecture/Host All OS: Status: UNCONFIRMED Severity: critical Priority: low Component: Kernel Assignee: unassigned@bugs.ecos.sourceware.org Reporter: christoph.borchert@tu-dortmund.de CC: ecos-bugs@ecos.sourceware.org Created attachment 2507 --> http://bugs.ecos.sourceware.org/attachment.cgi?id=2507&action=edit patch Dear eCos developers, on thread startup, the scheduler lock gets unlocked in a loop, testing the lock status in each loop iteration: while( get_sched_lock() != 0 ) unlock(); On an SMP system (or any other multi-core system), this piece of code is not valid. Once the lock reaches zero, it could be taken immediately by another CPU. In such a case, one CPU decrements the scheduler lock held by another CPU - eventually corrupting kernel data or crashing the system. Attached is a patch that solves this issue (and which is still valid for single-core systems). Best regards, Christoph -- You are receiving this mail because: You are the assignee for the bug.
next reply other threads:[~2014-05-09 11:48 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-05-09 11:48 bugzilla-daemon [this message] 2014-05-09 11:48 bugzilla-daemon
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-1001982-777@http.bugs.ecos.sourceware.org/ \ --to=bugzilla-daemon@bugs.ecos.sourceware.org \ --cc=unassigned@bugs.ecos.sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).