[PATCH hwc v2 03/18] drm_hwcomposer: drmeventlistener: Set nl_pid to 0

Robert Foss robert.foss at collabora.com
Mon Apr 16 10:32:56 UTC 2018


Hey Alexandru,

Feel free to add my SoB to this patch:
Signed-off-by: Robert Foss <robert.foss at collabora.com>


Rob.

On 04/11/2018 05:22 PM, Alexandru Gheorghe wrote:
> By setting nl_pid to 0, we let the kernel to assign a port for us.
> In the current implementation there is no way we could create more
> than one instance for drmeventlistener.
> 
> Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe at arm.com>
> ---
>   drmeventlistener.cpp | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drmeventlistener.cpp b/drmeventlistener.cpp
> index 984d1dd..5534182 100644
> --- a/drmeventlistener.cpp
> +++ b/drmeventlistener.cpp
> @@ -46,7 +46,7 @@ int DrmEventListener::Init() {
>     struct sockaddr_nl addr;
>     memset(&addr, 0, sizeof(addr));
>     addr.nl_family = AF_NETLINK;
> -  addr.nl_pid = getpid();
> +  addr.nl_pid = 0;
>     addr.nl_groups = 0xFFFFFFFF;
>   
>     int ret = bind(uevent_fd_.get(), (struct sockaddr *)&addr, sizeof(addr));
> 


More information about the dri-devel mailing list