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/linux Don't forget to lock wq_lock aro...
details: https://anonhg.NetBSD.org/src/rev/1448af853b1f
branches: trunk
changeset: 331893:1448af853b1f
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Aug 29 15:22:18 2014 +0000
description:
Don't forget to lock wq_lock around handling wq_delayed.
diffstat:
sys/external/bsd/drm2/linux/linux_work.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (38 lines):
diff -r 8a7580af7c51 -r 1448af853b1f sys/external/bsd/drm2/linux/linux_work.c
--- a/sys/external/bsd/drm2/linux/linux_work.c Fri Aug 29 12:14:29 2014 +0000
+++ b/sys/external/bsd/drm2/linux/linux_work.c Fri Aug 29 15:22:18 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_work.c,v 1.7 2014/07/29 17:36:06 riastradh Exp $ */
+/* $NetBSD: linux_work.c,v 1.8 2014/08/29 15:22:18 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_work.c,v 1.7 2014/07/29 17:36:06 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_work.c,v 1.8 2014/08/29 15:22:18 riastradh Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -577,7 +577,9 @@
&linux_worker_intr, dw);
dw->work.w_state = WORK_DELAYED;
dw->work.w_wq = wq;
+ mutex_enter(&wq->wq_lock);
TAILQ_INSERT_HEAD(&wq->wq_delayed, dw, dw_entry);
+ mutex_exit(&wq->wq_lock);
}
newly_queued = true;
break;
@@ -636,7 +638,9 @@
&linux_worker_intr, dw);
dw->work.w_state = WORK_DELAYED;
dw->work.w_wq = wq;
+ mutex_enter(&wq->wq_lock);
TAILQ_INSERT_HEAD(&wq->wq_delayed, dw, dw_entry);
+ mutex_exit(&wq->wq_lock);
}
timer_modified = false;
break;
Home |
Main Index |
Thread Index |
Old Index