You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "wengzhe (via GitHub)" <gi...@apache.org> on 2023/12/04 12:46:08 UTC

[PR] fs/proc: Fix groupfd to get fd by group instead of current tcb [nuttx]

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

   ## Summary
   `/proc/<pid>/group/fd` should read the fds of `<pid>`, not current tcb.
   
   Note: This problem exists between https://github.com/apache/nuttx/pull/11140 and this patch.
   
   ## Impact
   `/proc/<pid>/group/fd`
   
   ## Testing
   `fdinfo` command, which shows same result for every thread before this patch.
   
   


-- 
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


Re: [PR] fs/proc: Fix groupfd to get fd by group instead of current tcb [nuttx]

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on code in PR #11318:
URL: https://github.com/apache/nuttx/pull/11318#discussion_r1414522525


##########
include/nuttx/fs/fs.h:
##########
@@ -882,6 +882,19 @@ int files_duplist(FAR struct filelist *plist, FAR struct filelist *clist,
                   FAR const posix_spawn_file_actions_t *actions,
                   bool cloexec);
 
+/****************************************************************************
+ * Name: files_fget
+ *
+ * Description:
+ *   Get the instance of struct file from file list by file descriptor.
+ *

Review Comment:
   Ditto



##########
fs/inode/fs_files.c:
##########
@@ -347,6 +337,23 @@ int files_countlist(FAR struct filelist *list)
   return list->fl_rows * CONFIG_NFILE_DESCRIPTORS_PER_BLOCK;
 }
 
+/****************************************************************************
+ * Name: files_fget
+ *
+ * Description:
+ *   Get the instance of struct file from file list by file descriptor.
+ *

Review Comment:
   Please include the list of parameters



-- 
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


Re: [PR] fs/proc: Fix groupfd to get fd by group instead of current tcb [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #11318:
URL: https://github.com/apache/nuttx/pull/11318


-- 
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


Re: [PR] fs/proc: Fix groupfd to get fd by group instead of current tcb [nuttx]

Posted by "wengzhe (via GitHub)" <gi...@apache.org>.
wengzhe commented on code in PR #11318:
URL: https://github.com/apache/nuttx/pull/11318#discussion_r1414761357


##########
fs/inode/fs_files.c:
##########
@@ -347,6 +337,23 @@ int files_countlist(FAR struct filelist *list)
   return list->fl_rows * CONFIG_NFILE_DESCRIPTORS_PER_BLOCK;
 }
 
+/****************************************************************************
+ * Name: files_fget
+ *
+ * Description:
+ *   Get the instance of struct file from file list by file descriptor.
+ *

Review Comment:
   Done.



##########
include/nuttx/fs/fs.h:
##########
@@ -882,6 +882,19 @@ int files_duplist(FAR struct filelist *plist, FAR struct filelist *clist,
                   FAR const posix_spawn_file_actions_t *actions,
                   bool cloexec);
 
+/****************************************************************************
+ * Name: files_fget
+ *
+ * Description:
+ *   Get the instance of struct file from file list by file descriptor.
+ *

Review Comment:
   Done.



-- 
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