summaryrefslogtreecommitdiff
path: root/net/core/devmem.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-03-17 18:07:38 +0000
committerMark Brown <broonie@kernel.org>2026-03-17 18:07:38 +0000
commitc8d0beedf0da06652432354882b95c33a4cb7cfe (patch)
tree369044cede12800331e74a7e10ac7d5273cd8e18 /net/core/devmem.c
parent9d4189e68ebad418eed964185d5563a71c67756d (diff)
parent58068932402c7f5bf26489e01ae8e8bb89802d1e (diff)
regulator: fp9931: Make vin-supply mandatory
Robby Cai <robby.cai@nxp.com> says: The FP9931 regulator requires a valid "vin" supply to operate correctly. Therefore, the driver should treat "vin" as a mandatory supply. This patchset updates the binding documentation to mark vin-supply as a required property, and modifies the driver accordingly. As suggested in the reviews from Andreas and Mark, v2 switches to using devm_regulator_get() since the supply is mandatory.
Diffstat (limited to 'net/core/devmem.c')
-rw-r--r--net/core/devmem.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/core/devmem.c b/net/core/devmem.c
index 8c9aad776bf4..69d79aee07ef 100644
--- a/net/core/devmem.c
+++ b/net/core/devmem.c
@@ -396,7 +396,8 @@ struct net_devmem_dmabuf_binding *net_devmem_get_binding(struct sock *sk,
* net_device.
*/
dst_dev = dst_dev_rcu(dst);
- if (unlikely(!dst_dev) || unlikely(dst_dev != binding->dev)) {
+ if (unlikely(!dst_dev) ||
+ unlikely(dst_dev != READ_ONCE(binding->dev))) {
err = -ENODEV;
goto out_unlock;
}
@@ -513,7 +514,8 @@ static void mp_dmabuf_devmem_uninstall(void *mp_priv,
xa_erase(&binding->bound_rxqs, xa_idx);
if (xa_empty(&binding->bound_rxqs)) {
mutex_lock(&binding->lock);
- binding->dev = NULL;
+ ASSERT_EXCLUSIVE_WRITER(binding->dev);
+ WRITE_ONCE(binding->dev, NULL);
mutex_unlock(&binding->lock);
}
break;