From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1964C433F5 for ; Fri, 10 Sep 2021 00:19:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A83D26023D for ; Fri, 10 Sep 2021 00:19:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A83D26023D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jY1eB4nd+W4ZUteTHp9iBj1Xcx69VmrqRYH8a3OcuA0=; b=tY+zL6PmPj8DEG st0s68uMQX54avG6g7Cj37df5ZGiWEGVULrzf4pqhQvzQjldfhNmVQPZHXiMuTVeJtJlYOBF1YiKj 6k8sxxTUGj3dTDSRbr73Zej1GUDS/oiamS3+cbQbRVNDrkC7wcQt9RcoXiB0F5QO1GEJB8KRYeN4M cf+QQBhgrMEwHfJJOe8lR2eLN2zFu8jFAXPO+tgjnuh9pwblzHgOrCRBrGeHEKY4koeKqJSgcdNdY nPqeDGZuQoaCReevs+WXKiSwU/yFGBdEdhrKGqNAJ21Xuqe8JXI66dnqDhxXeHGWelqOVoh82j2jr /WsRpjA0Us+ff6cWeo/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mOUEz-00BDhg-To; Fri, 10 Sep 2021 00:18:02 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mOUEE-00BDIg-1V for linux-arm-kernel@lists.infradead.org; Fri, 10 Sep 2021 00:17:16 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id CF51A610E9; Fri, 10 Sep 2021 00:17:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631233033; bh=oFz61alXTOW06JOhzSWsngaa9cI/LzWBSyT5PC3YZqU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P0HfgsEzbX3mhEF6T5acNO+vZYafO6JAQ4kbD+PQRvEVHHTqCk4gMH8eWIFj+AXFu JsbRPzAW50RuJA06zf5szkFhLIU5wU4+5dQiefdYdUnniLWchh4QPVECzwrki5TqiR RFX0VDK4AkPC6/oCA4Xj5tR7GzYAqoXz1LwQ96eyQCB45PcZkQMW94xWk+vjtMkPNu Wu4+NucJb+k9Ec2ON0QShzWrPjb/bYJkYa0Bds3yAvM1R6gdy8QIpkD6gGfMZ0P+7l xK3cUkwsegy22jipTljhFGxl74umSxbOFtU5S/Z6O9SgTOh9qlBpLOWsQLD9URBa1I 5UdHKJZxI7M/g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Evgeny Novikov , Jiri Kosina , Sasha Levin , linux-input@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.14 54/99] HID: thrustmaster: Fix memory leak in remove Date: Thu, 9 Sep 2021 20:15:13 -0400 Message-Id: <20210910001558.173296-54-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210910001558.173296-1-sashal@kernel.org> References: <20210910001558.173296-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210909_171714_680254_FE27AC57 X-CRM114-Status: UNSURE ( 8.63 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Evgeny Novikov [ Upstream commit df3a97bdbc252d3421f1c5d6d713ad6e4f36a469 ] thrustmaster_remove() does not release memory for tm_wheel->change_request. This is fixed by the patch. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin --- drivers/hid/hid-thrustmaster.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hid/hid-thrustmaster.c b/drivers/hid/hid-thrustmaster.c index e94d3409fd10..9cb4248f95af 100644 --- a/drivers/hid/hid-thrustmaster.c +++ b/drivers/hid/hid-thrustmaster.c @@ -253,6 +253,7 @@ static void thrustmaster_remove(struct hid_device *hdev) usb_kill_urb(tm_wheel->urb); + kfree(tm_wheel->change_request); kfree(tm_wheel->response); kfree(tm_wheel->model_request); usb_free_urb(tm_wheel->urb); -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel