[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1911201313480.1498-100000@iolanthe.rowland.org>
Date: Wed, 20 Nov 2019 13:18:07 -0500 (EST)
From: Alan Stern <stern@...land.harvard.edu>
To: Pete Zaitcev <zaitcev@...hat.com>
cc: syzbot <syzbot+56f9673bb4cdcbeb0e92@...kaller.appspotmail.com>,
<arnd@...db.de>, <gregkh@...uxfoundation.org>,
<jrdr.linux@...il.com>, <keescook@...omium.org>,
<kstewart@...uxfoundation.org>,
Kernel development list <linux-kernel@...r.kernel.org>,
USB list <linux-usb@...r.kernel.org>,
<syzkaller-bugs@...glegroups.com>, <tglx@...utronix.de>,
<viro@...iv.linux.org.uk>
Subject: Re: possible deadlock in mon_bin_vma_fault
On Wed, 20 Nov 2019, Pete Zaitcev wrote:
> On Wed, 20 Nov 2019 11:14:05 -0500 (EST)
> Alan Stern <stern@...land.harvard.edu> wrote:
>
> > As it happens, I spent a little time investigating this bug report just
> > yesterday. It seems to me that the easiest fix would be to disallow
> > resizing the buffer while it is mapped by any users. (Besides,
> > allowing that seems like a bad idea in any case.)
> >
> > Pete, does that seem reasonable to you?
>
> Actually, please hold on a little, I think to think more about this.
> The deadlock is between mon_bin_read and mon_bin_vma_fault.
> To disallow resizing isn't going to fix _that_.
As I understand it (and my understanding is pretty limited, since I
only started to look seriously at the code one day ago), the reason why
mon_bin_vma_fault acquires fetch_lock is to prevent a resize from
happening while the fault is being handled. Is there another reason?
If you disallow resizing while the buffer is mapped then
mon_bin_vma_fault won't need to hold fetch_lock at all. That would fix
the deadlock, right?
Alan Stern
Powered by blists - more mailing lists