diff options
author | Ingo Molnar <mingo@kernel.org> | 2025-05-21 08:42:51 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2025-05-21 08:45:03 +0200 |
commit | 412751aa6991501d7defeadecfede59043d1b5e8 (patch) | |
tree | ee5026e79128dd4eacb935f76564d7dcc105b24f /net/core/devmem.c | |
parent | e95534e107d2e9e136aa4d7cbededb3827e80074 (diff) | |
parent | a5806cd506af5a7c19bcd596e4708b5c464bfd21 (diff) |
Merge tag 'v6.15-rc7' into x86/core, to pick up fixes
Pick up build fixes from upstream to make this tree more testable.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/core/devmem.c')
-rw-r--r-- | net/core/devmem.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/core/devmem.c b/net/core/devmem.c index 6e27a47d0493..2db428ab6b8b 100644 --- a/net/core/devmem.c +++ b/net/core/devmem.c @@ -200,6 +200,8 @@ net_devmem_bind_dmabuf(struct net_device *dev, unsigned int dmabuf_fd, refcount_set(&binding->ref, 1); + mutex_init(&binding->lock); + binding->dmabuf = dmabuf; binding->attachment = dma_buf_attach(binding->dmabuf, dev->dev.parent); @@ -379,6 +381,11 @@ static void mp_dmabuf_devmem_uninstall(void *mp_priv, xa_for_each(&binding->bound_rxqs, xa_idx, bound_rxq) { if (bound_rxq == rxq) { xa_erase(&binding->bound_rxqs, xa_idx); + if (xa_empty(&binding->bound_rxqs)) { + mutex_lock(&binding->lock); + binding->dev = NULL; + mutex_unlock(&binding->lock); + } break; } } |