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=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 54F9DC432C3 for ; Tue, 26 Nov 2019 09:34:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2185D20727 for ; Tue, 26 Nov 2019 09:34:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574760880; bh=Ohbjea8qptAUUQ/O12H8GrlNo7892ZclhwRkAsG3+9Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=NfvuiHDU0iVbSUMxEpPjXIQFXd6WRg0mNq9eS6ep/kT066D5SDpNZ9IsrkB+heE6l yb90hDuAWIspzbzfVHeEDHz856lTFEj/7Ddu9UEKNax+yw0EVZUnbsjStW5AAANusv 4ofe5BJLYlcyMyj6VtLQ8cQrI+D9AlirAXGbouYE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727408AbfKZJej (ORCPT ); Tue, 26 Nov 2019 04:34:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:49504 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727400AbfKZJej (ORCPT ); Tue, 26 Nov 2019 04:34:39 -0500 Received: from localhost (unknown [84.241.194.96]) (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 A9E8A206BF; Tue, 26 Nov 2019 09:34:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574760878; bh=Ohbjea8qptAUUQ/O12H8GrlNo7892ZclhwRkAsG3+9Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=C4RTBtf+Em9QDnGqGAVZjFoEs/jSF0Olq/p4PV+O+slBrxWDegQNKkWlK99CcHQWi N+2TPWflx7CTfiTvFkRr4kWtxwQQVs6ol1Wgz9qrnj8L3MbEYruFxzC/IqhVFqe4hF 2S6CdXOHyy808Cj4LIRPMNvyUrU/EC0TqwELMQhk= Date: Tue, 26 Nov 2019 10:34:34 +0100 From: Greg Kroah-Hartman To: Dmitry Torokhov Cc: Navid Emamdoost , Kate Stewart , Richard Fontana , Allison Randal , Thomas Gleixner , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, emamd001@umn.edu Subject: Re: [PATCH] Input: Fix memory leak in psxpad_spi_probe Message-ID: <20191126093434.GA1383178@kroah.com> References: <20191121200115.24846-1-navid.emamdoost@gmail.com> <20191122190208.GA248138@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191122190208.GA248138@dtor-ws> User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org On Fri, Nov 22, 2019 at 11:02:08AM -0800, Dmitry Torokhov wrote: > Hi Navid, > > On Thu, Nov 21, 2019 at 02:01:11PM -0600, Navid Emamdoost wrote: > > In the implementation of psxpad_spi_probe() the allocated memory for > > pdev is leaked if psxpad_spi_init_ff() or input_register_polled_device() > > fail. The solution is using device managed allocation, like the one used > > for pad. Perform the allocation using > > devm_input_allocate_polled_device(). > > > > Fixes: 8be193c7b1f4 ("Input: add support for PlayStation 1/2 joypads connected via SPI") > > Signed-off-by: Navid Emamdoost > > This is fixed in the current version of the driver, but you can send it > to stable@gerkernel.orf with my Was it fixed by any specific patch, or just a side-affect of some other larger change? thanks, greg k-h