提交 c77d17c0 编写于 作者: S Sean Young 提交者: Mauro Carvalho Chehab

[media] lirc: use-after free while reading from device and unplugging

Many lirc drivers have their own receive buffers which are freed on
unplug (e.g. ir_lirc_unregister). This means that ir->buf->wait_poll
will be freed directly after unplug so do not remove yourself from the
wait queue.
Signed-off-by: NSean Young <sean@mess.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 afbb1101
......@@ -715,7 +715,7 @@ ssize_t lirc_dev_fop_read(struct file *file,
if (!ir->attached) {
ret = -ENODEV;
break;
goto out_locked;
}
} else {
lirc_buffer_read(ir->buf, buf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册