mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier.adi@gmail.com>
To: Michael Hennerich <michael.hennerich@analog.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org,
	Linux Kernlel Mailing List <linux-kernel@vger.kernel.org>,
	Alexander Strakh <strakh@ispras.ru>,
	uclinux-dist-devel <uclinux-dist-devel@blackfin.uclinux.org>
Subject: Re: [BUG] znet.c sleeping function called from invalid context
Date: Wed, 7 Oct 2009 14:44:45 -0400	[thread overview]
Message-ID: <8bd0f97a0910071144k1d0bf30bv60656181edae8af7@mail.gmail.com> (raw)
In-Reply-To: <200910071847.38163.strakh@ispras.ru>

On Wed, Oct 7, 2009 at 14:47, Alexander Strakh wrote:
>        KERNEL_VERSION: 2.6.31
>        DESCRIBE:
> Driver drivers/net/znet.c might sleep in atomic context, because it calls
> free_dma under claim_dma_lock:
>
> .drivers/net/znet.c:
>  168 static int znet_request_resources (struct net_device *dev)
> ...
>  189        flags = claim_dma_lock();
>  190        free_dma (znet->tx_dma);
>  191        release_dma_lock (flags);
> ...
>
> Path to might_sleep macro from znet_request_resources:
> 1. znet_request_resources calls free_dma at
> arch/blackfin/kernel/bfin_dma_5xx.c:181
> 2. free_dma calls arch/blackfin/kernel/bfin_dma_5xx.c:195

i dont think we need the dmalock mutex.  it's only used to protect
read/writes to .chan_status, and that should be atomic already.
-mike

  reply	other threads:[~2009-10-07 18:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-07 18:47 Alexander Strakh
2009-10-07 18:44 ` Mike Frysinger [this message]
2009-10-08  5:15   ` David Miller

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=8bd0f97a0910071144k1d0bf30bv60656181edae8af7@mail.gmail.com \
    --to=vapier.adi@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.hennerich@analog.com \
    --cc=netdev@vger.kernel.org \
    --cc=strakh@ispras.ru \
    --cc=uclinux-dist-devel@blackfin.uclinux.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

all inboxes | Powered by JetHome®