Skip to content

Conversation

@obiwac
Copy link
Contributor

@obiwac obiwac commented Jan 6, 2026

kern_fstat, which ends up calling dma_buf_stat does not zero this for us (see D54556). This causes issues because obviously we're leaking kernel stack to the userspace, but also because the st_ino field contains garbage.

The wlroots Vulkan renderer relies on checking inos of all the planes of a DMA-BUF to know if it is disjointed or not, (see render/vulkan/texture.c:is_dmabuf_disjoint). This caused very transient issues, where sometimes these inos happened to not match up.

I don't yet know how Linux sets the inos on DMA-BUF planes, but in fine we will want to emulate that behaviour. This fixes things for now though as now all inos are 0 so they will never be seen as disjointed.

@obiwac obiwac force-pushed the bugfix/zero-out-sb branch from fc047c2 to ceb7d3e Compare January 15, 2026 18:04
@emaste
Copy link
Member

emaste commented Jan 20, 2026

Makes sense. Let's use memset though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants