Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp27438ybl; Tue, 7 Jan 2020 13:24:56 -0800 (PST) X-Google-Smtp-Source: APXvYqwLrG26TvSaR4fYVEULTDy5ibSL8ZfSkGCTWmLsMIlkw/38HHRYw5F4dPIuaQ1wgw6iFoju X-Received: by 2002:a9d:6f8c:: with SMTP id h12mr1745520otq.185.1578432296408; Tue, 07 Jan 2020 13:24:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578432296; cv=none; d=google.com; s=arc-20160816; b=EB1spsjSet1zPUOkezh+eq25OI3Iy9jdMfLnj9PEC8QfVvMHAPhCWWuV5itQ5evq3J uwTkdy71SkdZ5BiF2RehpN/72k3L2OliaykLudT3g2d1ywOFnccTHeogQqY8/9oVtYjC cThu3yur1SiHXAkWQ9hxT/+85x0wIhpS4EuyXHYZNRfWQSNN5J/OmKAy/yJqh6FoCxKk UTu5VibupfaUP+EQUJfOFIUKHjVVfqrdsmnNk/4CvggH68OKCqaZgLrHSQ4Dv1/XzpSi 0A8YmUBsmcsC7tMXx6/8TpS6qD1e4z62VT9P0xg5h6tv7AbrWMYR862nr595lmkGzNMA QetA== 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=6pvGOS4xlWjH0VCnLFOAx31AQYAgGNF2A0FLsRa78gw=; b=qi/jYyyL3IrU6ll3dF4WR55iBgpsNkHAnMATpL+S1OovQXeAolSzopJHC5+Enakrzw jVLZFuESoo7wbdQUUk/PCcpscMW6/+pLM4g+P0T0rr5diP8FmhpgtIo8b6DxQhehG/iH nn1PMVdshr3y7wU2h1bpm0CA3xuPzc8s2XArwjmj2mEGcydTOraVq/+g4LiSrZa/hB8K 5d2sRHSmYjk7Nt/X8+khmK9jl02TWStWR6MWJ0E1U7o+CwpKlK+tU339qXthXKfB9Dw3 yzaMRV5wa65ONkbSoGoHLndYF09ggPW5zgpktP7/oBeE67M3oaU5bV4DGZk2nPejspux tFDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ejScTPwF; 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 y24si630596oih.24.2020.01.07.13.24.44; Tue, 07 Jan 2020 13:24:56 -0800 (PST) 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=ejScTPwF; 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 S1728230AbgAGVX6 (ORCPT + 99 others); Tue, 7 Jan 2020 16:23:58 -0500 Received: from mail.kernel.org ([198.145.29.99]:37276 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727786AbgAGVA7 (ORCPT ); Tue, 7 Jan 2020 16:00:59 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 5227B2077B; Tue, 7 Jan 2020 21:00:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578430857; bh=WhSVxVp3AZb+Zjctd27Ove9es0wWxTvm7Xk0qqFHkwc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ejScTPwFEk1j9xk0L9ES0U68NLJUDHBgcNJ+sNG2sXj1m+MYPReZ1LueUzJWMQHsd 0Qrg6Kame9PuFGqNdv5xXTelIN21x0ZVlzL24cmeT5M7dd1Gr4Ai1R32cLBQRLL0sd Qu73BqPLkegy94ipdGygvSah3vXaBOB5RT/PURO0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gang He , Joseph Qi , Mark Fasheh , Joel Becker , Junxiao Bi , Changwei Ge , Jun Piao , Andrew Morton , Linus Torvalds Subject: [PATCH 5.4 088/191] ocfs2: fix the crash due to call ocfs2_get_dlm_debug once less Date: Tue, 7 Jan 2020 21:53:28 +0100 Message-Id: <20200107205337.708010706@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200107205332.984228665@linuxfoundation.org> References: <20200107205332.984228665@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Gang He commit b73eba2a867e10b9b4477738677341f3307c07bb upstream. Because ocfs2_get_dlm_debug() function is called once less here, ocfs2 file system will trigger the system crash, usually after ocfs2 file system is unmounted. This system crash is caused by a generic memory corruption, these crash backtraces are not always the same, for exapmle, ocfs2: Unmounting device (253,16) on (node 172167785) general protection fault: 0000 [#1] SMP PTI CPU: 3 PID: 14107 Comm: fence_legacy Kdump: Hardware name: QEMU Standard PC (i440FX + PIIX, 1996) RIP: 0010:__kmalloc+0xa5/0x2a0 Code: 00 00 4d 8b 07 65 4d 8b RSP: 0018:ffffaa1fc094bbe8 EFLAGS: 00010286 RAX: 0000000000000000 RBX: d310a8800d7a3faf RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000dc0 RDI: ffff96e68fc036c0 RBP: d310a8800d7a3faf R08: ffff96e6ffdb10a0 R09: 00000000752e7079 R10: 000000000001c513 R11: 0000000004091041 R12: 0000000000000dc0 R13: 0000000000000039 R14: ffff96e68fc036c0 R15: ffff96e68fc036c0 FS: 00007f699dfba540(0000) GS:ffff96e6ffd80000(0000) knlGS:00000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055f3a9d9b768 CR3: 000000002cd1c000 CR4: 00000000000006e0 Call Trace: ext4_htree_store_dirent+0x35/0x100 [ext4] htree_dirblock_to_tree+0xea/0x290 [ext4] ext4_htree_fill_tree+0x1c1/0x2d0 [ext4] ext4_readdir+0x67c/0x9d0 [ext4] iterate_dir+0x8d/0x1a0 __x64_sys_getdents+0xab/0x130 do_syscall_64+0x60/0x1f0 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f699d33a9fb This regression problem was introduced by commit e581595ea29c ("ocfs: no need to check return value of debugfs_create functions"). Link: http://lkml.kernel.org/r/20191225061501.13587-1-ghe@suse.com Fixes: e581595ea29c ("ocfs: no need to check return value of debugfs_create functions") Signed-off-by: Gang He Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Cc: [5.3+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- fs/ocfs2/dlmglue.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c @@ -3282,6 +3282,7 @@ static void ocfs2_dlm_init_debug(struct debugfs_create_u32("locking_filter", 0600, osb->osb_debug_root, &dlm_debug->d_filter_secs); + ocfs2_get_dlm_debug(dlm_debug); } static void ocfs2_dlm_shutdown_debug(struct ocfs2_super *osb)