[Mesa-dev] [PATCH 1/2] loader: add loader_open_name(..)
Emil Velikov
emil.l.velikov at gmail.com
Thu Aug 2 15:47:15 UTC 2018
On 1 August 2018 at 22:07, Christian Gmeiner
<christian.gmeiner at gmail.com> wrote:
> Add an improved drmOpenWithType(..) clone which fixes some serious
> flaws. Some highlights:
> - using busid works only with PCI devices
> - open() w/o O_CLOEXEC
> - when build w/o udev - it creates a node: mkdir, chown(root), chmod, mknod
> - calls back into Xserver/DDX module
> - last but no least - borderline hacks with massive documentation [1]
> to keep this running.
>
Please don't copy random hunks from libdrm. There are some hidden
dragons in there - just like the one Eric pointed out.
Instead you can move/factor out tegra_open_render_node() into a helper
and use that ;-)
Bonus points, if you plug the mem leak, just after strcmp call.
Thanks
Emil
More information about the mesa-dev
mailing list