From patchwork Thu Oct 5 19:40:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavan Kumar Linga X-Patchwork-Id: 1844146 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=BQY3x7nz; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S1hk14fFBz1yqF for ; Fri, 6 Oct 2023 06:40:41 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 3C9F34136C; Thu, 5 Oct 2023 19:40:39 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3C9F34136C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1696534839; bh=2GqDAxWyKtsewSU+kdcR6rFqXSOnTc+UmwLiueCUHb8=; h=From:To:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=BQY3x7nzU3p1LKDA8Vxf41kkeG9cRirH5wkVrx8rnr+juc4qZn7Li6kXWog7Bnrt5 uHn36Nu6lQLMT1qLX3g+zeUr8Xl2QhgOSTsDpU5WWBaxDhdnUS9lqhrIsZH9RCKuHY UY2qI69iqKKnvE0DtPed7pXpQ2/B3/4kzdH2GybNl+nmwie6jfm5dopGKiW8Z/lnSf SFOvRHtP5AfNTEtPP0g5nd36y3GKBcOnNF9HvYtCJfZBzkERwnvzsmgUXZDIFV8Je3 sVZMvWRbSeanCLh6DQu/9YsSQUoNwkI1yQi4L95YqRATH8fQTQVRmn5VwEwXxo5KaT kNZ3L6nR8DqYA== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RuKdYjqsUHZj; Thu, 5 Oct 2023 19:40:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id B2ACB410B8; Thu, 5 Oct 2023 19:40:35 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org B2ACB410B8 X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id D07351BF312 for ; Thu, 5 Oct 2023 19:40:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id A823D40280 for ; Thu, 5 Oct 2023 19:40:33 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org A823D40280 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ILU1eQ-syFxz for ; Thu, 5 Oct 2023 19:40:33 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by smtp2.osuosl.org (Postfix) with ESMTPS id 12597400C6 for ; Thu, 5 Oct 2023 19:40:32 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 12597400C6 X-IronPort-AV: E=McAfee;i="6600,9927,10854"; a="414578983" X-IronPort-AV: E=Sophos;i="6.03,203,1694761200"; d="scan'208";a="414578983" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2023 12:40:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10854"; a="728557138" X-IronPort-AV: E=Sophos;i="6.03,203,1694761200"; d="scan'208";a="728557138" Received: from unknown (HELO fedora.jf.intel.com) ([10.166.80.24]) by orsmga006.jf.intel.com with ESMTP; 05 Oct 2023 12:40:31 -0700 From: Pavan Kumar Linga To: intel-wired-lan@lists.osuosl.org Date: Thu, 5 Oct 2023 12:40:16 -0700 Message-Id: <20231005194016.45237-1-pavan.kumar.linga@intel.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696534833; x=1728070833; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=/UkaRVzHrwovIYNai0+UkEhOfiv2WtCPlikq0jlodf4=; b=RW4BKQl9/Ut9VuwZAJVZ3av7b7TQEiMFjVJXDE3p+bwBLJY1oq2p/HFK HpY2phCMsRIyUA5vKu91CenYomCTAoIub9cExS+XWWeHlFU58g0YNq77x S0LTqY8x510cHeJ+TLHFJAz7/AqzNMvAUaiKwCsAVmE37yPsk9YbqyXQ6 bz093/2RCETKVHP4DfSfGjxBc7bgSnFHFCt9pqGX8DTs2Y6W52FWCHAR9 pQlgf5aeBQ1X7rSegLZXW+HM429CFDvfxMdqHBY/uMsIRteg2CMcBLOcY R6Zn6sszZe+3zIuAlrP1+RJVnfvcmfvelkoY6eMAbC//f57eWRzKh2+QB A==; X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=RW4BKQl9 Subject: [Intel-wired-lan] [PATCH iwl-next v2] idpf: cancel mailbox work in error path X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: anthony.l.nguyen@intel.com, Pavan Kumar Linga , wojciech.drewek@intel.com, emil.s.tantilov@intel.com Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" In idpf_vc_core_init, the mailbox work is queued on a mailbox workqueue but it is not cancelled on error. This results in a call trace when idpf_mbx_task tries to access the freed mailbox queue pointer. Fix it by cancelling the mailbox work in the error path. Fixes: 4930fbf419a7 ("idpf: add core init and interrupt request") Reviewed-by: Wojciech Drewek Signed-off-by: Pavan Kumar Linga Tested-by: Krishneil Singh --- v2: - added 'Fixes' tag with the commit id this patch fixes drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c index 9bc85b2f1709..cbb3f104f899 100644 --- a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c +++ b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c @@ -3140,6 +3140,7 @@ int idpf_vc_core_init(struct idpf_adapter *adapter) err_intr_req: cancel_delayed_work_sync(&adapter->serv_task); + cancel_delayed_work_sync(&adapter->mbx_task); idpf_vport_params_buf_rel(adapter); err_netdev_alloc: kfree(adapter->vports);