summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-03-07 03:37:06 +0000
committerjhb <jhb@FreeBSD.org>2001-03-07 03:37:06 +0000
commit9cd254601baefc2dc9c953abe9747717374ff8b1 (patch)
treeac4298224e8af28e8b2f904a43a2925c21dfc798 /sys/pci
parentace71d59bf35fa6d911520ec855d0100773422a8 (diff)
downloadFreeBSD-src-9cd254601baefc2dc9c953abe9747717374ff8b1.zip
FreeBSD-src-9cd254601baefc2dc9c953abe9747717374ff8b1.tar.gz
Grab the process lock while calling psignal and before calling psignal.
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/meteor.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/pci/meteor.c b/sys/pci/meteor.c
index d9fe31a..088ca7c 100644
--- a/sys/pci/meteor.c
+++ b/sys/pci/meteor.c
@@ -649,8 +649,11 @@ meteor_intr(void *arg)
* If the user requested to be notified via signal,
* let them know the field is complete.
*/
- if(mtr->proc && (mtr->signal & METEOR_SIG_MODE_MASK))
+ if(mtr->proc && (mtr->signal & METEOR_SIG_MODE_MASK)) {
+ PROC_LOCK(mtr->proc);
psignal(mtr->proc, mtr->signal&(~METEOR_SIG_MODE_MASK));
+ PROC_UNLOCK(mtr->proc);
+ }
}
if (status & 0x2) { /* odd field */
mtr->odd_fields_captured++;
@@ -663,8 +666,11 @@ meteor_intr(void *arg)
* If the user requested to be notified via signal,
* let them know the field is complete.
*/
- if(mtr->proc && (mtr->signal & METEOR_SIG_MODE_MASK))
+ if(mtr->proc && (mtr->signal & METEOR_SIG_MODE_MASK)) {
+ PROC_LOCK(mtr->proc);
psignal(mtr->proc, mtr->signal&(~METEOR_SIG_MODE_MASK));
+ PROC_UNLOCK(mtr->proc);
+ }
}
/*
@@ -696,8 +702,11 @@ meteor_intr(void *arg)
* If the user requested to be notified via signal,
* let them know the frame is complete.
*/
- if(mtr->proc && !(mtr->signal & METEOR_SIG_MODE_MASK))
+ if(mtr->proc && !(mtr->signal & METEOR_SIG_MODE_MASK)) {
+ PROC_LOCK(mtr->proc);
psignal(mtr->proc, mtr->signal&(~METEOR_SIG_MODE_MASK));
+ PROC_UNLOCK(mtr->proc);
+ }
/*
* Reset the want flags if in continuous or
* synchronous capture mode.
OpenPOWER on IntegriCloud