[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1487169069-15721-5-git-send-email-immortalguardian1@gmail.com>
Date: Wed, 15 Feb 2017 17:31:05 +0300
From: Andrey Drobyshev <immortalguardian1@...il.com>
To: linux-kernel@...r.kernel.org
Cc: gq@...msu.su, giometti@...eenne.com
Subject: [PATCH 4/8] LinuxPPS: kapi: Unlock before waking up events queue in pps_event().
From: Alexander GQ Gerasiov <gq@...lab-i.ru>
Otherwise we get "scheduling while atomic" problem.
Signed-off-by: Alexander GQ Gerasiov <gq@...lab-i.ru>
---
drivers/pps/kapi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/pps/kapi.c b/drivers/pps/kapi.c
index 805c749..a9a111d 100644
--- a/drivers/pps/kapi.c
+++ b/drivers/pps/kapi.c
@@ -226,11 +226,11 @@ void pps_event(struct pps_device *pps, struct pps_event_time *ts, int event,
/* Wake up if captured something */
if (captured) {
pps->last_ev++;
+ spin_unlock_irqrestore(&pps->lock, flags);
wake_up_interruptible_all(&pps->queue);
-
kill_fasync(&pps->async_queue, SIGIO, POLL_IN);
- }
- spin_unlock_irqrestore(&pps->lock, flags);
+ } else
+ spin_unlock_irqrestore(&pps->lock, flags);
}
EXPORT_SYMBOL(pps_event);
--
2.1.4
Powered by blists - more mailing lists