Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2173605rdf; Mon, 6 Nov 2023 06:51:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IEJ+AX6ISG2EKLdIYYpM6EcSuDFcONAnJIpI9dHvv/7myT7jCRjWcfvimbYjhp5kiQQCuT3 X-Received: by 2002:a05:6871:10b:b0:1ea:137:7dba with SMTP id y11-20020a056871010b00b001ea01377dbamr37281515oab.10.1699282265855; Mon, 06 Nov 2023 06:51:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699282265; cv=none; d=google.com; s=arc-20160816; b=gULDY/gEflDuHxOV0D3MdSV3xJRLbo0TArYyQftExiLoA9MZThStbX3l63i9wNnegW 6KG/7nKPTbq7o4JaX5YuOND35i7bv5xCa3Ti0P5/1RqqMARNAXV/xFnt2mBh58eUgiLw pnWMUvRpp4zg1vCoIaPg6FA+XFucqaVnDg7cP6VHloM37ArtS6llM5KGF0qMt9QiInwq GATCHksFfBzNPyhpH/vNjnnJ9T6PMwEFSDRwXYBemhURTWNn59S0Kxn9gqrLUkMmEqDi iAPC5HxaL0jMKPfwILaJ0vQMS6Mr+JhFG2gyLoCbQk3AkKCG5qCkzIbelZHxeTmQUQf7 y22w== 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; bh=G04cobautxRVgeHBKI68h5P2ffzeuxgbqLKyB6w99IE=; fh=538If5A7q48ZJyqpqv/7sy7ahQTbOP0DZ+tHKnQzfbo=; b=iWt4hi2oJQUZtb/dg2sbhdtSwB3WlUKcNoIUMBryAxszRZg/GXsVaEgPgqC13Dgdbi gEGyhLytzEaTUG1y+W0W1ML2X2B2ojZ9F/cjwK2C8jYemTeOA4sC1Nv5dsDekkPCwior NFnnmI8M+jgS42fG2zjRnH4+nhEY5NWuluKsXqzWkVKR78aUyE0Q89/a+wApqD3KUFhe LBuYjSesv4PIPJNoGbGlywwINMIgBmCH6j4nF/6vmjybmco7mpMEYyunR+l3bh68QtTV 9enzSIvBXu3yafkP/7lEtYt20k9uLBE+PVTTVSeRa1D9UioV3VI7H0itYe4c12flqYmJ KTqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id a4-20020a656044000000b005897bfc2ed1si8247402pgp.215.2023.11.06.06.51.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 06:51:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 1F1C4807C84F; Mon, 6 Nov 2023 06:50:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232207AbjKFOtm (ORCPT + 99 others); Mon, 6 Nov 2023 09:49:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232022AbjKFOtc (ORCPT ); Mon, 6 Nov 2023 09:49:32 -0500 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EF891701 for ; Mon, 6 Nov 2023 06:49:25 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r00uj-0006Dr-Tw; Mon, 06 Nov 2023 15:49:17 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r00uj-00749e-6d; Mon, 06 Nov 2023 15:49:17 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1r00ui-00DkAu-TY; Mon, 06 Nov 2023 15:49:16 +0100 Date: Mon, 6 Nov 2023 15:49:14 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Florian Eckert Cc: Eckert.Florian@googlemail.com, pavel@ucw.cz, lee@kernel.org, kabel@kernel.org, gregkh@linuxfoundation.org, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [Patch v2] leds: ledtrig-tty: free allocated ttyname buffer on deactivate Message-ID: <20231106144914.bflq2jxejdxs6zjb@pengutronix.de> References: <20231106141205.3376954-1-fe@dev.tdt.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cuxqxbsy7asbpnbl" Content-Disposition: inline In-Reply-To: <20231106141205.3376954-1-fe@dev.tdt.de> X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 06 Nov 2023 06:50:09 -0800 (PST) --cuxqxbsy7asbpnbl Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 06, 2023 at 03:12:05PM +0100, Florian Eckert wrote: > The ttyname buffer for the ledtrig_tty_data struct is allocated in the > sysfs ttyname_store() function. This buffer must be released on trigger > deactivation. This was missing and is thus a memory leak. >=20 > While we are at it, the tty handler in the ledtrig_tty_data struct should > also be returned in case of the trigger deactivation call. >=20 > Cc: stable@vger.kernel.org > Fixes: fd4a641ac88f ("leds: trigger: implement a tty trigger") > Signed-off-by: Florian Eckert I already provided that to v1, but my reply and the v2 crossed, so I'm forwarding my tag to this v2: Reviewed-by: Uwe Kleine-K=F6nig Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --cuxqxbsy7asbpnbl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmVI/OkACgkQj4D7WH0S /k4dugf/d+mVIkYj3WhRH5DuFSBGNO7Oni01gKNpAmSw1/lhYmVAd5l39RU1n6qR L4AKALqT+nNBFdeZcSGfPcNMMxZKNE56Np45S/4KwBk71D6l/CsYqqgk/wJhMfhP Tfu3gBrTlSjyWvtWO8llhJHRuEZf1LpfCNA1hMjtzyZuv4LHlugp3C4/fb3QvE6j MqyK4LudbsPFaqod7+IhW9S0+mKHwDTwCgPHsTc8IUUFSpq/XR0sAe5Jp16BXm7g V4JSyz5MzddPiPRVjFFlTb9NfmNVfaAcBJ8l1Lx45dQpmkqrOUedd+68luvewdYY Y/8+E4Ilcqp6JfHbi00jO9jsH95paQ== =Oo3i -----END PGP SIGNATURE----- --cuxqxbsy7asbpnbl--