#include #include "taia.h" static const struct taia tolerance_taia = { .sec.x = 0, .nano = 700000000ULL, /* 700ms acceptance window */ .atto = 0, }; bool taia_looks_good(struct taia *arr_taia, struct taia *pkt_taia) { bool good = false; struct taia tmp; if (taia_less(arr_taia, pkt_taia)) { taia_sub(&tmp, pkt_taia, arr_taia); if (taia_less(&tmp, &tolerance_taia)) good = true; } else { taia_sub(&tmp, arr_taia, pkt_taia); if (taia_less(&tmp, &tolerance_taia)) good = true; } return good; } net-next.git Git repository'/>
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
:33 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-06-20 21:20:16 +0200
commite4245ea898797f606cf2260c9c1970414b96af78 (patch)
tree8b3538d0384afab78c6799f497f304f6bf07d7fb
parentc001da4f7c025a612a594b0ac421bce11fb5bc8b (diff)
drm: Prevent NULL deref in drm_name_info()
If a driver does not have a parent, or never sets the unique name for itself, then we may proceed to chase a NULL dereference through debugfs/.../name. Testcase: igt/vgem_basic/debugfs Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1466448813-23340-1-git-send-email-chris@chris-wilson.co.uk
-rw-r--r--drivers/gpu/drm/drm_info.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c