Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2026906pxa; Mon, 3 Aug 2020 05:45:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbV0o+5hUDrasmKdHIqxSLptnnZcq3zbVH/Scs4ObKOSmcNDaL8aBkBhzvaIVx8gaEnTAA X-Received: by 2002:a17:906:e2d6:: with SMTP id gr22mr16148231ejb.455.1596458704921; Mon, 03 Aug 2020 05:45:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596458704; cv=none; d=google.com; s=arc-20160816; b=QyvuSay41CRUqGrP1pHH9W63QvcnRcT+CJAc5/zlU43PD6zWZ8dnzzG+Pj+yeRpi1U sQapKuK5InxsNy6g8Bl/SXYMX/dG7e/IG38iNSrF2MU8qayfvGeoeamiH25/2HL7/+Os b//C4kz73JW4YM/mUA4lQr9EzuufjKFj4Qc++7vufx0IDFtDNXbSmP0i54pwdnAM2ngO +tiJ6CGtfau6c/3jBijFhW1l4J3xG9vIeHkHyKEHwY9eAjoswcqOjvIJk6Y7S/LGpTeY rsKbMgk5XpEYJuW96z9u9cxjFQ1h69QR/pqS7idkH8cHwfPD5+M7ociTSMj2atQh4id8 4UHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dsp269MQD8vBQgnJ5+y/u1CF5kdFmz6c/0TMo8JZl68=; b=sBSk/KLA2xj6GVDRM0S8U9WtWWCaQRhdd48+eNe4cmoDypWMkAi3h4a8B/J49wEgYn MZdEA7lpfkrF45MA9jzXWV7Zb/7f8xeTgFZHZTBdFtR7PyWJYjG8ajdldH+iGTWxwneB NGPrszkDr497560AM2XESmEtcvKjYAql5Xf7/vRvPlusqA3LP68xW7NAxvwJNU5/gvN5 x6p8VuyxMOU1Q17Glr1uMQ7omGClNHC2SQFToLzyalbD9gboEYf03LLzRCIC9rzNzQUu 8fu8P4zFB95VFyEreLD79heGN8ea3ztm+ROOxrkDl0sI+awBbhYXg22zxfFJpZg6Zi1R aKXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=z2Ffk6lm; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x15si10120227eje.180.2020.08.03.05.44.42; Mon, 03 Aug 2020 05:45:04 -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=@kernel.org header.s=default header.b=z2Ffk6lm; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728558AbgHCMmJ (ORCPT + 99 others); Mon, 3 Aug 2020 08:42:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:59648 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729234AbgHCMbw (ORCPT ); Mon, 3 Aug 2020 08:31:52 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AEB2E2054F; Mon, 3 Aug 2020 12:31:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596457911; bh=KMCezlPWr4Uv/z/QzV4v8X/jq+Y/0ojMiWgAzx5H/Vg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z2Ffk6lmvmctOIMUe/w5SCaNSG6Uj6qf8FroLQfuuV3gRxtseCONiwi/o6JFZyk70 fc6WFVj32UMnDqrPae0E4aTSESfj3Ir175gtBayF0McCqzv8TtKPynXvDJgNfN2AF5 DArKlQZ2ew4rCxEznPU/j7HdcSO5t4VIczQJnwXU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Navid Emamdoost , Kalle Valo , Sasha Levin Subject: [PATCH 4.19 07/56] ath9k: release allocated buffer if timed out Date: Mon, 3 Aug 2020 14:19:22 +0200 Message-Id: <20200803121850.670624156@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200803121850.306734207@linuxfoundation.org> References: <20200803121850.306734207@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Navid Emamdoost [ Upstream commit 728c1e2a05e4b5fc52fab3421dce772a806612a2 ] In ath9k_wmi_cmd, the allocated network buffer needs to be released if timeout happens. Otherwise memory will be leaked. Signed-off-by: Navid Emamdoost Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath9k/wmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/ath/ath9k/wmi.c b/drivers/net/wireless/ath/ath9k/wmi.c index e7a3127395be9..066677bb83eb0 100644 --- a/drivers/net/wireless/ath/ath9k/wmi.c +++ b/drivers/net/wireless/ath/ath9k/wmi.c @@ -339,6 +339,7 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id, ath_dbg(common, WMI, "Timeout waiting for WMI command: %s\n", wmi_cmd_to_name(cmd_id)); mutex_unlock(&wmi->op_mutex); + kfree_skb(skb); return -ETIMEDOUT; } -- 2.25.1