Linux bluetooth development
 help / color / mirror / Atom feed
From: Mat Martineau <mathewm@codeaurora.org>
To: Peter Hurley <peter@hurleysoftware.com>
Cc: linux-bluetooth <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH 0/7] Fix various lost wakeups
Date: Mon, 25 Jul 2011 12:18:57 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.02.1107251205130.15852@mathewm-linux> (raw)
In-Reply-To: <1311480631.4106.25.camel@THOR>


Hi Peter -

On Sun, 24 Jul 2011, Peter Hurley wrote:

> Several kthreads, and some other functions which also wait/sleep, exhibit
> race conditions when using set_current_state(TASK_INTERRUPTIBLE). A common,
> but incorrect, usage pattern is:
>
> 1:  add_wait_queue(...);
> 2:  while (!condition) {
> 3:          set_current_state(TASK_INTERRUPTIBLE);
> 4:          do_work();
> 5:          schedule();
> 6:  }
> 7:  set current_state(TASK_RUNNING);
> 8:  remove_wait_queue(...);

<snip>

> PS - I did not fix the usage in l2cap_core.c pending if the new ERTM
> reassembly will make that work unnecessary.

I think your fix is needed in l2cap_core.c.  ERTM reassembly (and 
other pending changes) won't be modifying that code.

Thanks,

--
Mat Martineau
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum


      reply	other threads:[~2011-07-25 19:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-24  4:10 [PATCH 0/7] Fix various lost wakeups Peter Hurley
2011-07-25 19:18 ` Mat Martineau [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.DEB.2.02.1107251205130.15852@mathewm-linux \
    --to=mathewm@codeaurora.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=peter@hurleysoftware.com \
    /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