Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1790871imu; Thu, 22 Nov 2018 23:47:32 -0800 (PST) X-Google-Smtp-Source: AFSGD/V0KCbPGdsL3J41G3xHq1PwPFbYDSBr/sLDql+jx0lfgsR78DR1xgwgQIoTu6TfdIYr7k99 X-Received: by 2002:a63:6205:: with SMTP id w5mr13083030pgb.53.1542959252071; Thu, 22 Nov 2018 23:47:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542959252; cv=none; d=google.com; s=arc-20160816; b=JMif66TybsvHN6XaPx0+SYItwPJXrRdrCxRnxXmKKK/6ZSh9WfxhulDwmsV0stOR+f 2uxUGjP36zJXhF+yJVDIkO79UE0lq+zEJ0N9NaA7e+RFEZ7h/UPXbyk6aOyre3sqBG97 kYn+9QdG1gIpG9xY48eEfHidEFJW6vJgaz74r9LLMDVvZyOZ/IJvWb7XbMnw/j5MupPU 1nIT5XFwz8/HebA7B2B9/akcruTpeVNs39BdvUbdayN3FH8fud0wfwjuIO1OJ20fWiSJ GhiEnKmIp8PMPlK8JItplBfn62CiedNomKlrmmG02+jf2REYEkzyWtgA1WbJ5gXdAulu TH6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=yXnqHa/rXlk/USgNZGU7Vkeor6TAXn/UCV2g1aq79j8=; b=kEBQFdNMTvVmDfweDa5D5T6Sz4Ut+8FtAeTknIquVYAhRylf44ccjw9tshA5P06j/A nQ78cXZVtV4wVg6cXoh5Hfh3bnOQ8SH0Wvvt7ydgodIeCL/kC3HsdP09fZ0jMVGBRftv 7YreYG8W4mqve1HBuVx1ckH1RWAhKLl3m2QJS9DBdnFn44LgfA/1hSrXbQzNwIQu6wkr 9/yiehPHdFkAj5iZMiWYI0Mr4fkCUBD/bIZM/2Bv+6rlIo0opaA0VgRe4YZQ8Aq98DRJ oHJ3lnoGMrF4k/bpt5f00FOS/eyWInfU+n8NbIYOmrYyS70dtG/nWmtTG9HWQGZ6Xptp 2xMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=MIkl0Rat; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s125si24084649pfc.60.2018.11.22.23.47.14; Thu, 22 Nov 2018 23:47:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=MIkl0Rat; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390172AbeKVT7r (ORCPT + 99 others); Thu, 22 Nov 2018 14:59:47 -0500 Received: from mail-io1-f67.google.com ([209.85.166.67]:40215 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731883AbeKVT7q (ORCPT ); Thu, 22 Nov 2018 14:59:46 -0500 Received: by mail-io1-f67.google.com with SMTP id n9so6134152ioh.7 for ; Thu, 22 Nov 2018 01:21:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yXnqHa/rXlk/USgNZGU7Vkeor6TAXn/UCV2g1aq79j8=; b=MIkl0Rat01cnIvTtP6iLXLIAHP2C2cErDocaEiTlFGkgeF637k0X6xBnHNyKAPO0AL DG/rLHAOY8ordAzxg4dIP42cFNm+pjyxXnsUoXMLe6oEhesOtwJmhyYInCc/1lIqayjd cNEPxe8coXlwStZN5wK3i1BGu5sMch63F6QAc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yXnqHa/rXlk/USgNZGU7Vkeor6TAXn/UCV2g1aq79j8=; b=uQ0obmy+dg9NQ7Y3BOypWNMkYfthZz7FH1+JXyfxpJ2pfGfWjQIz8H127/X4XVj1ky 2CdC0FBHUc0nhkjJCLQGG9gFfQxuNlzKaJfCsOP7X0iNMDWX2Ps5UMEUXCJlp2CGijx8 2AQlqSQ+6uVaf/sd/lnR6JHz/1ftWE4+5t9Q7EW38+bB0UfMgW5v1OIOw7xrFUmdLS4v zKoRRSobdL9WWn3+6PRkNxofel2aFu7IESXD9RbSOLbWafU9ET5cAbd3HSx8PHzfiloR g5kOpD3zyZT1zhBBfdmZD0U9sbYP9v0Wkbv0Sk38o1ZayTxPxp6GH2n4tnWOJiIEQ1F2 kSAg== X-Gm-Message-State: AA+aEWbGFcvjBTkNqJMyKCIM75cf+Hyrbu76ybTH6859LkS1hj9dSKNc YikLZp1mzLjdL12U8+E1Z2d97HS3xuBblj1tQDWwCg== X-Received: by 2002:a5e:8b05:: with SMTP id g5mr6412154iok.144.1542878468713; Thu, 22 Nov 2018 01:21:08 -0800 (PST) MIME-Version: 1.0 References: <20181121231827.GA9573@myunghoj-Precision-5530> In-Reply-To: <20181121231827.GA9573@myunghoj-Precision-5530> From: Miklos Szeredi Date: Thu, 22 Nov 2018 10:20:56 +0100 Message-ID: Subject: Re: [PATCH] fuse: Add bad inode check in fuse_destroy_inode() To: mhjungk@gmail.com Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 22, 2018 at 12:18 AM Myungho Jung wrote: > > make_bad_inode() sets inode->i_mode to S_IFREG if I/O error is detected > in fuse_do_getattr()/fuse_do_setattr(). If the inode is not a regular > file, write_files and queued_writes in fuse_inode are not initialized > and have NULL or invalid pointers written by other members in a union. > So, list_empty() returns false in fuse_destroy_inode(). Add > is_bad_inode() to check if make_bad_inode() was called. > > Reported-by: syzbot+b9c89b84423073226299@syzkaller.appspotmail.com > Signed-off-by: Myungho Jung Thanks, applied. Miklos