All of lore.kernel.org
 help / color / mirror / Atom feed
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] Do not call flush_cache_user_range with mmap_sem held
Date: Mon, 5 Sep 2011 12:21:55 +0100	[thread overview]
Message-ID: <20110905112155.GF3269@e102109-lin.cambridge.arm.com> (raw)
In-Reply-To: <CACrgxGB16ibPARkf8TN4S47vOZwm+W2pBJyEj=e+F0uFK5NjmA@mail.gmail.com>

On Fri, Aug 26, 2011 at 08:32:28AM +0100, Jiejing.Zhang  wrote:
> I met this issue on our development board: iMX53 + 2.6.35.2 Kernel,
> this is stack trace when the dead lock happens.
> 
> You can see the hung task are dead lock at __read_lock(), after I add
> more debug message and dump the hung task's stack trace.
> 
> After apply this patch, the hung is gong.

Russell doesn't agree with the original patch, so we have to live with
this dead-lock in mainline :(. From my perspective, it is a perfectly
valid patch and there is no race. I'll keep it in my trees for now.

If a user space app is so badly written that it calls the cache flushing
function while remapping the same memory range from a different thread,
it deserve some failures. But even then, the cache flushing function is
simply cleaning the D-cache which is a safe operation (as compared to
invalidation).

For reference, that's the original post:

http://article.gmane.org/gmane.linux.ports.arm.kernel/99356

-- 
Catalin

  reply	other threads:[~2011-09-05 11:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-14  4:57 [PATCH 0/4][RFC] Trivial ARM related Android patches John Stultz
2010-12-14  4:57 ` [PATCH 1/4] avoid mis-detecting some V7 cores in the decompressor John Stultz
2010-12-14  4:57 ` [PATCH 2/4] Optionally flush entire dcache from v6_dma_flush_range John Stultz
2010-12-14  9:30   ` Russell King - ARM Linux
2010-12-14 10:58   ` Catalin Marinas
2010-12-14  4:57 ` [PATCH 3/4] process: Add display of memory around registers when displaying regs John Stultz
2010-12-14  9:34   ` Russell King - ARM Linux
2010-12-14  4:57 ` [PATCH 4/4] Do not call flush_cache_user_range with mmap_sem held John Stultz
2010-12-14  9:30   ` Russell King - ARM Linux
2010-12-14 17:51     ` Catalin Marinas
2010-12-14 19:05       ` Russell King - ARM Linux
2010-12-14 21:08         ` Catalin Marinas
2011-04-04 13:27           ` Catalin Marinas
2011-04-04 13:37             ` Russell King - ARM Linux
2011-04-04 13:43               ` Catalin Marinas
2011-08-26  7:32                 ` Jiejing.Zhang 
2011-09-05 11:21                   ` Catalin Marinas [this message]
2010-12-14 18:18   ` Catalin Marinas

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=20110905112155.GF3269@e102109-lin.cambridge.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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.