lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Sun, 30 Dec 2018 18:17:44 +0800
From:   Yi Qingliang <niqingliang2003@...il.com>
To:     linux-kernel@...r.kernel.org
Subject: epoll and vb2_poll: can't wake_up

Hello, I encountered a "can't wake_up" problem when use camera on imx6.

if delay some time after 'streamon' the /dev/video0, then add fd
through epoll_ctl, then the process can't be waken_up after some time.

I checked both the epoll / vb2_poll(videobuf2_core.c) code.

epoll will pass 'poll_table' structure to vb2_poll, but it only
contain valid function pointer when inserting fd.

in vb2_poll, if found new data in done list, it will not call 'poll_wait'.
after that, every call to vb2_poll will not contain valid poll_table,
which will result in all calling to poll_wait will not work.

so if app can process frames quickly, and found frame data when
inserting fd (i.e. poll_wait will not be called or not contain valid
function pointer), it will not found valid frame in 'vb2_poll' finally
at some time, then call 'poll_wait' to expect be waken up at following
vb2_buffer_done, but no good luck.

I also checked the 'videobuf-core.c', there is no this problem.

of course, both epoll and vb2_poll are right by itself side, but the
result is we can't get new frames.

I think by epoll's implementation, the user should always call poll_wait.

and it's better to split the two actions: 'wait' and 'poll' both for
epoll framework and all epoll users, for example, v4l2.

am I right?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ