Message ID | 20211206145548.177462935@linuxfoundation.org |
---|---|
State | New |
Headers | show
Return-Path: <stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D4C0C433EF for <stable@archiver.kernel.org>; Mon, 6 Dec 2021 14:59:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345006AbhLFPCf (ORCPT <rfc822;stable@archiver.kernel.org>); Mon, 6 Dec 2021 10:02:35 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:35692 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344946AbhLFPCb (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 6 Dec 2021 10:02:31 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B7CE3B81018; Mon, 6 Dec 2021 14:59:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 044C3C341C2; Mon, 6 Dec 2021 14:58:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1638802740; bh=yi6fOlp+oad04WBxMslBED6xtGxxnlk0WFoE/smujDc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ka8e6/cpeor7UH0NxemestwplLR/19aDThYKtMkx1rizqce4tT74ffLk52n1J5GG6 BNcUWVvune1Hjg8kZs7igzCk02NBD9GhlS/yVfobxX9vEJ87bwvM3WOd2JmeudvjWw U21KoHYONgf809mxczpWtHshozUgMXn55H4tz/fs= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Dan Carpenter <dan.carpenter@oracle.com> Subject: [PATCH 4.4 08/52] staging: rtl8192e: Fix use after free in _rtl92e_pci_disconnect() Date: Mon, 6 Dec 2021 15:55:52 +0100 Message-Id: <20211206145548.177462935@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211206145547.892668902@linuxfoundation.org> References: <20211206145547.892668902@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -2712,13 +2712,14 @@ static void _rtl92e_pci_disconnect(struc free_irq(dev->irq, dev); priv->irq = 0; } - free_rtllib(dev); if (dev->mem_start != 0) { iounmap((void __iomem *)dev->mem_start); release_mem_region(pci_resource_start(pdev, 1), pci_resource_len(pdev, 1)); } + + free_rtllib(dev); } else { priv = rtllib_priv(dev); }