From: Andrew Morton <akpm@linux-foundation.org>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: linux-mm@kvack.org,
Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.23-rc4-mm1: deadlock while mmaping video device
Date: Thu, 13 Sep 2007 04:47:26 -0700 [thread overview]
Message-ID: <20070913044726.1aa48f45.akpm@linux-foundation.org> (raw)
In-Reply-To: <46E9226F.9010700@gmail.com>
On Thu, 13 Sep 2007 13:43:43 +0200 Jiri Slaby <jirislaby@gmail.com> wrote:
> Hi,
>
> I have this circular lock dependency on 2.6.23-rc4-mm1 when opening
> /dev/video0 and mmaping it. the v4l driver is stk11xx:
> http://www.fi.muni.cz/~xslaby/sklad/panics/mm-deadlock.png
>
> Using slub on x86_64 if that matters.
>
> For now, I'm unable to set up a netconsole, so only the picture linked above
> is the best I have.
>
oop, I think you'll want this:
--- a/mm/memory.c~memory-controller-memory-accounting-v7-fix
+++ a/mm/memory.c
@@ -1135,7 +1135,7 @@ static int insert_page(struct mm_struct
{
int retval;
pte_t *pte;
- spinlock_t *ptl;
+ spinlock_t *ptl;
retval = mem_container_charge(page, mm);
if (retval)
@@ -1160,6 +1160,7 @@ static int insert_page(struct mm_struct
set_pte_at(mm, addr, pte, mk_pte(page, prot));
retval = 0;
+ pte_unmap_unlock(pte, ptl);
return retval;
out_unlock:
pte_unmap_unlock(pte, ptl);
@@ -2184,8 +2185,8 @@ static int do_anonymous_page(struct mm_s
if (!page)
goto oom;
- if (mem_container_charge(page, mm))
- goto oom_free_page;
+ if (mem_container_charge(page, mm))
+ goto oom_free_page;
entry = mk_pte(page, vma->vm_page_prot);
entry = maybe_mkwrite(pte_mkdirty(entry), vma);
_
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2007-09-13 11:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-13 11:43 Jiri Slaby
2007-09-13 11:47 ` Andrew Morton [this message]
2007-09-13 12:29 ` Jiri Slaby
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=20070913044726.1aa48f45.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=jirislaby@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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