Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp3773346pxy; Mon, 26 Apr 2021 09:23:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyH9d6bAiJ7zof79q+3em8OjeD85JzgIKPAz6Lwul187SgZPgh766qaPWYPnc4wdre+OJfE X-Received: by 2002:a63:1719:: with SMTP id x25mr17236034pgl.103.1619454202668; Mon, 26 Apr 2021 09:23:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619454202; cv=none; d=google.com; s=arc-20160816; b=T2fPr30AI16ICcHm/I2DvGJ2bgWUV+VkOy4U08EQq/H21VCJCtExWvlpVxivlB2R8p ILhaDQSsQjjrizmTR2PLSd6JLif67vMhfUVguWP+Od5Izl/+nCPqZeOEacAsfoBvfNgW 9BL0A4uGJBeP3b7yisdBu+cfWOnbMLYtcVseKGigUmCN2M3g0CL4r/RKFhprjUSvK3FG a6uF8aJku9R4OET/usuC0DrETye+bc3P2u7aNxoqVCMt6uUX2IjQEBlCF9xqck46UZAg yIzG4Vy8pFKq6leeVZH9o0yrBmbz7h+lL2WMp6d1CYRi5i7qlLk7SVIw0oMfCXOrmHQM Yb9g== 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=kcRy+7Fot8EjSbqlLH69BdF73o0jk2VmMpNPaSf9wt0=; b=gPV8Lh2pnpUQl5eSESyWftXKktpiU4x8+AqCzsvWsj273XHVbn4zzJ/l4yuRRLokQr fm1YC2WQihFiRWoadSZat85u9nNQ1uQaEUSmMZDUUhte3P92oywvFDdCXKwrC5G2JhC5 acerpAO2HtglEBOi/BebhcbE+YW4yXmZ2DVc8OiF7td3aTjmtFIc28emVELVvBu2ZCQb 1jWNzDEOxCX711M2uIwOV+hKJItv0GRKnUYvvmbLC3kQTp68oD8zgdnclk9OzNiicAGJ RTLrlbM/DhCdvw9CoAOoKBp7/TdO4QWYD7iXdHmP+mm83ZUHkZJy5CuftjCv2U8WZxhx btqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yxisSGVa; 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 m16si16893468pgu.349.2021.04.26.09.23.09; Mon, 26 Apr 2021 09:23:22 -0700 (PDT) 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=yxisSGVa; 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 S234559AbhDZQVv (ORCPT + 99 others); Mon, 26 Apr 2021 12:21:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:40848 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234565AbhDZQVv (ORCPT ); Mon, 26 Apr 2021 12:21:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C34B661158; Mon, 26 Apr 2021 16:21:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1619454069; bh=kJmUU6T85xolm+/E7OL4SM7JetG7DSZ+/OVpna1AJJo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=yxisSGVa1awm4wpy7UGcJMTLnBUUgLQyjRaZTOD1twcj023BrtQpNIjI/MJa+ltvI 0PD20fZKYYK54+EPEIUD+tltezGzPA3kI0T7TuVXi5lFvm8ev2EzHZzEW+w25rq3e0 4TUKNYYrfDt6PGl2kJ7LPidsW/BV1dEMYOBCDC1o= Date: Mon, 26 Apr 2021 18:21:06 +0200 From: Greg KH To: Lv Yunlong Cc: siglesias@igalia.com, jens.taprogge@taprogge.org, industrypack-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Staging:ipack/carriers/tpci200: Fix a double free in tpci200_pci_probe Message-ID: References: <20210426153547.9058-1-lyl2019@mail.ustc.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210426153547.9058-1-lyl2019@mail.ustc.edu.cn> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 26, 2021 at 08:35:47AM -0700, Lv Yunlong wrote: > In the out_err_bus_register error branch of tpci200_pci_probe, > tpci200->info->cfg_regs is freed by tpci200_uninstall()-> > tpci200_unregister()->pci_iounmap(..,tpci200->info->cfg_regs) > in the first time. > > But later, iounmap() is called to free tpci200->info->cfg_regs > again. > > My patch sets tpci200->info->cfg_regs to NULL after tpci200_uninstall() > to avoid the double free. > > Fixes: cea2f7cdff2af ("Staging: ipack/bridges/tpci200: Use the TPCI200 in big endian mode") > Signed-off-by: Lv Yunlong > --- > drivers/ipack/carriers/tpci200.c | 5 ++++- This is not a staging driver, why does your subject line say that? thanks, greg k-h