Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2268967pxm; Fri, 4 Mar 2022 12:45:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwUULwLi/D5i8xlxIPyDnd0XAh+t3/Yh4asuE0mC2D6vlsIuKFBuNzt08hRIhBT5xH7VPY2 X-Received: by 2002:a17:90a:1f4c:b0:1bc:fcbc:1474 with SMTP id y12-20020a17090a1f4c00b001bcfcbc1474mr12650559pjy.79.1646426702283; Fri, 04 Mar 2022 12:45:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646426702; cv=none; d=google.com; s=arc-20160816; b=0DOvklLnysHvChG6pstY+NiI5vqgR88BXajek0jiuT28JtOGNZ7/W5n/3SQLoXc2Y9 iBM55+2HeO8bzWPcc3BuBju+cCbOrk/AwAov9UmNPacPsUycBhKoyRT3DFKXyzZ9phBw JPi3EybUlvyNe22B4TSxOfv5Rg2Zt8AoBIFgnXvAXDklNx+MdYZBU/OPTKgsh1+i+/M4 Tx8dWs6GfibRqkKLGZBHiK3wsMAGs0nb9787NZPXg8fExiRnPhkDseWiKUfmbDaTwq34 yz3brfLqIeMA42aqVZYRkYi4Mn1zbn74BJ/r8JrSiDlq5NeFznv+LIGHHD5t+hGCsWHO Jb9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from; bh=mTR6JLGIOKsHvhYqKINSeBnyXmOWWzOjpEpXZDiuzsg=; b=ZtuJrYivggXJqqzU3Aot0WDKF1E84GA63W5gUK6digCvTrG+5rInwHF9UOJlILzctL 8IxYrKx5ikSz6pjTuzLtbCr24Rq47Fy2pZZV9pFvLu4L9kOQJtaNEI/P4Azfy2AJ90K+ f6fA7mL0ms8EjMiM/7pEpT9usygVK9/qjY5mzWlxle2a6WxldyLTr6OHmpZE97ySZXOb lT18jN3018yD9irwAtOD0XvtanBj+EpvponQIXsRaYZmfPocJMzPomUKsV/K8CYOFvLD hBk0pwhKj+BXcSu6NiRTUn90K8HQWB8oYgZAHIrsv01dDt3G49DtSdT902KmFPMzZxrN 8sPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h3-20020a056a00230300b004f0f256db2esi6047509pfh.14.2022.03.04.12.45.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 12:45:02 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DC8202B4228; Fri, 4 Mar 2022 11:43:28 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239376AbiCDLWj (ORCPT + 72 others); Fri, 4 Mar 2022 06:22:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239363AbiCDLWd (ORCPT ); Fri, 4 Mar 2022 06:22:33 -0500 Received: from farmhouse.coelho.fi (paleale.coelho.fi [176.9.41.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B53081B0C4A for ; Fri, 4 Mar 2022 03:21:45 -0800 (PST) Received: from 91-156-4-241.elisa-laajakaista.fi ([91.156.4.241] helo=kveik.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1nQ60F-000QSW-7X; Fri, 04 Mar 2022 13:21:44 +0200 From: Luca Coelho To: kvalo@kernel.org Cc: luca@coelho.fi, linux-wireless@vger.kernel.org Date: Fri, 4 Mar 2022 13:21:26 +0200 Message-Id: X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220304112129.219513-1-luca@coelho.fi> References: <20220304112129.219513-1-luca@coelho.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 Subject: [PATCH 10/13] iwlwifi: dbg: in sync mode don't call schedule Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Mordechay Goodstein Today in the code we have two options for collecting data sync/schedule, the two options call the same function and can lead to racing in free resources after done. So we call only one of two sync/schedule, and in case of sync only call sync function without also schedule to immediately run as a side job. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c index 53f0fe77aa10..d3ac8ea049a4 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c @@ -2992,10 +2992,10 @@ int iwl_fw_dbg_ini_collect(struct iwl_fw_runtime *fwrt, "WRT: Collecting data: ini trigger %d fired (delay=%dms).\n", tp_id, (u32)(delay / USEC_PER_MSEC)); - schedule_delayed_work(&fwrt->dump.wks[idx].wk, usecs_to_jiffies(delay)); - if (sync) iwl_fw_dbg_collect_sync(fwrt, idx); + else + schedule_delayed_work(&fwrt->dump.wks[idx].wk, usecs_to_jiffies(delay)); return 0; } -- 2.35.1