Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/drm Don't return events that are too l...
details: https://anonhg.NetBSD.org/src/rev/6159fa61eb48
branches: trunk
changeset: 336656:6159fa61eb48
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Mar 08 23:37:56 2015 +0000
description:
Don't return events that are too large and leave them in the list.
diffstat:
sys/external/bsd/drm2/drm/drm_drv.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r c09e4fe3a6ea -r 6159fa61eb48 sys/external/bsd/drm2/drm/drm_drv.c
--- a/sys/external/bsd/drm2/drm/drm_drv.c Sun Mar 08 22:47:22 2015 +0000
+++ b/sys/external/bsd/drm2/drm/drm_drv.c Sun Mar 08 23:37:56 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_drv.c,v 1.14 2015/03/06 14:02:39 riastradh Exp $ */
+/* $NetBSD: drm_drv.c,v 1.15 2015/03/08 23:37:56 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.14 2015/03/06 14:02:39 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.15 2015/03/08 23:37:56 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -469,6 +469,8 @@
event = list_first_entry(&file->event_list, struct drm_pending_event,
link);
if (event->event->length > max_length) {
+ /* Event is too large, can't return it. */
+ event = NULL;
ret = 0;
goto out;
}
Home |
Main Index |
Thread Index |
Old Index