[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 6 Jun 2018 11:21:07 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: shankarapailoor <shankarapailoor@...il.com>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>
Cc: David Miller <davem@...emloft.net>,
LKML <linux-kernel@...r.kernel.org>,
syzkaller <syzkaller@...glegroups.com>,
Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: general protection fault in sockfs_setattr
On Tue, Jun 5, 2018 at 7:19 PM, shankarapailoor
<shankarapailoor@...il.com> wrote:
> Hi Cong,
>
> I added that check and it seems to stop the crash. Like you said, I
> don't see where the reference count for the file is increased. The
> inode lock also seems to be held during this call.
I know inode lock is held for ->setattr(), but not for ->release(), this
is why I suspect sock_close() could still race with sockfs_setattr()
after my patch.
I am not sure if it is crazy to just hold fd refcnt for fchmodat() too..
Powered by blists - more mailing lists