igt-dev.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib: Check for a specific match if requested.
@ 2018-09-03 10:04 Chris Wilson
  2018-09-03 10:07 ` Chris Wilson
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Chris Wilson @ 2018-09-03 10:04 UTC (permalink / raw)
  To: igt-dev

We only want to allow driver_open to match an unknown driver if asked for
DRIVER_ANY, so we need to double check.

Fixes: 20087bf22698 ("lib: Use a bsearch to find the module name")
Reported-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
---
 lib/drmtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index adff1a81f..bfa2e0f0a 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -234,7 +234,7 @@ static int open_device(const char *name, unsigned int chipset)
 			break;
 		}
 	}
-	if (chipset & chip)
+	if ((chipset & chip) == chip)
 		return fd;
 
 err:
-- 
2.19.0.rc1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-09-03 14:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-03 10:04 [igt-dev] [PATCH i-g-t] lib: Check for a specific match if requested Chris Wilson
2018-09-03 10:07 ` Chris Wilson
2018-09-03 10:15 ` Petri Latvala
2018-09-03 10:41 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2018-09-03 14:01 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).