Messages in this thread Patch in this message | | | From | Andrey Drobyshev <> | Subject | [PATCH 4/8] LinuxPPS: kapi: Unlock before waking up events queue in pps_event(). | Date | Wed, 15 Feb 2017 17:31:05 +0300 |
| |
From: Alexander GQ Gerasiov <gq@redlab-i.ru>
Otherwise we get "scheduling while atomic" problem.
Signed-off-by: Alexander GQ Gerasiov <gq@redlab-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
| |