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 CA49EC4167B for ; Fri, 25 Nov 2022 09:29:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229933AbiKYJ3h (ORCPT ); Fri, 25 Nov 2022 04:29:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbiKYJ3R (ORCPT ); Fri, 25 Nov 2022 04:29:17 -0500 Received: from out199-13.us.a.mail.aliyun.com (out199-13.us.a.mail.aliyun.com [47.90.199.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C24832BB0 for ; Fri, 25 Nov 2022 01:29:00 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R121e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=joseph.qi@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0VVedjiE_1669368536; Received: from 30.221.133.6(mailfrom:joseph.qi@linux.alibaba.com fp:SMTPD_---0VVedjiE_1669368536) by smtp.aliyun-inc.com; Fri, 25 Nov 2022 17:28:57 +0800 Message-ID: <03a60f60-6408-b67c-6e66-d4ff1d24089c@linux.alibaba.com> Date: Fri, 25 Nov 2022 17:28:56 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH] ocfs2: properly clean task pointer before o2hb thread exits abnormally Content-Language: en-US To: lihongweizz , mark@fasheh.com, jlbec@evilplan.org Cc: ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org References: <20221125031522.339-1-lihongweizz@inspur.com> From: Joseph Qi In-Reply-To: <20221125031522.339-1-lihongweizz@inspur.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/25/22 11:15 AM, lihongweizz wrote: > From: Rock Li > > 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 > --- > 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;