lkml.org 
[lkml]   [2003]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: more signal locking bugs?

On Sun, 16 Feb 2003, Linus Torvalds wrote:
>
> See? ABBA _does_ happen with the task lock, it's just that the magic
> required to do so is fairly unlikely thanks to the added requirement for
> the irq to happen at just the right moment (ie there are no static
> code-paths that can cause it).

Note: to clarify, this isn't in any way a new situation. As far as I can
tell, this deadlock exists in 2.4.x too. And it's almost certainly pretty
much impossible to trigger in practice, and as such we shouldn't need to
be deeply worried about it.

But it should make us think about the _design_ of locking in this region.
Clearly we got it wrong, and clearly we never noticed for several years.

The simple fix is to make the task-lock be IRQ-safe. That fixes it, and
that's probably the right minimal solution for for 2.4.x (unless the "fix"
for 2.4.x is to just ignore it since it's possible to trigger mostly in a
theoretical sense).

But assuming you accept that making the task-lock be irq-safe is the right
solution, then making it solve the signal handling and /proc scalability
issues is likely to be the right solution: since it's irq-safe, there's no
real reason not to use it to protect task->{sighand | signal | parent}
too.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.086 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site