# Re: \[PATCH net-next v10 4/5\] net: devmem: document NETDEV\_A\_DMABUF\_AUTORELEASE netlink attribute

- From: Jakub Kicinski \<kuba@kernel.org\>
- Date: 2026-01-21 00:36:52 
- List: netdev
- Page: https://ratatoskr.run/netdev/2026/01/3378974
- Thread: https://ratatoskr.run/netdev/2026/01/3371592/t.md

```text
On Thu, 15 Jan 2026 21:02:15 -0800 Bobby Eshleman wrote:
> +- Once a system-wide autorelease mode is selected (via the first binding),
> +  all subsequent bindings must use the same mode. Attempts to create bindings
> +  with a different mode will be rejected with -EBUSY.

Why?

> +- Applications using manual release mode (autorelease=0) must ensure all tokens
> +  are returned via SO_DEVMEM_DONTNEED before socket close to avoid resource
> +  leaks during the lifetime of the dmabuf binding. Tokens not released before
> +  close() will only be freed when all RX queues are unbound AND all sockets
> +  that called recvmsg() are closed.

Could you add a short example on how? by calling shutdown()?
```
