Message ID | 20221125031522.339-1-lihongweizz@inspur.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3742501wrr; Thu, 24 Nov 2022 19:22:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf5iJ8KnkBB5q8RW1ppelpBs/iY2yWmJySdmPMcrcVuSLv0MWey/p/QP2cKJ8Bh5ibYd60hK X-Received: by 2002:aa7:d999:0:b0:461:7f5a:e04e with SMTP id u25-20020aa7d999000000b004617f5ae04emr16633508eds.389.1669346530428; Thu, 24 Nov 2022 19:22:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669346530; cv=none; d=google.com; s=arc-20160816; b=xPwd6Vo6hS2Owkb6rkKD3I2hWP8k1stzU4Gp0QPa1brm8hJNziselqqZnYH8/aPEoI JJwuf4lKJpiKgQf+jwVAp+if0skT1l5wNP3e5h1fGOANy0pQbhn9R5WLH5W5G+ACQUj9 vMjYLVW/wk/SG+ikdnyXYFgmR7EXD/nwelg6HvOgrk/eY47QGJntK8zq8rXhmr5387uY Jg3QBiZfxEViyM+N7+Mj/vBSJSR8rwmGClTrtPqMebNdmneta/1EncCp9X23d9NO7s0r 1zDSObxszZUf9fbhEOYJJYWypZwW8BsNtyOK/NPXKr8AeS6K6T037QfebGe0aNEvvGsz oWMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:abuse-reports-to:tuid:mime-version:message-id :date:subject:cc:to:from; bh=CFkfOfgyGtssyVVaDmVdDtSv7i/p/KwKHJBv8CZy7Xk=; b=UxnG05Ykv1gK/RZwjB9uhcgt50GT+aMkqUox5Gxm9dVszDiVDH/VsHOCNTQu/6Rse/ NkgUwkZ2LeH80kY3bjrtbovakvdIDw1EykmW3BDkraLejOa5rEHbvUekF8QnDDt7xZeZ 1FSafKTgWMRZiFEM+zhp0MmxY4EaUq/Z6UKOxAxCZUrEORa3i3naDq6uEJs+lJWOovUh ifQTWHpHjM6IKLfS21vfwy2i/sLy9lzq3nIyQ2/GnWb1AbKLdIn3qPIgXQEKBdpvdoaO XI+OdU4NFgpAlxagB4zUjhD++4I4tzQlb16h1b7VJA7lgidasMhBtCYX8WDkt6sfJrPi NAwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rh16-20020a17090720f000b007806a130086si1440195ejb.302.2022.11.24.19.21.39; Thu, 24 Nov 2022 19:22:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229617AbiKYDPs (ORCPT <rfc822;zxc52fgh@gmail.com> + 99 others); Thu, 24 Nov 2022 22:15:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbiKYDPq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 24 Nov 2022 22:15:46 -0500 Received: from ssh248.corpemail.net (ssh248.corpemail.net [210.51.61.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1D8023EA2 for <linux-kernel@vger.kernel.org>; Thu, 24 Nov 2022 19:15:41 -0800 (PST) Received: from ([60.208.111.195]) by ssh248.corpemail.net ((D)) with ASMTP (SSL) id TEO00134; Fri, 25 Nov 2022 11:15:34 +0800 Received: from lihongweizz00.home.langchao.com (10.93.221.219) by jtjnmail201611.home.langchao.com (10.100.2.11) with Microsoft SMTP Server id 15.1.2507.12; Fri, 25 Nov 2022 11:15:34 +0800 From: lihongweizz <lihongweizz@inspur.com> To: <mark@fasheh.com>, <jlbec@evilplan.org>, <joseph.qi@linux.alibaba.com> CC: <ocfs2-devel@oss.oracle.com>, <linux-kernel@vger.kernel.org>, Rock Li <lihongweizz@inspur.com> Subject: [PATCH] ocfs2: properly clean task pointer before o2hb thread exits abnormally Date: Fri, 25 Nov 2022 11:15:22 +0800 Message-ID: <20221125031522.339-1-lihongweizz@inspur.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.93.221.219] tUid: 2022112511153408350572528650079766ee080579aa08 X-Abuse-Reports-To: service@corp-email.com Abuse-Reports-To: service@corp-email.com X-Complaints-To: service@corp-email.com X-Report-Abuse-To: service@corp-email.com X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, T_SPF_TEMPERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750436707560078118?= X-GMAIL-MSGID: =?utf-8?q?1750436707560078118?= |
Series |
ocfs2: properly clean task pointer before o2hb thread exits abnormally
|
|
Commit Message
lihongweizz
Nov. 25, 2022, 3:15 a.m. UTC
From: Rock Li <lihongweizz@inspur.com> in case o2hb thread exits abnormally before stop o2cb service, heartbeat_drop_group_item will try to stop a noexit thread cause ret->hb_task was not clear properly. Signed-off-by: Rock Li <lihongweizz@inspur.com> --- fs/ocfs2/cluster/heartbeat.c | 2 ++ 1 file changed, 2 insertions(+)
Comments
On 11/25/22 11:15 AM, lihongweizz wrote: > From: Rock Li <lihongweizz@inspur.com> > > in case o2hb thread exits abnormally before stop o2cb service, > heartbeat_drop_group_item will try to stop a noexit thread cause > ret->hb_task was not clear properly. > Could you please describe the scenario in detail? Thanks, Joseph > Signed-off-by: Rock Li <lihongweizz@inspur.com> > --- > fs/ocfs2/cluster/heartbeat.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c > index b13d344..9db448d 100644 > --- a/fs/ocfs2/cluster/heartbeat.c > +++ b/fs/ocfs2/cluster/heartbeat.c > @@ -1258,6 +1258,8 @@ static int o2hb_thread(void *data) > /* Unpin node */ > o2nm_undepend_this_node(); > > + reg->hr_task = NULL; > + > mlog(ML_HEARTBEAT|ML_KTHREAD, "o2hb thread exiting\n"); > > return 0;
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index b13d344..9db448d 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c @@ -1258,6 +1258,8 @@ static int o2hb_thread(void *data) /* Unpin node */ o2nm_undepend_this_node(); + reg->hr_task = NULL; + mlog(ML_HEARTBEAT|ML_KTHREAD, "o2hb thread exiting\n"); return 0;