All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <roland@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Joerg Roedel <joerg.roedel@amd.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dma-debug: Fix deadlock with netconsole or other drivers that use the DMA API
Date: Thu, 19 Apr 2012 16:36:56 -0700	[thread overview]
Message-ID: <CAL1RGDXQ9NPKaNxBcNAYKknpSSScwXVa+gr8jXOFFU4ZjjSJ=A@mail.gmail.com> (raw)
In-Reply-To: <20120419114811.9e77accb.akpm@linux-foundation.org>

On Thu, Apr 19, 2012 at 11:48 AM, Andrew Morton
<akpm@linux-foundation.org> wrote:
> So *any* printk can deadlock if free_entries_lock is held and
> global_disable==false?

apparently.

> In that case we're going to need much sterner fixes.  Any list_head
> operation can do a printk if list_head debugging is enabled.
> dma_debug_resize_entries() does a kfree() under free_entries_lock(!).
>
> Methinks we need a more general fix?

sigh... no good deed goes unpunished.

OK, will look at it.  Just to make things even more fun, all the
err_printk() stuff can potentially deadlock on the hash bucket
lock, although that requires enough bad luck a collision to happen.

 - R.

  reply	other threads:[~2012-04-19 23:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-19 18:12 [PATCH] dma-debug: Fix deadlock with netconsole or other drivers that use the DMA API Roland Dreier
2012-04-19 18:48 ` Andrew Morton
2012-04-19 23:36   ` Roland Dreier [this message]
2012-04-19 23:50     ` Andrew Morton
2012-04-20 11:22   ` Joerg Roedel

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='CAL1RGDXQ9NPKaNxBcNAYKknpSSScwXVa+gr8jXOFFU4ZjjSJ=A@mail.gmail.com' \
    --to=roland@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=joerg.roedel@amd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.