[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BLU436-SMTP233624CAE8A4C054B5DFFF8B9490@phx.gbl>
Date: Sun, 4 Oct 2015 12:55:29 +0800
From: Chen Gang <xili_gchen_5257@...mail.com>
To: Richard Weinberger <richard.weinberger@...il.com>
CC: Andrew Morton <akpm@...ux-foundation.org>,
"kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
"riel@...hat.com" <riel@...hat.com>, Michal Hocko <mhocko@...e.cz>,
"oleg@...hat.com" <oleg@...hat.com>,
"asha.levin@...cle.com" <asha.levin@...cle.com>,
"pfeiner@...gle.com" <pfeiner@...gle.com>,
"aarcange@...hat.com" <aarcange@...hat.com>,
"vishnu.ps@...sung.com" <vishnu.ps@...sung.com>,
Linux Memory <linux-mm@...ck.org>,
kernel mailing list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm/mmap.c: Remove redundant vma looping
On 10/4/15 04:09, Richard Weinberger wrote:
> With that change you're reintroducing an issue.
> Please see:
> commit 7cd5a02f54f4c9d16cf7fdffa2122bc73bb09b43
> Author: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Date: Mon Aug 11 09:30:25 2008 +0200
>
> mm: fix mm_take_all_locks() locking order
>
> Lockdep spotted:
>
> =======================================================
> [ INFO: possible circular locking dependency detected ]
> 2.6.27-rc1 #270
> -------------------------------------------------------
> qemu-kvm/2033 is trying to acquire lock:
> (&inode->i_data.i_mmap_lock){----}, at: [<ffffffff802996cc>]
> mm_take_all_locks+0xc2/0xea
>
> but task is already holding lock:
> (&anon_vma->lock){----}, at: [<ffffffff8029967a>]
> mm_take_all_locks+0x70/0xea
>
> which lock already depends on the new lock.
>
Oh, really. Thanks.
>
> git blame often explains funky code. :-)
>
Next, I shall check the git log before make patches, each time. :-)
Theoretically, the lock and unlock need to be symmetric, if we have to
lock f_mapping all firstly, then lock all anon_vma, probably, we also
need to unlock anon_vma all, then unlock all f_mapping.
Thanks.
--
Chen Gang (陈刚)
Open, share, and attitude like air, water, and life which God blessed
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists