Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5451674imm; Tue, 16 Oct 2018 10:25:18 -0700 (PDT) X-Google-Smtp-Source: ACcGV61ZHEI7YbyrmGx45fxvCZ4YOy0S+NbX5jChPX/8SRcx9cjibQUbGJDuZ5G71LV6r/bWqKY4 X-Received: by 2002:a17:902:d908:: with SMTP id c8-v6mr22030564plz.227.1539710718783; Tue, 16 Oct 2018 10:25:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539710718; cv=none; d=google.com; s=arc-20160816; b=oX0pUYOGkC3c64TIMWvBRfpGh8nK32LtFMZdqAJBjAupad1PPnTf+HxfKN6dJ4rHT9 dxUWRZ87xHKElvdKhTL3EMjeaPl3E/7bJZh1qDM78UMZnAr6QN34QqvYFxmNRIYJA6Se XR9hgYQwRGXCeqNc4V5TcMzhnxXRApV8XdArLNwbCH+j52lbYu1iQTF/72D5t99LL2qm CSgdCnqHnCuVhpkCqQQQchGcHd6kWfKjg6Mz0iQTrCNJn+cW8zJBd0T+PKF+unFu6lyS PWVRaDOSt+IxyKacOa+hy/Lny8bdQCiPdRlMWQTEZkAV0vHXhxLUDTX93HM1wvfjuB6Q LmHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0mAaox+mDH31q9VSN7ybH4WwV0nQb7uZAP8u/2MD0PE=; b=SQpR3DhtSxAJJ3xX1nICUG1hwFG+Dtr+xg39KMZSH+cd8fhKPg4DetY//MrYC+82xK E1Z6cVWSV5vlPWVgedDngYIm9A3Xl5u5CLrP6ACVq351KbaRYDRi7KhP2anVyAfWfmQA ns2+80aKS24eWUTDma1cqRgCE37FjodXR98x36QIElUunXuoZcATMGLQTem/tBHWUygZ e48LLJk92LTdWlPdxBBrU4DVdqha5pnFlLE+dR5aiVwzEeJreunlW9CWwdWpWlJXRodu Ay+CwKMdm9abp6DUQoOTHUXQ0aeZcXbkYyTJYAgK0Z0sT5O1DwN1TRYRXmdiD0idwhKS SxRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FBpZrzRM; 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 t28-v6si1964730pga.248.2018.10.16.10.25.03; Tue, 16 Oct 2018 10:25:18 -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; dkim=pass header.i=@kernel.org header.s=default header.b=FBpZrzRM; 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 S1731747AbeJQBQI (ORCPT + 99 others); Tue, 16 Oct 2018 21:16:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:34806 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730396AbeJQBQH (ORCPT ); Tue, 16 Oct 2018 21:16:07 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BCC8020658; Tue, 16 Oct 2018 17:24:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539710681; bh=mkXFjRtG8cchR2MSPeYi1VmAOlAUiFk+OaIV6nxMKVY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FBpZrzRMKdNyR/TO/HT1x2rNtJ1FXINzK3RWUR9AjpiLDcm5uDNOBpXMruIP/WHCo KkqoF0mNT4YlGlGqSQzJQWf66qkS8cUPQTN7i5Mx0iSOIScIDMqSQHEE0XkXYQVuyc +wqz6JHal+pRw7snWFqQp9TpUxrkTM68J1CbzqGQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Daniel Rosenberg Subject: [PATCH 4.9 14/71] ext4: Fix error code in ext4_xattr_set_entry() Date: Tue, 16 Oct 2018 19:09:11 +0200 Message-Id: <20181016170540.127292570@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181016170539.315587743@linuxfoundation.org> References: <20181016170539.315587743@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Daniel Rosenberg ext4_xattr_set_entry should return EFSCORRUPTED instead of EIO for corrupted xattr entries. Fixes b469713e0c0c ("ext4: add corruption check in ext4_xattr_set_entry()") Signed-off-by: Daniel Rosenberg Signed-off-by: Greg Kroah-Hartman --- Apply to 4.9 fs/ext4/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -657,7 +657,7 @@ ext4_xattr_set_entry(struct ext4_xattr_i next = EXT4_XATTR_NEXT(last); if ((void *)next >= s->end) { EXT4_ERROR_INODE(inode, "corrupted xattr entries"); - return -EIO; + return -EFSCORRUPTED; } if (last->e_value_size) { size_t offs = le16_to_cpu(last->e_value_offs);