netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: shyam.iyer.t@gmail.com
Cc: netdev@vger.kernel.org, rmody@brocade.com, ddutt@brocade.com,
	huangj@brocade.com, ivecera@redhat.com, shyam_iyer@dell.com
Subject: Re: [PATCH] [net][bna] Separate handling of irq type flags variable from the irq_flags request_irq variable
Date: Fri, 15 Jul 2011 08:09:38 -0700 (PDT)	[thread overview]
Message-ID: <20110715.080938.2283275421111060023.davem@davemloft.net> (raw)
In-Reply-To: <1310691632-22914-1-git-send-email-shyam_iyer@dell.com>

From: Shyam Iyer <shyam.iyer.t@gmail.com>
Date: Thu, 14 Jul 2011 21:00:32 -0400

> Commit 5f77898de17ff983ff0e2988b73a6bdf4b6f9f8b does not completely fix the problem of handling allocations with irqs disabled..
> The below patch on top of it fixes the problem completely.
> 
> Based on review by "Ivan Vecera" <ivecera@redhat.com>..
> "
> Small note, the root of the problem was that non-atomic allocation was requested with IRQs disabled. Your patch description does not contain wwhy were the IRQs disabled.
> 
> The function bnad_mbox_irq_alloc incorrectly uses 'flags' var for two different things, 1) to save current CPU flags and 2) for request_irq
> call.
> First the spin_lock_irqsave disables the IRQs and saves _all_ CPU flags (including one that enables/disables interrupts) to 'flags'. Then the 'flags' is overwritten by 0 or 0x80 (IRQF_SHARED). Finally the spin_unlock_irqrestore should restore saved flags, but these flags are now either 0x00 or 0x80. The interrupt bit value in flags register on x86 arch is 0x100.
> This means that the interrupt bit is zero (IRQs disabled) after spin_unlock_irqrestore so the request_irq function is called with disabled interrupts.
> "
> 
> Signed-off-by: Shyam Iyer <shyam_iyer@dell.com>

Applied.

      parent reply	other threads:[~2011-07-15 15:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-15  1:00 [PATCH] [net][bna] Separate handling of irq type flags variable from the irq_flags request_irq variable Shyam Iyer
2011-07-15  6:35 ` Ivan Vecera
2011-07-15 15:09 ` David Miller [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=20110715.080938.2283275421111060023.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ddutt@brocade.com \
    --cc=huangj@brocade.com \
    --cc=ivecera@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=rmody@brocade.com \
    --cc=shyam.iyer.t@gmail.com \
    --cc=shyam_iyer@dell.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;
as well as URLs for NNTP newsgroup(s).