Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9416327rwp; Thu, 20 Jul 2023 04:49:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlGy1pnoG+0M63+xrAc23/2HYTT1icxRYfm97MtLjDYIuVQIK8umaYv82ZTqwCSFBI637ECl X-Received: by 2002:a05:6402:545:b0:51d:f813:fd28 with SMTP id i5-20020a056402054500b0051df813fd28mr4717377edx.35.1689853752681; Thu, 20 Jul 2023 04:49:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689853752; cv=none; d=google.com; s=arc-20160816; b=DUhGYNXHwHIcSb8AvuAtxAq4o9jvb+LrYEqkLD02VCX1t408cbF9TY25ReOlzKA95l 29C3vHm2DaKCYCh5XENB1B2A/a7WPOzEiQCRZFY9SEakrgDTOd1wsv0xjy/3w06fQBxJ iX88dRYOt3RMlRXToX5BHJQa4DDVk0HYqnUJ2EIL1JLcsEwLWEh0aEpchMxNx4Ugh7b5 nPkE296XncIHwuqFvz0ANzVm+LSFUJZj3FqsIu0w5457Ymn2SkmGgJocyv2yL12k/Iyt NJA8HWTSK/xALLlipP3jj7H59sYJ1wfqayGlB6ECHVGhhdujq6ycLKFfUnTy3MG09L11 gzzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=TD/3lGk2BpfCTHa7wFFeQARXR2FPVIqINENZXIEx4vM=; fh=ALVskV6OCBTMzyJklplDJE3em3rxC+P76LaTZfyXGDw=; b=jyHCDC47VV6x0E01CcwBgmEW7ziu3ElxnfZD2qmZt9rBj0DyABQnKVaAstMzwmhXg+ ukvPbLB3QJ2JNSx4tXCHRMCSclas8abdsSqfpyZ45S1/Sqy3OGtgUAspMe3nsbLo0GPL 8AwdxyvAh5u8zMAE/S3tQj1bBTcG4DH2bWl28VtnToyMvGwIOwzODHyf3sNOsN6Ztg+A 7qSzS020nFqK+x6jJ0kB400Zn35kIOCbrcTsUl9GCZnmneyOjDnN1chSiSViaTY6n5Jk 7aoJw1DSsRPvTAlY5APPY9bH1bRXPztlz3N0Drag+iief1oYYzD6HMSpA1ssfofqzoWa hKPw== 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b26-20020aa7c6da000000b00521b34387e7si738903eds.79.2023.07.20.04.48.43; Thu, 20 Jul 2023 04:49:12 -0700 (PDT) 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230058AbjGTLnr (ORCPT + 99 others); Thu, 20 Jul 2023 07:43:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230062AbjGTLnq (ORCPT ); Thu, 20 Jul 2023 07:43:46 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 243F31724; Thu, 20 Jul 2023 04:43:44 -0700 (PDT) Received: from kwepemi500020.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4R69lY0w77zVjD4; Thu, 20 Jul 2023 19:42:17 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by kwepemi500020.china.huawei.com (7.221.188.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 20 Jul 2023 19:43:41 +0800 From: Jie Hai To: CC: , Subject: [PATCH] dmaengine: dmatest: fix timeout caused by kthread_stop Date: Thu, 20 Jul 2023 19:41:02 +0800 Message-ID: <20230720114102.51053-1-haijie1@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemi500020.china.huawei.com (7.221.188.8) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 The change introduced by commit a7c01fa93aeb ("signal: break out of wait loops on kthread_stop()") causes dmatest aborts any ongoing tests and possible failure on the tests. This patch use wait_event_timeout instead of wait_event_freezable_timeout to avoid interrupting ongoing tests by signal brought by kthread_stop(). Signed-off-by: Jie Hai --- drivers/dma/dmatest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index ffe621695e47..c06b8b16645a 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@ -827,7 +827,7 @@ static int dmatest_func(void *data) } else { dma_async_issue_pending(chan); - wait_event_freezable_timeout(thread->done_wait, + ret = wait_event_timeout(thread->done_wait, done->done, msecs_to_jiffies(params->timeout)); -- 2.33.0