All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Vesely <jan.vesely@rutgers.edu>
To: dri-devel@lists.freedesktop.org
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Subject: Re: [libdrm][PATCH 3/2] Fix always true comparison.
Date: Wed, 25 Feb 2015 12:11:40 -0500	[thread overview]
Message-ID: <1424884300.4113.11.camel@rutgers.edu> (raw)
In-Reply-To: <1423527043-21264-1-git-send-email-jan.vesely@rutgers.edu>


[-- Attachment #1.1: Type: text/plain, Size: 1032 bytes --]

gentle ping


On Mon, 2015-02-09 at 19:10 -0500, Jan Vesely wrote:
> The only user I found is xserver, it can return -1 under certain conditions.
> So check for -1 explicitly.
> 
> Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
> ---
> 
> I could not find whether it's actually legal to return encoded negative values
> in get_perm. This is a quick fix to detect the one case that I found.
> 
>  xf86drm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xf86drm.c b/xf86drm.c
> index fb673b5..8e54ac9 100644
> --- a/xf86drm.c
> +++ b/xf86drm.c
> @@ -335,7 +335,7 @@ static int drmOpenDevice(dev_t dev, int minor, int type)
>  	drm_server_info->get_perms(&serv_group, &serv_mode);
>  	devmode  = serv_mode ? serv_mode : DRM_DEV_MODE;
>  	devmode &= ~(S_IXUSR|S_IXGRP|S_IXOTH);
> -	group = (serv_group >= 0) ? serv_group : DRM_DEV_GID;
> +	group = (serv_group != ~0U) ? serv_group : DRM_DEV_GID;
>      }
>  
>  #if !defined(UDEV)

-- 
Jan Vesely <jan.vesely@rutgers.edu>

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-02-25 17:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-09 21:39 [libdrm][PATCH 1/2] random: Use unsigned long for seed Jan Vesely
2015-02-09 21:39 ` [libdrm][PATCH 2/2] Fix gcc -Wextra warnings Jan Vesely
2015-02-09 23:12   ` Ian Romanick
2015-02-09 23:32   ` Emil Velikov
2015-02-10  0:02     ` Jan Vesely
2015-02-10  0:27       ` Emil Velikov
2015-02-10 21:37         ` Jan Vesely
2015-02-10 22:55           ` Emil Velikov
2015-02-09 23:11 ` [libdrm][PATCH 1/2] random: Use unsigned long for seed Ian Romanick
2015-02-09 23:26   ` Jan Vesely
2015-02-09 23:28   ` [libdrm][PATCH v2 " Jan Vesely
2015-02-10 18:21     ` Ian Romanick
2015-02-10  0:10 ` [libdrm][PATCH 3/2] Fix always true comparison Jan Vesely
2015-02-25 17:11   ` Jan Vesely [this message]
2015-02-25 18:41     ` Emil Velikov
2015-03-02 20:01       ` Jan Vesely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1424884300.4113.11.camel@rutgers.edu \
    --to=jan.vesely@rutgers.edu \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.