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 2020/03/29 19:50:49 UTC

[GitHub] [incubator-nuttx] patacongo opened a new pull request #647: Check return from nxsem_wait_initialize()

patacongo opened a new pull request #647: Check return from nxsem_wait_initialize()
URL: https://github.com/apache/incubator-nuttx/pull/647
 
 
   Resolution of Issue 619 will require multiple steps, this part of the first step in that resolution:  Every call to nxsem_wait_uninterruptible() must handle the return value from nxsem_wait_uninterruptible properly.  This commit is only for those files under fs/tmpfs and fs/spiffs.  Still do do:  The rest of fs/ and all of drivers/ and arch/.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx] patacongo commented on a change in pull request #647: Check return from nxsem_wait_initialize()

Posted by GitBox <gi...@apache.org>.
patacongo commented on a change in pull request #647: Check return from nxsem_wait_initialize()
URL: https://github.com/apache/incubator-nuttx/pull/647#discussion_r399851566
 
 

 ##########
 File path: fs/spiffs/src/spiffs_vfs.c
 ##########
 @@ -385,7 +392,11 @@ static int spiffs_open(FAR struct file *filep, FAR const char *relpath,
 
   /* Get exclusive access to the file system */
 
-  spiffs_lock_volume(fs);
+  ret = spiffs_lock_volume(fs);
+  if (ret < 0)
+    {
+      return ret;
 
 Review comment:
   Should be fixed.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #647: Check return from nxsem_wait_initialize()

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on a change in pull request #647: Check return from nxsem_wait_initialize()
URL: https://github.com/apache/incubator-nuttx/pull/647#discussion_r399848709
 
 

 ##########
 File path: fs/tmpfs/fs_tmpfs.c
 ##########
 @@ -1029,7 +1032,13 @@ static int tmpfs_find_object(FAR struct tmpfs_s *fs,
            * count on the object.
            */
 
-          tmpfs_lock_directory(tdo);
+          ret = tmpfs_lock_directory(tdo);
+          if (ret < 0)
+            {
+              kmm_free(copy);
 
 Review comment:
   Isn't `copy` already freed by line 1023?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx] patacongo commented on a change in pull request #647: Check return from nxsem_wait_initialize()

Posted by GitBox <gi...@apache.org>.
patacongo commented on a change in pull request #647: Check return from nxsem_wait_initialize()
URL: https://github.com/apache/incubator-nuttx/pull/647#discussion_r399851670
 
 

 ##########
 File path: fs/tmpfs/fs_tmpfs.c
 ##########
 @@ -1029,7 +1032,13 @@ static int tmpfs_find_object(FAR struct tmpfs_s *fs,
            * count on the object.
            */
 
-          tmpfs_lock_directory(tdo);
+          ret = tmpfs_lock_directory(tdo);
+          if (ret < 0)
+            {
+              kmm_free(copy);
 
 Review comment:
   Yes, thanks.  fixed.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #647: Check return from nxsem_wait_initialize()

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on a change in pull request #647: Check return from nxsem_wait_initialize()
URL: https://github.com/apache/incubator-nuttx/pull/647#discussion_r399849196
 
 

 ##########
 File path: fs/tmpfs/fs_tmpfs.c
 ##########
 @@ -2451,7 +2528,11 @@ static int tmpfs_rename(FAR struct inode *mountpt, FAR const char *oldrelpath,
 
   /* Get exclusive access to the file system */
 
-  tmpfs_lock(fs);
+  ret = tmpfs_lock(fs);
+  if (ret < 0)
+    {
+      return ret;
 
 Review comment:
   copy allocated by strdup isn't freed.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #647: Check return from nxsem_wait_initialize()

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on a change in pull request #647: Check return from nxsem_wait_initialize()
URL: https://github.com/apache/incubator-nuttx/pull/647#discussion_r399847888
 
 

 ##########
 File path: fs/spiffs/src/spiffs_vfs.c
 ##########
 @@ -385,7 +392,11 @@ static int spiffs_open(FAR struct file *filep, FAR const char *relpath,
 
   /* Get exclusive access to the file system */
 
-  spiffs_lock_volume(fs);
+  ret = spiffs_lock_volume(fs);
+  if (ret < 0)
+    {
+      return ret;
 
 Review comment:
   Is the allocation of line 383 freed?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #647: Check return from nxsem_wait_initialize()

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on a change in pull request #647: Check return from nxsem_wait_initialize()
URL: https://github.com/apache/incubator-nuttx/pull/647#discussion_r399848709
 
 

 ##########
 File path: fs/tmpfs/fs_tmpfs.c
 ##########
 @@ -1029,7 +1032,13 @@ static int tmpfs_find_object(FAR struct tmpfs_s *fs,
            * count on the object.
            */
 
-          tmpfs_lock_directory(tdo);
+          ret = tmpfs_lock_directory(tdo);
+          if (ret < 0)
+            {
+              kmm_free(copy);
 
 Review comment:
   Isn't copy already freed by line 1023?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #647: Check return from nxsem_wait_initialize()

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on a change in pull request #647: Check return from nxsem_wait_initialize()
URL: https://github.com/apache/incubator-nuttx/pull/647#discussion_r399849196
 
 

 ##########
 File path: fs/tmpfs/fs_tmpfs.c
 ##########
 @@ -2451,7 +2528,11 @@ static int tmpfs_rename(FAR struct inode *mountpt, FAR const char *oldrelpath,
 
   /* Get exclusive access to the file system */
 
-  tmpfs_lock(fs);
+  ret = tmpfs_lock(fs);
+  if (ret < 0)
+    {
+      return ret;
 
 Review comment:
   `copy` allocated by strdup isn't freed.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx] Ouss4 merged pull request #647: Check return from nxsem_wait_initialize()

Posted by GitBox <gi...@apache.org>.
Ouss4 merged pull request #647: Check return from nxsem_wait_initialize()
URL: https://github.com/apache/incubator-nuttx/pull/647
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx] patacongo commented on a change in pull request #647: Check return from nxsem_wait_initialize()

Posted by GitBox <gi...@apache.org>.
patacongo commented on a change in pull request #647: Check return from nxsem_wait_initialize()
URL: https://github.com/apache/incubator-nuttx/pull/647#discussion_r399851718
 
 

 ##########
 File path: fs/tmpfs/fs_tmpfs.c
 ##########
 @@ -2451,7 +2528,11 @@ static int tmpfs_rename(FAR struct inode *mountpt, FAR const char *oldrelpath,
 
   /* Get exclusive access to the file system */
 
-  tmpfs_lock(fs);
+  ret = tmpfs_lock(fs);
+  if (ret < 0)
+    {
+      return ret;
 
 Review comment:
   Now it is!  Thanks again.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-nuttx] Ouss4 commented on a change in pull request #647: Check return from nxsem_wait_initialize()

Posted by GitBox <gi...@apache.org>.
Ouss4 commented on a change in pull request #647: Check return from nxsem_wait_initialize()
URL: https://github.com/apache/incubator-nuttx/pull/647#discussion_r399849196
 
 

 ##########
 File path: fs/tmpfs/fs_tmpfs.c
 ##########
 @@ -2451,7 +2528,11 @@ static int tmpfs_rename(FAR struct inode *mountpt, FAR const char *oldrelpath,
 
   /* Get exclusive access to the file system */
 
-  tmpfs_lock(fs);
+  ret = tmpfs_lock(fs);
+  if (ret < 0)
+    {
+      return ret;
 
 Review comment:
   `copy` allocated by `strdup` is nott freed.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services