public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Righi <righi.andrea@gmail.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Dave Jones <davej@redhat.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: .29rc2 lockdep report. fb_mmap vs sys_mmap2
Date: Sun, 18 Jan 2009 20:21:45 +0100	[thread overview]
Message-ID: <49738149.5080200@gmail.com> (raw)
In-Reply-To: <20090118020038.GA17489@cmpxchg.org>

On 2009-01-18 03:00, Johannes Weiner wrote:
> On Sat, Jan 17, 2009 at 06:19:25PM -0500, Dave Jones wrote:
>> Two mmaps enter! Fight!
>>
>>
>>  =======================================================
>>  [ INFO: possible circular locking dependency detected ]
>>  2.6.29-0.41.rc2.fc11.i686 #1
>>  -------------------------------------------------------
>>  plymouthd/669 is trying to acquire lock:
>>  (&fb_info->lock){--..}, at: [<c055355c>] fb_mmap+0x87/0x156
>>
>>  but task is already holding lock:
>>  (&mm->mmap_sem){----}, at: [<c0406a5d>] sys_mmap2+0x44/0x7b
>>
>>  which lock already depends on the new lock.
>>
>>
>>  the existing dependency chain (in reverse order) is:
>>
>>  -> #1 (&mm->mmap_sem){----}:
>>        [<c044fef3>] __lock_acquire+0x9af/0xb22
>>        [<c04500c1>] lock_acquire+0x5b/0x81
>>        [<c048e036>] might_fault+0x60/0x80
>>        [<c053dedc>] copy_to_user+0x2c/0xfc
>>        [<c05542cc>] fb_ioctl+0x247/0x338
>>        [<c04b0c9f>] vfs_ioctl+0x22/0x69
>>        [<c04b1214>] do_vfs_ioctl+0x46a/0x4a3
>>        [<c04b128d>] sys_ioctl+0x40/0x5a
>>        [<c0403b76>] syscall_call+0x7/0xb
>>        [<ffffffff>] 0xffffffff
>>
>>  -> #0 (&fb_info->lock){--..}:
>>        [<c044fdc8>] __lock_acquire+0x884/0xb22
>>        [<c04500c1>] lock_acquire+0x5b/0x81
>>        [<c06e1b98>] __mutex_lock_common+0xd5/0x329
>>        [<c06e1e84>] mutex_lock_nested+0x2e/0x36
>>        [<c055355c>] fb_mmap+0x87/0x156
>>        [<c0494620>] mmap_region+0x22b/0x43c
>>        [<c0494aa2>] do_mmap_pgoff+0x271/0x2d1
>>        [<c0406a73>] sys_mmap2+0x5a/0x7b
>>        [<c0403b76>] syscall_call+0x7/0xb
>>        [<ffffffff>] 0xffffffff
>>
>>  other info that might help us debug this:
>>
>>  1 lock held by plymouthd/669:
>>  #0:  (&mm->mmap_sem){----}, at: [<c0406a5d>] sys_mmap2+0x44/0x7b
>>
>>  stack backtrace:
>>  Pid: 669, comm: plymouthd Not tainted 2.6.29-0.41.rc2.fc11.i686 #1
>>  Call Trace:
>>  [<c06e09b6>] ? printk+0xf/0x11
>>  [<c044f32d>] print_circular_bug_tail+0x5d/0x68
>>  [<c044fdc8>] __lock_acquire+0x884/0xb22
>>  [<c04500c1>] lock_acquire+0x5b/0x81
>>  [<c055355c>] ? fb_mmap+0x87/0x156
>>  [<c06e1b98>] __mutex_lock_common+0xd5/0x329
>>  [<c055355c>] ? fb_mmap+0x87/0x156
>>  [<c06e1e84>] mutex_lock_nested+0x2e/0x36
>>  [<c055355c>] ? fb_mmap+0x87/0x156
>>  [<c055355c>] fb_mmap+0x87/0x156
>>  [<c0494620>] mmap_region+0x22b/0x43c
>>  [<c0494aa2>] do_mmap_pgoff+0x271/0x2d1
>>  [<c0406a73>] sys_mmap2+0x5a/0x7b
>>  [<c0403b76>] syscall_call+0x7/0xb
> 
> I reported this one already some time ago [1], Andrea Righi [cc'd]
> also had a fix [2] but it seemed to not have made it in.  Andrea,
> perhaps you can resend it?
> 
> 	Hannes
> 
> [1] http://lkml.org/lkml/2008/10/22/759
> [2] http://lkml.org/lkml/2008/10/28/377

Sure, I can resend it soon, after a test.

-Andrea

  reply	other threads:[~2009-01-18 19:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-17 23:19 .29rc2 lockdep report. fb_mmap vs sys_mmap2 Dave Jones
2009-01-18  2:00 ` Johannes Weiner
2009-01-18 19:21   ` Andrea Righi [this message]
2009-01-18 20:17   ` [PATCH] fbmem: fix copy_from/to_user() with mutex held Andrea Righi
2009-01-19  7:54     ` Johannes Weiner
2009-01-19  7:58     ` Stefan Richter
2009-01-19  8:05       ` Stefan Richter
2009-01-19  8:10         ` Harvey Harrison
2009-01-19  8:29           ` Andrea Righi

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=49738149.5080200@gmail.com \
    --to=righi.andrea@gmail.com \
    --cc=davej@redhat.com \
    --cc=hannes@cmpxchg.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox