Advice on fixing unwanted master inheritance:

Thomas Hellstrom thellstrom at vmware.com
Sun Nov 29 09:44:03 PST 2015


Hi, all!

There's an odd master inheritance going on in drm. Consider the
following scenario.

1) Xorg opens DRM. Becomes master.
2) Plymouthd opens a file descriptor to drm.
3) Xorg exits.
4) Plymouthd calls drmSetMaster(). At this point it actually inherits
Xorg's master structure and all authenticated clients.
5) vmwgfx dislikes this and throws a BUG().

I can of course fix vmwgfx up to not throw a bug in this case, but I
figure this behavior is not really what we want, so I'd like to fix the
root cause as well, As I see it, we have two options.

A) If the client is authenticated with the master we allow the above
behaviour as a way to change master role in a master realm. If the
client is not authenticated, like Plymouthd in this case, we create a
new master structure for Plymouthd.

B) This behaviour is not allowed at all. We always create a new master
structure when this happens.

Opinions?

Thanks,
Thomas
 



More information about the dri-devel mailing list