From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796155641; b=mI2I1DaQqRruOnbjEbZ1FALsoLc8qCZJA4Uet/JEdOvpGxzkawNEf6x0N2PRThlZd0HU HbnBaidWTOXUrutxq9jv+vHU9BCb1nStXSim8SFHBf/w/ra1LYdlaceEXwi/BusaaXXtO lHZJsCKUVl4oe+dQx8XvdsalVy/dbbEGr7mlueoM+bcFiFE+gV7AZshLPYVQ3sJfe7jxT okvuRraMTYR+Q+UNFs+QjEiUUaHVSfZoEqTYug1tym1/OuxquXLv0B6hI1U8KS/LI7jVc Srqqag1nxrnu6USdfe8Fz2c08fkRpWr5ZhOyb08Bu+bzNJ1RYbRG1PN6Ell1PimRxwA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796155641; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=ED0AOcFCOdalC93WJJVevyndPuR64AzdZh9ZYnMrKHA=; b=ouD7ASYijQBjPCsTKWuGsvF4X/fGCMVj4IVNi+FAclKY3k2vmbMIqyY5CzmwdBsg0wzL L8Zy4tWp7me3MOpzzFBWGzN3zLv5kf6I5wg1flSgeIK+lC2U17IasjWCztaGCCpRf+s+h 0Um/psbr0K728lIvkaGAhiH4AqPLcHmuaUv6HltbXvJmxwUBFlMEGMSBu+nYrgioaNEVg LwywdFPzrgeKirS5TRueMcpd0/QAp+KYEh5tSAycum3+AeuwLqE0+IxNLAInuRtPysXv+ y2vsnH6G2TDwOewrkZc0B0DC9DOXncs11KVmK8Ssi/aUNz0nJpfurzub3mPKDtxjpJA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=dDM1Xpu0; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B7EB606A31A; Tue, 1 Dec 2026 20:07:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=dDM1Xpu0 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C12FC1F00893; Tue, 1 Dec 2026 20:07:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796155641; bh=ED0AOcFCOdalC93WJJVevyndPuR64AzdZh9ZYnMrKHA=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=dDM1Xpu0g8j+46+w8T74yJ5ybbMrNzpLsfC05Rqe3Ua3fPLT/ijX2E9gta272Mjru 4ji7cQsDrdv+FpNYY2Asw0nJ1izLgIusDbQkc2ugyAc2BAfOO/UnEuoNv6yqvIKLM8 sXKGZHlQwIML2Q6bwbIKv6ib2W+xPg8YINc3YkiE= Date: Tue, 1 Dec 2026 21:07:16 +0100 From: Greg Kroah-Hartman To: arina.kharlamova@mbzuai.ac.ae Cc: Jiri Slaby , Thomas Bogendoerfer , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] tty: serial: ip22zilog: Free the interrupt on unbind Message-ID: <2026120132-coastal-mossy-280c@gregkh> References: <20261201-s2p-d26-v1-1-a39b4ded58a6@mbzuai.ac.ae> X-Mailing-List: linux-serial@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261201-s2p-d26-v1-1-a39b4ded58a6@mbzuai.ac.ae> On Tue, Dec 01, 2026 at 11:20:52PM +0400, Arina Kharlamova via B4 Relay wrote: > From: Arina Kharlamova > > ip22zilog_probe() requests the interrupt with request_irq(), and > nothing frees it. After the driver is unbound the handler stays > installed, and the next probe fails to request the interrupt and > calls panic(). > > Request the interrupt with devm_request_irq(), so it is freed when the > driver is unbound. Then don't call unbound :) > > Fixes: 3fc36ae6abd2 ("tty: serial: ip22zilog: Use platform device for probing") > Cc: stable@vger.kernel.org > Signed-off-by: Arina Kharlamova > --- > The interrupt is never freed, so binding the driver again panics. > > I found this with spec2patch. It has formal specifications of kernel APIs > such as devres, runtime PM, clocks and locks. Each one says what a call > acquires and releases and what a driver has to undo on the error and > remove paths. I checked this driver against them. With the help of an AI > coding assistant (Claude); I reviewed the analysis and the fix. > Compile-tested only, not tested on hardware. Please test on real hardware, devm_request_irq() has BAD side affects if used incorrectly. greg k-h