Subject: CVE-2024-39492: mailbox: mtk-cmdq: Fix pm_runtime_get_sync() warning in mbox shutdown

From: Greg Kroah-Hartman <[email-masked]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

mailbox: mtk-cmdq: Fix pm_runtime_get_sync() warning in mbox shutdown

The return value of pm_runtime_get_sync() in cmdq_mbox_shutdown()
will return 1 when pm runtime state is active, and we don't want to
get the warning message in this case.

So we change the return value < 0 for WARN_ON().

The Linux kernel CVE team has assigned CVE-2024-39492 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.7 with commit 8afe816b0c99 and fixed in 6.9.4 with commit 2d42a37a4518
	Issue introduced in 6.7 with commit 8afe816b0c99 and fixed in 6.10 with commit 747a69a119c4

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2024-39492
will be updated if fixes are backported, please check that for the most
up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
	drivers/mailbox/mtk-cmdq-mailbox.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/2d42a37a4518478f075ccf848242b4a50e313a46
	https://git.kernel.org/stable/c/747a69a119c469121385543f21c2d08562968ccc