The dmi_buffer_context function returns the context the buffer belongs to,
so that everything holding a buffer can reach the context without being
handed it separately.
Parameters
buffer
Buffer to query.
Return value
Context of the buffer, or nullptr if buffer is nullptr or belongs to
none.