mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: "Kenneth Albanowski (Palm GBU)" <Kenneth.Albanowski@palm.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Jakub Jelinek <jakub@redhat.com>,
	Andreas Schwab <schwab@linux-m68k.org>
Subject: RE: Question about clearing of tsk->robust_list in clone
Date: Wed, 16 Feb 2011 00:01:24 +0100 (CET)	[thread overview]
Message-ID: <alpine.LFD.2.00.1102152354070.26192@localhost6.localdomain6> (raw)
In-Reply-To: <23C1F4DA0B73684F85AD25A73E4BB50315252C50@ushqwmb09>

On Tue, 15 Feb 2011, Kenneth Albanowski (Palm GBU) wrote:

> 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.

It's task state, so we cannot keep state around which belongs to some
other task. 

Of course we have nevertheless sanity checks in place as we have no
idea what kind of crap user space hands us as "robust_list" pointer.

Ideally we never need to walk that list at all in the normal exit
case when user space behaves nicely.
 
> 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.

As I said, I don't understand that argument of the additional call at
all. We do it on every process start and on every pthread_create
already, just fork() was forgotten somehow.

Thanks,

	tglx

      reply	other threads:[~2011-02-15 23:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-15  6:43 Kenneth Albanowski (Palm GBU)
2011-02-15 13:16 ` Thomas Gleixner
2011-02-15 14:00   ` Peter Zijlstra
2011-02-15 14:19     ` Thomas Gleixner
2011-02-15 22:51   ` Kenneth Albanowski (Palm GBU)
2011-02-15 23:01     ` Thomas Gleixner [this message]

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=alpine.LFD.2.00.1102152354070.26192@localhost6.localdomain6 \
    --to=tglx@linutronix.de \
    --cc=Kenneth.Albanowski@palm.com \
    --cc=jakub@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=schwab@linux-m68k.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: link
Be 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

all inboxes | Powered by JetHome®