Message ID | 20210508033313.2227-1-thunder.leizhen@huawei.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=mVoBkRZ2; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=3x9otDoC; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FcXy91b7yz9sWl for <incoming@patchwork.ozlabs.org>; Sat, 8 May 2021 13:35:13 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=P8aoJ7u2syLm/QPHCnFFH26sKBu3XS01YPuqX/gBVGE=; b=mVoBkRZ2mQBuSfbjddgvulRLqe 0o+gFixhH/yzskUn+fY6NmHLtu4e0zqed2ahUgS0zIHMFeP2Ny02iP8ECTWqA4BnEXS6MkR3HuduP jD5jbr3X45P3IIgGL0FcHERFudHNU+EkoEm4tdOvoC8+e4Wxmj9Fp60cXMwE7hTf1b7qlCoaSSfrN mSryfWoA/v4THlryIQt+5M1Q1a54DW9F/O7bhL77r0Xnp7DyF13xueaBAtT2+sU6f2tSFlKA7NewL KlLJKUr3If/v/vXkCwiLJ9/eK0B0MzaYooum7LvTvzsMunq5pnCsWQpQKthKxcee6fu8IUW+gmCZI R8ztnzRw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lfDj3-008fi9-7n; Sat, 08 May 2021 03:33:57 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lfDir-008fgA-6Z for linux-mtd@desiato.infradead.org; Sat, 08 May 2021 03:33:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type: Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From: Sender:Reply-To:Content-ID:Content-Description:In-Reply-To:References; bh=guUrlkaLxv+KyAnmc4sYIzpeiRks9WIaKBaFXCqTcdg=; b=3x9otDoCBmfMPt90GBq6ZXQ6Fy bVRZp1JbXTFl9qhH8eJ422uxpkUyw02H3L6mGQXJYXJU4Ye7Pl40AtEmveTGqwhjwkS8xu8UvYTEO MrTrB902qyKD/PF3GsRVxFNSUJctIjjL5ipUNcQpMNmHODuJuCOzb+ONuLQ38rc9x3Qt2iEK+PhQj PANDcuQHZdXINFxj9N56pnj4tY3CYYkqA91gORZRA6S2Z1tor9nRmNJ1duzYWsA9NJOh4M7cybyi8 Ys3LlnWXzPBqSGsqBbKeRGlz79rvdRZFtjCT0dnYnUHSL2q2NbaPVj+76KkEuCtkfLqDVJNaLCuOF bsUTmDlg==; Received: from szxga06-in.huawei.com ([45.249.212.32]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lfDio-007LVT-9M for linux-mtd@lists.infradead.org; Sat, 08 May 2021 03:33:43 +0000 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4FcXsr4sLTzlbyJ; Sat, 8 May 2021 11:31:28 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.498.0; Sat, 8 May 2021 11:33:26 +0800 From: Zhen Lei <thunder.leizhen@huawei.com> To: Richard Weinberger <richard@nod.at>, linux-mtd <linux-mtd@lists.infradead.org>, linux-kernel <linux-kernel@vger.kernel.org> CC: Zhen Lei <thunder.leizhen@huawei.com> Subject: [PATCH 1/1] ubifs: journal: Fix error return code in ubifs_jnl_write_inode() Date: Sat, 8 May 2021 11:33:13 +0800 Message-ID: <20210508033313.2227-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210507_203342_510557_843DA6C1 X-CRM114-Status: UNSURE ( 7.72 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 9ca2d7326444 ("ubifs: Limit number of xattrs per inode") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> --- fs/ubifs/journal.c | 1 + 1 file cha [...] Content analysis details: (-2.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [45.249.212.32 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [45.249.212.32 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list <linux-mtd.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-mtd/> List-Post: <mailto:linux-mtd@lists.infradead.org> List-Help: <mailto:linux-mtd-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-mtd>, <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" <linux-mtd-bounces@lists.infradead.org> Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
[1/1] ubifs: journal: Fix error return code in ubifs_jnl_write_inode()
|
expand
|
diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c index 2857e64d673d..230717384a38 100644 --- a/fs/ubifs/journal.c +++ b/fs/ubifs/journal.c @@ -882,6 +882,7 @@ int ubifs_jnl_write_inode(struct ubifs_info *c, const struct inode *inode) struct ubifs_dent_node *xent, *pxent = NULL; if (ui->xattr_cnt > ubifs_xattr_max_cnt(c)) { + err = -EPERM; ubifs_err(c, "Cannot delete inode, it has too much xattrs!"); goto out_release; }
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 9ca2d7326444 ("ubifs: Limit number of xattrs per inode") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> --- fs/ubifs/journal.c | 1 + 1 file changed, 1 insertion(+)