From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f43.google.com ([74.125.83.43]:35659 "EHLO mail-pg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752263AbeFFSV3 (ORCPT ); Wed, 6 Jun 2018 14:21:29 -0400 MIME-Version: 1.0 In-Reply-To: References: From: Cong Wang Date: Wed, 6 Jun 2018 11:21:07 -0700 Message-ID: Subject: Re: general protection fault in sockfs_setattr To: shankarapailoor , linux-fsdevel Cc: David Miller , LKML , syzkaller , Linux Kernel Network Developers Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Jun 5, 2018 at 7:19 PM, shankarapailoor 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..