public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Chris Friesen" <cfriesen@nortel.com>
To: Linux kernel <linux-kernel@vger.kernel.org>
Subject: BUG?  possible race between tasklet_action and tasklet_kill
Date: Fri, 11 Sep 2009 11:00:03 -0600	[thread overview]
Message-ID: <4AAA8213.8070008@nortel.com> (raw)

I think I may have discovered a race between tasklet_action and
tasklet_kill.  Given how long this code has been around, I assume that
I'm simply not understanding the purposes of tasklet_kill correctly, but
it seems like there's a mechanism whereby we could hit the BUG path in
tasklet_action().

cpu A                             cpu B
starts tasklet_kill()
does while loop until
  TASKLET_STATE_SCHED not set
                                  runs tasklet_schedule()
                                  starts tasklet_action()
tasklet_unlock_wait()
                                  if (tasklet_trylock(t)) {
clear_bit(TASKLET_STATE_SCHED)
                                  test_and_clear_bit(TASKLET_STATE_SCHED
                                  BUG


Is this a valid issue, or is this an improper usage pattern somehow?

Thanks,

Chris

                 reply	other threads:[~2009-09-11 17:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4AAA8213.8070008@nortel.com \
    --to=cfriesen@nortel.com \
    --cc=linux-kernel@vger.kernel.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