linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: <linux-wireless@vger.kernel.org>, <ath6kl-devel@qualcomm.com>
Subject: Re: [PATCH] ath6kl: Use a mutex_lock to avoid race in diabling and handling irq
Date: Mon, 9 Jan 2012 20:24:57 +0530	[thread overview]
Message-ID: <20120109145455.GA14892@chvasanth-lnx> (raw)
In-Reply-To: <4F0AF830.9000506@qca.qualcomm.com>

On Mon, Jan 09, 2012 at 04:22:40PM +0200, Kalle Valo wrote:
> On 01/04/2012 12:27 PM, Vasanthakumar Thiagarajan wrote:
> > Currently this race is handled but in a messy way an atomic
> > variable is being checked in a loop which sleeps upto ms
> > in every iteration. Remove this logic and use a mutex
> > to make sure irq is not disabled when irq handling is in
> > progress.
> > 
> > Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
> 
> Thanks, applied.
> 
> There is one race, though. It's possible that the irq handler is
> executed once after the interrupts are disabled. Do we care about that?

I don't think so, we read interrupt status only when the interrupts
are enabled by checking dev->irq_en_reg.int_status_en in
proc_pending_irqs(), so it is already taken care.

Vasanth

      reply	other threads:[~2012-01-09 14:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-04 10:27 [PATCH] ath6kl: Use a mutex_lock to avoid race in diabling and handling irq Vasanthakumar Thiagarajan
2012-01-04 18:30 ` David Miller
2012-01-09 14:22 ` Kalle Valo
2012-01-09 14:54   ` Vasanthakumar Thiagarajan [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=20120109145455.GA14892@chvasanth-lnx \
    --to=vthiagar@qca.qualcomm.com \
    --cc=ath6kl-devel@qualcomm.com \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@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;
as well as URLs for NNTP newsgroup(s).