diff --git a/kernel-module/xt_RTPENGINE.c b/kernel-module/xt_RTPENGINE.c index fa11efbc0..2d72612ea 100644 --- a/kernel-module/xt_RTPENGINE.c +++ b/kernel-module/xt_RTPENGINE.c @@ -3438,6 +3438,8 @@ static unsigned int proc_stream_poll(struct file *f, struct poll_table_struct *p if (!stream) return POLLERR; + poll_wait(f, &stream->read_wq, p); + DBG("locking stream's packet list lock\n"); spin_lock_irqsave(&stream->packet_list_lock, flags); @@ -3448,8 +3450,6 @@ static unsigned int proc_stream_poll(struct file *f, struct poll_table_struct *p spin_unlock_irqrestore(&stream->packet_list_lock, flags); - poll_wait(f, &stream->read_wq, p); - stream_put(stream); return ret;