lkml.org 
[lkml]   [2011]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: Question about clearing of tsk->robust_list in clone
On Tue, 15 Feb 2011, Thomas Gleixner wrote:

> The sanity checks in exit_robust_list will catch that mutex_1
> owner is not matching, but that makes it not more correct.

Yes, that's my remaining question: whether the intention was that the
owner filter would often be preventing erroneous unlocks, or whether
there should never be an inappropriate list in normal usage. The owner
check does seem sufficient to prevent mayhem if the list pointer is
copied to the child.

On Tue, 15 Feb 2011, Peter Zijlstra wrote:

> Realistically libpthread should register an on_fork() callback to
> ensure the state is properly propagated.

Agreed, that seems reasonable, with only the minor impact of an
additional set_robust_list call. That resolves this as a libc issue,
not a kernel issue.

- Kenneth



\
 
 \ /
  Last update: 2011-02-16 00:05    [W:0.078 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site