Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp326390pxb; Thu, 25 Feb 2021 03:44:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJxseQdq/3xm95VQgLir7EuFxgiTFKrvjVzS/cfbvfR/RcZjw9owA1FaGKhuP57xKs6yobB7 X-Received: by 2002:a17:906:7c43:: with SMTP id g3mr2251755ejp.210.1614253455616; Thu, 25 Feb 2021 03:44:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614253455; cv=none; d=google.com; s=arc-20160816; b=T+LzSENjNrv/iE5kGJfI77QkWapAdJc31VcrnbhSex3MyqfWFOaUNCzv52CShBCNx3 dY5O4aZuq6SPmTKKkvse0EDQxlJjr++IXGGrO7Nvh6hmwOIuqrzoq8hx4I/v365DLSzu rPthwSjCYqRSW9uz3hv5YRMye4hJ7DGssShRF2vYEClSOoM0aXVMRPB4izhhGAuXaYOy 3R4CgfI97c2GbRMwqTwnRjbt58j10YmjjllLN+tROAC6SfO51sYJ0DCmkByfeKFf7t8z yMS0+x0TNevByGTAB488QkbfdgS+mzuJbvongzCtz6wizwF2kRktFOkThC3lidOzrA/S HuVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=b2EluRTS3JQVojAUxtLS5u6p6d+DtYEWvlhAYDNAxek=; b=CI+QzRHSc5xTs56CvkRscYH5ofkQJI6ElNcBUp9SwZ1+mh/adL/ODC1Gg526lV2YRB POw9THy8c/+UdKx0ojjSn9myPHj2BBEJEhMY9PKhlvyDliHhKbfaYURTizDGoCVAI9HY DKDrSrp6KXhWuMp5oCfhjsbI10jxbUXwgbgB6/HIDhdZlalJ79LNUheTNqaZF9elIXKD HW291uWTf1moApfYBXIJUbRpT+Zp0ZtEIUqV/mFc0RejsW5ix6pNDjLRfTWlQLeNqZLh 8VPPbqmrKvGDagoR5qbUQGWEkn5V/hilTSRaMIoqjj/ZtU3VA7JCyGOu+UGshz929vRY jOrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Nc4LCXLG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p17si3154347ejf.513.2021.02.25.03.43.53; Thu, 25 Feb 2021 03:44:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Nc4LCXLG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235578AbhBYIPf (ORCPT + 99 others); Thu, 25 Feb 2021 03:15:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:37466 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230142AbhBYIP0 (ORCPT ); Thu, 25 Feb 2021 03:15:26 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6DEEE64E4D; Thu, 25 Feb 2021 08:14:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614240885; bh=FIIQYrMd3eyKYvYbHiSlBA2eMZvZBmVNWEKSpp/O1YA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Nc4LCXLGzTOqXNJY/X9CKnP/p2uTNpjpMfz2ZGQuSo/DYbhTyBwVzNBl9hEVVIei5 Ex4h6TN1N47xWpM6hOZQ9iRcgu44jKs1v8te9EDCl6gtzhNiv5NOj0LzC5XOyegIut ZUx4v47kh1cXFyFvrYTJFE+OK7eGSX012P0v+xnk= Date: Thu, 25 Feb 2021 09:14:42 +0100 From: Greg Kroah-Hartman To: Nobuhiro Iwamatsu Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Emmanuel Grumbach , Luca Coelho , Kalle Valo , Sasha Levin Subject: Re: [PATCH 4.4 04/35] iwlwifi: pcie: add a NULL check in iwl_pcie_txq_unmap Message-ID: References: <20210222121013.581198717@linuxfoundation.org> <20210222121017.933649049@linuxfoundation.org> <20210225060446.auoymjxg5cuzlism@toshiba.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210225060446.auoymjxg5cuzlism@toshiba.co.jp> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 25, 2021 at 03:04:46PM +0900, Nobuhiro Iwamatsu wrote: > Hi, > > Sorry for the report after the release. > > On Mon, Feb 22, 2021 at 01:36:00PM +0100, Greg Kroah-Hartman wrote: > > From: Emmanuel Grumbach > > > > [ Upstream commit 98c7d21f957b10d9c07a3a60a3a5a8f326a197e5 ] > > > > I hit a NULL pointer exception in this function when the > > init flow went really bad. > > > > Signed-off-by: Emmanuel Grumbach > > Signed-off-by: Luca Coelho > > Signed-off-by: Kalle Valo > > Link: https://lore.kernel.org/r/iwlwifi.20210115130252.2e8da9f2c132.I0234d4b8ddaf70aaa5028a20c863255e05bc1f84@changeid > > Signed-off-by: Sasha Levin > > --- > > drivers/net/wireless/iwlwifi/pcie/tx.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/net/wireless/iwlwifi/pcie/tx.c b/drivers/net/wireless/iwlwifi/pcie/tx.c > > index 8dfe6b2bc7031..cb03c2855019b 100644 > > --- a/drivers/net/wireless/iwlwifi/pcie/tx.c > > +++ b/drivers/net/wireless/iwlwifi/pcie/tx.c > > @@ -585,6 +585,11 @@ static void iwl_pcie_txq_unmap(struct iwl_trans *trans, int txq_id) > > struct iwl_txq *txq = &trans_pcie->txq[txq_id]; > > struct iwl_queue *q = &txq->q; > > > > + if (!txq) { > > + IWL_ERR(trans, "Trying to free a queue that wasn't allocated?\n"); > > + return; > > + } > > + > > I think that this fix is not enough. > If txq is NULL, an error will occur with "struct iwl_queue * q = & txq->q;". > The following changes are required. Is this a 4.4-only thing, or is this issue also in Linus's tree as well? If Linus's tree, please submit this as a normal patch so we can apply it there first. thanks, greg k-h