From patchwork Thu Apr 26 11:20:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eryu Guan X-Patchwork-Id: 905016 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-ext4-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="OaV5NpVx"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40WvnP6JWJz9rxs for ; Thu, 26 Apr 2018 21:23:05 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754678AbeDZLXE (ORCPT ); Thu, 26 Apr 2018 07:23:04 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:37055 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753879AbeDZLXE (ORCPT ); Thu, 26 Apr 2018 07:23:04 -0400 Received: by mail-pf0-f196.google.com with SMTP id p6so18080735pfn.4 for ; Thu, 26 Apr 2018 04:23:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ml9OO7wiyA3eB24mW4el5lQi1GheUeP2OE24jtCD5ac=; b=OaV5NpVxooZPyPuo1aXbmsqYJ90JHSZI1W8ZC+zysVdiWFC2G0716ZQAhgX/9c5Ez1 GrsQ3bPMxMyqWD1CSySjjV9HIitgACAilCaBVeTTl1sgoY7NEagaaVCRi8CpfFxt4GoI 1pWumqmD99jonYX+lPLThD2iuoL9vQEvm4AEXdJyOioKVzneqgWkE1JvuBBuxiW45GBL 95nSc82Q7Fx1IokBMA3m1i6a8DjEQuFB5Bm3cEHZlN77i7445cLlhZccfVCcqCUgua2Y dbBI1XiOEGkphQpZAXeLrtvxlD5VquKkkAj8LBiEbacadb95hkB/QgLlFgKYImfpqWAb ERxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ml9OO7wiyA3eB24mW4el5lQi1GheUeP2OE24jtCD5ac=; b=mijSoqoXlGP9lajB5N7I67WDXtOyVhUzhDaVd3u7rkF41xXK1iLxIo6wE+G4F2K2Lu 5nwZVXa/ZpKUP7GPxwnrbK8jVS5ZKKMZHn9QEDw25Fjr9mNDkFeem44TD2WgKPecqdQK KtXYuGaiKHk1yiAnbG+6egRL7FeFOfADAocNuwACKP6pT02AqCq816iYiKNTAmIacBLQ WOhbtOGuy3DQWrdILwKktqbswzkbbQ1EuMSkHANsvKqRKzRDXb/wPHrj5GoobIdbk6gD fQZxXXjoF5GkD/TAdzvutOffq7Qtz0w0ylpE5bUKtZ9h2Zy+uAYnckXA6SntpI0IvhmP l6VA== X-Gm-Message-State: ALQs6tA3G1U+PKJ8ODPcD3Vw5embHGlWA9wlD1NBd8maURYMfZY7TX9J j4Otx2zfl8aeLjvMgplmHcRPh0n2Jjc= X-Google-Smtp-Source: AIpwx4+rLMxko3JFM8JM3KPlcy3cffzqf+FunuMJ4jyFwVK+tOE5ydu7P9cbkiFsgHmqiHwP+jgquQ== X-Received: by 10.98.139.7 with SMTP id j7mr31796492pfe.28.1524741783424; Thu, 26 Apr 2018 04:23:03 -0700 (PDT) Received: from localhost ([128.199.137.77]) by smtp.gmail.com with ESMTPSA id d8sm31914852pgu.60.2018.04.26.04.23.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Apr 2018 04:23:02 -0700 (PDT) From: Eryu Guan To: linux-ext4@vger.kernel.org Cc: "Darrick J. Wong" , Theodore Ts'o , Tahsin Erdogan , Eryu Guan Subject: [PATCH 0/2] random ext4 ea_inode fixes Date: Thu, 26 Apr 2018 19:20:25 +0800 Message-Id: <20180426112027.11258-1-guaneryu@gmail.com> X-Mailer: git-send-email 2.14.3 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org I hit two bugs in ext4 ea_inode feature when testing Darrick's new test case[1] (which is still in review & revision process). The first bug is premature ENOSPC, and the second one is a refcount corruption. I've tested the fixes with fstests and xattr related syscall tests in LTP, and tests all passed. Thanks, Eryu [1] [PATCH] generic: test XATTR_REPLACE doesn't take the fs down https://www.spinics.net/lists/linux-xfs/msg17394.html Eryu Guan (2): ext4: use XATTR_CREATE in ext4_initxattrs() ext4: use raw i_version value for ea_inode fs/ext4/inode.c | 24 ++++++++++++++++++++++-- fs/ext4/xattr_security.c | 2 +- 2 files changed, 23 insertions(+), 3 deletions(-)