You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2023/01/10 15:32:06 UTC

[GitHub] [nuttx] pussuw opened a new pull request, #8072: fs/poll: Fix poll_notify for CONFIG_BUILD_KERNEL

pussuw opened a new pull request, #8072:
URL: https://github.com/apache/nuttx/pull/8072

   ## Summary
   With flat addressing the user pollfd list is given directly to the drivers that perform the notification. This is fine when the addressing is flat, as there is no ambiguity on who gets notified and the fds memory is always mapped.
   
   For kernel mode with MMU this does not work. The notification must be done via a temporary buffer allocated from kernel memory.
   
   Thus, create a copy of the user fds and pass the copy to the drivers. Afterwards copy the output events back to the user.
   ## Impact
   Fixes poll() for CONFIG_BUILD_KERNEL
   ## Testing
   icicle:knsh and in house risc-v target using CONFIG_BUILD_KERNEL
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 merged pull request #8072: fs/poll: Fix poll_notify for CONFIG_BUILD_KERNEL

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #8072:
URL: https://github.com/apache/nuttx/pull/8072


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #8072: fs/poll: Fix poll_notify for CONFIG_BUILD_KERNEL

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #8072:
URL: https://github.com/apache/nuttx/pull/8072#discussion_r1066686043


##########
fs/vfs/fs_poll.c:
##########
@@ -441,6 +441,7 @@ int file_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup)
 
 int poll(FAR struct pollfd *fds, nfds_t nfds, int timeout)
 {
+  struct pollfd *kfds;

Review Comment:
   FAR is missing here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org