Re: [PATCH net] netlink: rx mmap: fix POLLIN condition

2015-08-30 Thread David Miller
From: Ken-ichirou MATSUZAWA Date: Mon, 31 Aug 2015 07:54:49 +0900 > Poll() returns immediately after setting the kernel current frame > (ring->head) to SKIP from user space even though there is no new > frame. And in a case of all frames is VALID, user space program > unintensionally sets (only)

[PATCH net] netlink: rx mmap: fix POLLIN condition

2015-08-30 Thread Ken-ichirou MATSUZAWA
Poll() returns immediately after setting the kernel current frame (ring->head) to SKIP from user space even though there is no new frame. And in a case of all frames is VALID, user space program unintensionally sets (only) kernel current frame to UNUSED, then calls poll(), it will not return immedi

Re: [PATCH net] netlink: rx mmap: fix POLLIN condition

2015-08-28 Thread Ken-ichirou MATSUZAWA
Thank you for the reply. On Tue, Aug 25, 2015 at 08:17:12PM -0700, David Miller wrote: > So if netlink_forward_ring() _actually_ sees an entry that we should > advance past, it will cycle through the whole ring, advancing ring->head > until it equals the "ring->head != head" loop test fails. >

Re: [PATCH net] netlink: rx mmap: fix POLLIN condition

2015-08-25 Thread David Miller
From: Ken-ichirou MATSUZAWA Date: Thu, 20 Aug 2015 14:54:47 +0900 > Now poll() returns immediately after setting kernel current frame > (ring->head) to SKIP from user space even if there are no new > frames. And in a case of all frames is VALID, user space program > unintensionally sets (only) ke

[PATCH net] netlink: rx mmap: fix POLLIN condition

2015-08-19 Thread Ken-ichirou MATSUZAWA
Now poll() returns immediately after setting kernel current frame (ring->head) to SKIP from user space even if there are no new frames. And in a case of all frames is VALID, user space program unintensionally sets (only) kernel current frame to UNUSED, then calls poll(), it will not return immediat