Skip to content
Heist/ feed
Back to feed
UnratedFix available

LoongArch: Define the __io_aw() hook as mmiowb()

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: LoongArch: Define the __io_aw() hook as mmiowb() Commit fb24ea52f78e0d595852e ("drivers: Remove explicit invocations of mmiowb()") remove all mmiowb() in drivers, but it says: "NOTE: mmiowb() has only ever guaranteed ordering in conjunction with spin_unlock(). However, pairing each mmiowb() removal in this patch with the corresponding call to spin_unlock() is not at all trivial, so there is a small chance that this change may regress any drivers incorrectly relying on mmiowb() to order MMIO writes between CPUs using lock-free synchronisation." The mmio in radeon_ring_commit() is protected by a mutex rather than a spinlock, but in the mutex fastpath it behaves similar to spinlock. We can add mmiowb() calls in the radeon driver but the maintainer says he doesn't like such a workaround, and radeon is not the only example of mutex protected mmio. So we should extend the mmiowb tracking system from spinlock to mutex, and maybe other locking primitives. This is not easy and error prone, so we solve it in the architectural code, by simply defining the __io_aw() hook as mmiowb(). And we no longer need to override queued_spin_unlock() so use the generic definition. Without this, we get such an error when run 'glxgears' on weak ordering architectures such as LoongArch: radeon 0000:04:00.0: ring 0 stalled for more than 10324msec radeon 0000:04:00.0: ring 3 stalled for more than 10240msec radeon 0000:04:00.0: GPU lockup

Products
Kernel
Affected versions
Not specified
Fixed versions
6.1.84, 6.6.24, 6.7.12, 6.8.3
CVEs
CVE-2024-35818
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 00:06 UTC · Revision 1

Source evidence

LoongArch: Define the __io_aw() hook as mmiowb()

core-osv · Original source

Published 17 May 2024, 13:23 UTC

In the Linux kernel, the following vulnerability has been resolved: LoongArch: Define the __io_aw() hook as mmiowb() Commit fb24ea52f78e0d595852e ("drivers: Remove explicit invocations of mmiowb()") remove all mmiowb() in drivers, but it says: "NOTE: mmiowb() has only ever guaranteed ordering in conjunction with spin_unlock(). However, pairing each mmiowb() removal in this patch with the corresponding call to spin_unlock() is not at all trivial, so there is a small chance that this change may regress any drivers incorrectly relying on mmiowb() to order MMIO writes between CPUs using lock-free synchronisation." The mmio in radeon_ring_commit() is protected by a mutex rather than a spinlock, but in the mutex fastpath it behaves similar to spinlock. We can add mmiowb() calls in the radeon driver but the maintainer says he doesn't like such a workaround, and radeon is not the only example of mutex protected mmio. So we should extend the mmiowb tracking system from spinlock to mutex, and maybe other locking primitives. This is not easy and error prone, so we solve it in the architectural code, by simply defining the __io_aw() hook as mmiowb(). And we no longer need to override queued_spin_unlock() so use the generic definition. Without this, we get such an error when run 'glxgears' on weak ordering architectures such as LoongArch: radeon 0000:04:00.0: ring 0 stalled for more than 10324msec radeon 0000:04:00.0: ring 3 stalled for more than 10240msec radeon 0000:04:00.0: GPU lockup

osv:CVE-2024-35818

Kernel

Fixed versions: 6.1.84, 6.6.24, 6.7.12, 6.8.3

Complete source record
{
  "id": "fe4969a57229909e9d2d8ab325d05fb4b77a9053e66e16ad40605cbae552495d",
  "url": "https://osv.dev/vulnerability/CVE-2024-35818",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "LoongArch: Define the __io_aw() hook as mmiowb()",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: LoongArch: Define the __io_aw() hook as mmiowb() Commit fb24ea52f78e0d595852e (\"drivers: Remove explicit invocations of mmiowb()\") remove all mmiowb() in drivers, but it says: \"NOTE: mmiowb() has only ever guaranteed ordering in conjunction with spin_unlock(). However, pairing each mmiowb() removal in this patch with the corresponding call to spin_unlock() is not at all trivial, so there is a small chance that this change may regress any drivers incorrectly relying on mmiowb() to order MMIO writes between CPUs using lock-free synchronisation.\" The mmio in radeon_ring_commit() is protected by a mutex rather than a spinlock, but in the mutex fastpath it behaves similar to spinlock. We can add mmiowb() calls in the radeon driver but the maintainer says he doesn't like such a workaround, and radeon is not the only example of mutex protected mmio. So we should extend the mmiowb tracking system from spinlock to mutex, and maybe other locking primitives. This is not easy and error prone, so we solve it in the architectural code, by simply defining the __io_aw() hook as mmiowb(). And we no longer need to override queued_spin_unlock() so use the generic definition. Without this, we get such an error when run 'glxgears' on weak ordering architectures such as LoongArch: radeon 0000:04:00.0: ring 0 stalled for more than 10324msec radeon 0000:04:00.0: ring 3 stalled for more than 10240msec radeon 0000:04:00.0: GPU lockup ",
    "evidence": "osv:CVE-2024-35818",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.1.84",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.24",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.7.12",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.8.3",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2024-35818",
      "aliases": [
        "CVE-2024-35818"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "fa96b57c149061f71a70bd6582d995f6424fbbf4"
                },
                {
                  "fixed": "97cd43ba824aec764f5ea2790d0c0a318f885167"
                },
                {
                  "fixed": "d7d7c6cdea875be3b241d7d39873bb431db7154d"
                },
                {
                  "fixed": "0b61a7dc6712b78799b3949997e8a5e94db5c4b0"
                },
                {
                  "fixed": "9adec248bba33b1503252caf8e59d81febfc5ceb"
                },
                {
                  "fixed": "9c68ece8b2a5c5ff9b2fcaea923dd73efeb174cd"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-35818.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.19.0"
                },
                {
                  "fixed": "6.1.84"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.24"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.7.12"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.8.0"
                },
                {
                  "fixed": "6.8.3"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-35818.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:32.654302173Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/0b61a7dc6712b78799b3949997e8a5e94db5c4b0",
        "https://git.kernel.org/stable/c/97cd43ba824aec764f5ea2790d0c0a318f885167",
        "https://git.kernel.org/stable/c/9adec248bba33b1503252caf8e59d81febfc5ceb",
        "https://git.kernel.org/stable/c/9c68ece8b2a5c5ff9b2fcaea923dd73efeb174cd",
        "https://git.kernel.org/stable/c/d7d7c6cdea875be3b241d7d39873bb431db7154d",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35818.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-35818",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/35xxx/CVE-2024-35818.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-35818",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 499303,
  "published_at": "2024-05-17T13:23:22.37+00:00"
}