From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12D6B33121F; Wed, 8 Apr 2026 18:46:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775673966; cv=none; b=upht96dMVTPIbo/TEll15HP68LIAaKW5oGer3JDldrcKBXxiF3BfBdfwICJkkwDPy3P5xpBpBe1RBKrtpj7suCkMK9hg/0Gn6AC5U5T3uz5W6tTYyuxFzWT7OgctAcuqDhM27O+jl69ascgedxUmt7sl7r7NvYotWnBpH9BzVRQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775673966; c=relaxed/simple; bh=MV/lNS3HJ2Xh7OpO3uahABkPBgpe5VRIFKBlvEH/mGE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XXthvXo5fHT7m1nxKCsX/xkrTGDOpfgaB/RKWOwbdNSxGpP4arqy0mfj9h06KTKO6GgHufN84kaVmYxTvOc6/Wa7NsFarhecpEwv61gChrGS6+B+Nn/uKhlpH+s2AAEY1VDQ/RSMqcyrnTi5pZflwCGwlKxmSA33B7KgkO7qE2c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CXbjRzD1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="CXbjRzD1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E1E5C19421; Wed, 8 Apr 2026 18:46:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1775673966; bh=MV/lNS3HJ2Xh7OpO3uahABkPBgpe5VRIFKBlvEH/mGE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CXbjRzD1duwRbhoML7mf83ibqEQGUM8Pf5o1l5eL+icpVTTHLIODAaiI8pEZnszFU AfCbOBLGUlmBxPJ0FhtP+fAM95BPQum729VTaUUQmqKr3h2Ovyux0Wc4MIWGnVsz/V cYodavYZ4y7NrJZQKtcn7Zazm1EvP/vEg/RfNjLs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jonathan Cameron , Linus Walleij , Ethan Tidmore , Andy Shevchenko , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 6.12 158/242] iio: gyro: mpu3050: Fix out-of-sequence free_irq() Date: Wed, 8 Apr 2026 20:03:18 +0200 Message-ID: <20260408175933.003374748@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260408175927.064985309@linuxfoundation.org> References: <20260408175927.064985309@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ethan Tidmore commit d14116f6529fa085b1a1b1f224dc9604e4d2a29c upstream. The triggered buffer is initialized before the IRQ is requested. The removal path currently calls iio_triggered_buffer_cleanup() before free_irq(). This violates the expected LIFO. Place free_irq() in the correct location relative to iio_triggered_buffer_cleanup(). Fixes: 3904b28efb2c7 ("iio: gyro: Add driver for the MPU-3050 gyroscope") Suggested-by: Jonathan Cameron Reviewed-by: Linus Walleij Signed-off-by: Ethan Tidmore Reviewed-by: Andy Shevchenko Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/gyro/mpu3050-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iio/gyro/mpu3050-core.c +++ b/drivers/iio/gyro/mpu3050-core.c @@ -1281,9 +1281,9 @@ void mpu3050_common_remove(struct device pm_runtime_get_sync(dev); pm_runtime_put_noidle(dev); pm_runtime_disable(dev); - iio_triggered_buffer_cleanup(indio_dev); if (mpu3050->irq) free_irq(mpu3050->irq, mpu3050->trig); + iio_triggered_buffer_cleanup(indio_dev); mpu3050_power_down(mpu3050); }