From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05EDCC001DF for ; Fri, 4 Aug 2023 18:16:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229509AbjHDSQk (ORCPT ); Fri, 4 Aug 2023 14:16:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjHDSQj (ORCPT ); Fri, 4 Aug 2023 14:16:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C039146A3 for ; Fri, 4 Aug 2023 11:16:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 52AE5620DD for ; Fri, 4 Aug 2023 18:16:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A99ACC433C7; Fri, 4 Aug 2023 18:16:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1691172997; bh=5jKqN6wPNuEH3H8TMFj0XhqcBY0PpfAmgoNJeIde/m0=; h=Date:To:From:Subject:From; b=O/uYPnsaSlAY6t4T9az9l1RmS3zvs7X1k74L/g5YaoFxPKw/k1CDzImxoTOpSyh5K Z0CGZ4qst7cUOXCXe9DTvrcDIc8gTMONB4xJnW5OYJrQC4uWCpH2WcTIP98CQuH34I Sf3e7ADVutuEGE9jBK/qEAa/aV/xhhZ/oG+YVKtw= Date: Fri, 04 Aug 2023 11:16:37 -0700 To: mm-commits@vger.kernel.org, piaojun@huawei.com, mark@fasheh.com, kurt.hackel@oracle.com, junxiao.bi@oracle.com, joseph.qi@linux.alibaba.com, jlbec@evilplan.org, ghe@suse.com, gechangwei@live.cn, artem.chernyshev@red-soft.ru, akpm@linux-foundation.org From: Andrew Morton Subject: + fs-ocfs2-namei-check-return-value-of-ocfs2_add_entry.patch added to mm-nonmm-unstable branch Message-Id: <20230804181637.A99ACC433C7@smtp.kernel.org> Precedence: bulk Reply-To: linux-kernel@vger.kernel.org List-ID: X-Mailing-List: mm-commits@vger.kernel.org The patch titled Subject: fs: ocfs2: namei: check return value of ocfs2_add_entry() has been added to the -mm mm-nonmm-unstable branch. Its filename is fs-ocfs2-namei-check-return-value-of-ocfs2_add_entry.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/fs-ocfs2-namei-check-return-value-of-ocfs2_add_entry.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Artem Chernyshev Subject: fs: ocfs2: namei: check return value of ocfs2_add_entry() Date: Thu, 3 Aug 2023 17:54:17 +0300 Process result of ocfs2_add_entry() in case we have an error value. Found by Linux Verification Center (linuxtesting.org) with SVACE. Link: https://lkml.kernel.org/r/20230803145417.177649-1-artem.chernyshev@red-soft.ru Fixes: ccd979bdbce9 ("[PATCH] OCFS2: The Second Oracle Cluster Filesystem") Signed-off-by: Artem Chernyshev Reviewed-by: Joseph Qi Cc: Artem Chernyshev Cc: Joel Becker Cc: Kurt Hackel Cc: Mark Fasheh Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton --- fs/ocfs2/namei.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/fs/ocfs2/namei.c~fs-ocfs2-namei-check-return-value-of-ocfs2_add_entry +++ a/fs/ocfs2/namei.c @@ -1535,6 +1535,10 @@ static int ocfs2_rename(struct mnt_idmap status = ocfs2_add_entry(handle, new_dentry, old_inode, OCFS2_I(old_inode)->ip_blkno, new_dir_bh, &target_insert); + if (status < 0) { + mlog_errno(status); + goto bail; + } } old_inode->i_ctime = current_time(old_inode); _ Patches currently in -mm which might be from artem.chernyshev@red-soft.ru are fs-ocfs2-namei-check-return-value-of-ocfs2_add_entry.patch