Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp218715imm; Fri, 21 Sep 2018 22:26:56 -0700 (PDT) X-Google-Smtp-Source: ACcGV63mdg//l+G1dutOUnDN0U8AK16eHSFKs+biUl5APdszxX2R0MHAhTLMFiQnsHJRQAqbSAt9 X-Received: by 2002:a17:902:6b0b:: with SMTP id o11-v6mr956990plk.214.1537594016857; Fri, 21 Sep 2018 22:26:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537594016; cv=none; d=google.com; s=arc-20160816; b=LBHV6LPxLueIcx+wvR8U803kI2yJWoYrKMUQegncxzkJGMXPNQZxIkXKxOf9oP9NI6 O0bLalxuGET3TYJzzCb5/yooeq38ZwIQ5wYKzfaAVrHS13QnCEJGMrVAxVpC8BbJ1QyH EQtqu9pPAYFu/UmjVJlWLGva2hdIpa7lMMTqELIqU8lW/ljh4lfLxx7Voauxj8/L2YWZ yTt6/zhW4JC7YePuhGPCdPvmv2c470ly8h/xYs2LVSisrHftZONGR/zh7WAqNgfVnueK jfyJjHqgLcPIS6YGYpLuBwpTVMn3cReM3SwEw5EvkX1ONmE5CvOMHARXH2PaFIf3GOYs NBlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Zrj1k0GaNJlLYLVgRd2rDpA09WDhZg+FBuFlwxKeiC8=; b=HrKZoorySe9hnYgsFn11/gbWQ72zVOJd+QCvFmA+kJ6HGAqqfNgmOU7hMi9AOKw/YP mzd9GFx0l3xUkhKkB+VEZjL06V+vSGv3kBkZGr3GjxMX+gYyeGu87ZEPOF2Z7SI0QsLc 0QbCQh8BRHnmNXOIs9Nyw8xNoSLqztJ6I124CC1AgA1FifXpnzkiIKqkTbC43OzHxbT+ ZEv1hpm/QPftyihjD5lRHVWmY7okMDsy2aPRfEpz0XM9W51ZBq3vBKAE/KSkorhLjzRO sYtN8acEhQfgGBWEb3mAFjmTuwBiQaeimScsnASKQ48dmUWWDnBemfI+ZYmRpP/EzMwb Uqlw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b35-v6si30782430pla.420.2018.09.21.22.25.59; Fri, 21 Sep 2018 22:26:56 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726015AbeIVLSI (ORCPT + 99 others); Sat, 22 Sep 2018 07:18:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3242 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725860AbeIVLSI (ORCPT ); Sat, 22 Sep 2018 07:18:08 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7AB71C036757; Sat, 22 Sep 2018 05:25:55 +0000 (UTC) Received: from rh (ovpn-116-15.phx2.redhat.com [10.3.116.15]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 55EF088B0E; Sat, 22 Sep 2018 05:25:52 +0000 (UTC) Received: from [::1] (helo=rh) by rh with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1g3aQN-0004vu-3D; Sat, 22 Sep 2018 15:25:47 +1000 Date: Sat, 22 Sep 2018 15:25:44 +1000 From: Dave Chinner To: Ben Hutchings Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, akpm@linux-foundation.org, "Darrick J. Wong" , Carlos Maiolino Subject: Re: [PATCH 3.16 51/63] xfs: catch inode allocation state mismatch corruption Message-ID: <20180922052544.GB19103@rh> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Sat, 22 Sep 2018 05:25:55 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 22, 2018 at 01:15:42AM +0100, Ben Hutchings wrote: > 3.16.58-rc1 review patch. If anyone has any objections, please let me know. > > ------------------ > > From: Dave Chinner > > commit ee457001ed6c6f31ddad69c24c1da8f377d8472d upstream. > > We recently came across a V4 filesystem causing memory corruption > due to a newly allocated inode being setup twice and being added to > the superblock inode list twice. From code inspection, the only way > this could happen is if a newly allocated inode was not marked as > free on disk (i.e. di_mode wasn't zero). .... > Signed-Off-By: Dave Chinner > Reviewed-by: Carlos Maiolino > Tested-by: Carlos Maiolino > Reviewed-by: Darrick J. Wong > Signed-off-by: Darrick J. Wong > [bwh: Backported to 3.16: > - Look up mode in XFS inode, not VFS inode > - Use positive error codes, and EIO instead of EFSCORRUPTED] Why EIO? Cheers, Dave. -- Dave Chinner dchinner@redhat.com