Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp10170191rwb; Fri, 25 Nov 2022 01:43:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf5VHPQL8YzmgIKDXL30s70jT2uGBxHP/XvLC91jf/MvDv81La1yqLYMtLHNAtg+wvH2Hk8F X-Received: by 2002:aa7:9388:0:b0:56d:4c7e:777a with SMTP id t8-20020aa79388000000b0056d4c7e777amr39759686pfe.0.1669369435333; Fri, 25 Nov 2022 01:43:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669369435; cv=none; d=google.com; s=arc-20160816; b=pA58mmQ3y2xpBY7gqP7WZIH3ln2TDEiHzzz1h23S0onQnc/6iST1ZvsoC4UQbIrReQ lyq9wG/5DwWh2pBxE2IohPG5aJ0UdDB9bV2C4+Saw3G+f4L4fl0vTCSroeMznB7/dFA+ F/n+h39qGKCef28EfZJTPXCWV3lIlNtyhn7cxgWuUjpcyxN86m92S8YCiePqUNhn3yES awS9d9rWcrEUiIL7qSeoNHOqPf2MJJTZ27L36wOsfTXS6+pB9J+N/Mc0HKcCspltFezV seKT1bA6mVkghAj3QAwIE5MVRzw1d+MkHt6e66DbzfeHv5RTF5VQf9HKU1NPzeQE/15W 0xBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=vWHlqKMFlruhEyFTpipCRaaRHS3Na5XSLSGoe7kLmXY=; b=gZVVuBvlhhAksrNUlmemLeIwmfaZxzSkQEXBGL8C+OlS6AvUs99LHsYLO+oXSb4pe4 NkRjkzX/qd4Oprzk4GRDoKbbXoqW5e6nQtAFC8hzoOkKU486hO2WbSDhzhRAUZvY9lID RIaHXEVDte1Dat6mIqjraMYhzV9P9QC7FODscB20c8Sb8j9mM5i6/Vh9XkzN3+VkqUwz D8v1JWD6jiIp0+kAsC205uYmHOnZLwnm7p/xN4qC8Z4BUb06Ulou3s2yE9bu7FEt28/S fMMPr/+FVtHLymOaydHpxgQJJl2SSgXR9x9PUzopzQvZ/Lqp0jjL/Dgw1rd6J7XRadSj X6oA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d6-20020a17090ab30600b00213566a9fa9si6265311pjr.25.2022.11.25.01.43.44; Fri, 25 Nov 2022 01:43:55 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230030AbiKYJ3h (ORCPT + 87 others); 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 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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: 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;