mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nikita Danilov <Nikita@Namesys.COM>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linux Kernel Mailing List <Linux-Kernel@Vger.Kernel.ORG>
Subject: Re: kernel thread exit race
Date: Wed, 7 Aug 2002 14:05:22 +0400	[thread overview]
Message-ID: <15696.61666.452460.264138@laputa.namesys.com> (raw)
In-Reply-To: <1028719111.18156.227.camel@irongate.swansea.linux.org.uk>

Alan Cox writes:
 > 
 > On Wed, 2002-08-07 at 10:22, Nikita Danilov wrote:
 > > Hello,
 > > 
 > > what is the politically correct way to exit from a kernel thread daemon
 > > without module unload races?
 > 
 > You probably want to use completions. There is a function in the kernel
 > core "complete_and_exit" which does both the complete() and then the
 > exit() so that after complete finishes the task will not re-enter
 > modulespace and risk an unload race
 > 

Ah I see, thank you and Russell. But this depends on no architecture
ever accessing spinlock data after letting waiters to run, otherwise
there still is (tiny) window for race at the end of complete() call,
right?

 > 

Nikita.

  reply	other threads:[~2002-08-07 10:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-07  9:22 Nikita Danilov
2002-08-07  9:38 ` Russell King
2002-08-07 11:18 ` Alan Cox
2002-08-07 10:05   ` Nikita Danilov [this message]
2002-08-07 12:11     ` Alan Cox
2002-08-07 11:30       ` Nikita Danilov
2002-08-07 12:12         ` Russell King
2002-08-07 13:22         ` Alan Cox

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=15696.61666.452460.264138@laputa.namesys.com \
    --to=nikita@namesys.com \
    --cc=Linux-Kernel@Vger.Kernel.ORG \
    --cc=alan@lxorguk.ukuu.org.uk \
    /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®