From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=46.4.11.11 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796155323; b=HBZOXmGpQA7ZN8GBwZ9PiHnIhMZOPSWAtGZV8lyiXrB4HegnslxeTypR5BI1DuAVkXfX 5AMw/vbYqiteOFpvesSPiRqclPUbmc7jOZibFhaGSJU5KeAgpa/cFIu1JlOcICVdewDzm AURi3YIREe4Gyc6WkuvBCSC6jJ8bXJZpRprbL5Kql7bibr5csfA8fxv/ryK4TW8E0kLdI bDCp2dRDi9YLSxXt0CWg52NARMZtdXEatdvhCPyzLVMiwaONffB+VC++NLBCcnJTCdZV1 K/LMV8TcnRqVCbn1MRNRrkYDuRCZBQVY/Fx/FAkpUorNJq5Nv7AHTLXrnJuvWDtRppg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796155323; h=DMARC-Filter:Received:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:Content-Language:From:In-Reply-To: Content-Type:Content-Transfer-Encoding; bh=2d7haeimX/n27fzJtshnX1IEOk/isC1JtTf4WUPZu9M=; b=xRSGbvRmALCLST/2enTb7JUc+TM5NTZBYODs6UFC+qzVzaj/h7nlp2vAwMbdR70+IXbH /pXyKFGWXpg9lFpR23y7icZkfKGnE/lju+6yKNf2nQnBfKhHWY6e75aceRZJLnFojKrAQ YhizSKpjeMrOdKpADtA4MWqK1nkNbySt5PMX4NkWJjY/VmzdV+3wl49YS56w3fqLVcwMp tQScTZiTnuKxxj9epnPkSZUY3Mq5q1S9oD6yw84ZMq0NzhXaYGUBsfy0XsxmG+PnZ6xXt Y+JSFBF+yrRc5ztjRrbQw2/mtWQjsJgO5CwjAxB4Hv+00pAeYl85spPxomEh6IT086g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=phrozen.org; spf=pass smtp.mailfrom=phrozen.org; arc=none smtp.remote-ip=46.4.11.11 Received: from nbd.name (nbd.name [46.4.11.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B472606A320; Tue, 1 Dec 2026 20:02:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1B472606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=phrozen.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=phrozen.org Received: from [2a04:4540:1405:15fc:cc3f:79f4:87df:529] by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1xYU32-00Atwu-2N; Tue, 01 Dec 2026 21:01:56 +0100 Message-ID: Date: Tue, 1 Dec 2026 21:01:56 +0100 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] serial: lantiq: release the memory region in release_port To: arina.kharlamova@mbzuai.ac.ae, Jiri Slaby , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, stable@vger.kernel.org References: <20261201-s2p-lpr-tty-v1-0-599ae5139f12@mbzuai.ac.ae> <20261201-s2p-lpr-tty-v1-1-599ae5139f12@mbzuai.ac.ae> Content-Language: en-GB From: John Crispin In-Reply-To: <20261201-s2p-lpr-tty-v1-1-599ae5139f12@mbzuai.ac.ae> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 01.12.26 20:20, Arina Kharlamova via B4 Relay wrote: > From: Arina Kharlamova > > lqasc_request_port() requests the memory region with > devm_request_mem_region(), but lqasc_release_port() only unmaps the > registers. After TIOCSERCONFIG, which calls release_port and then > config_port, the region is still busy and lqasc_request_port() fails. > lqasc_config_port() ignores the error, and lqasc_startup() then > accesses the registers through a NULL membase. > > Release the region in lqasc_release_port(). > > Fixes: 2f0fc4159a6a ("SERIAL: Lantiq: Add driver for MIPS Lantiq SOCs.") > Cc: stable@vger.kernel.org > Signed-off-by: Arina Kharlamova > --- > drivers/tty/serial/lantiq.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/tty/serial/lantiq.c b/drivers/tty/serial/lantiq.c > index fc75476c0935..37f74ecae937 100644 > --- a/drivers/tty/serial/lantiq.c > +++ b/drivers/tty/serial/lantiq.c > @@ -498,11 +498,17 @@ static void > lqasc_release_port(struct uart_port *port) > { > struct platform_device *pdev = to_platform_device(port->dev); > + struct resource *res; > > if (port->flags & UPF_IOREMAP) { > devm_iounmap(&pdev->dev, port->membase); > port->membase = NULL; > } > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + if (res) > + devm_release_mem_region(&pdev->dev, res->start, > + resource_size(res)); > } > > static int > The imbalance is there, but it only shows with TIOCSERCONFIG, which nobody runs on a SoC UART. I do not think this is stable material, please drop the Cc: stable. this feels like some rogue / fire and forget LLM report material