You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/08/15 13:41:23 UTC

[incubator-nuttx-apps] branch master updated (a3ccf5920 -> 26892be89)

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git


    from a3ccf5920 quickjs/Makefile: pass jobserver status to submake
     new 707b7be4d usrsock: ioctl Remove bad copy operations
     new 451243acc usrsock_server: Reduce unnecessary poll prepare
     new 26892be89 usrsock: fix usrsock close hang when net not ready

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 netutils/usrsock_rpmsg/usrsock_rpmsg_server.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)


[incubator-nuttx-apps] 01/03: usrsock: ioctl Remove bad copy operations

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 707b7be4da2d936cf6395a6dd66a883e86cf89b5
Author: zhanghongyu <zh...@xiaomi.com>
AuthorDate: Wed Apr 27 13:38:21 2022 +0800

    usrsock: ioctl Remove bad copy operations
    
    Signed-off-by: zhanghongyu <zh...@xiaomi.com>
---
 netutils/usrsock_rpmsg/usrsock_rpmsg_server.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/netutils/usrsock_rpmsg/usrsock_rpmsg_server.c b/netutils/usrsock_rpmsg/usrsock_rpmsg_server.c
index 0c8407898..13d85b36c 100644
--- a/netutils/usrsock_rpmsg/usrsock_rpmsg_server.c
+++ b/netutils/usrsock_rpmsg/usrsock_rpmsg_server.c
@@ -765,7 +765,7 @@ static int usrsock_rpmsg_ioctl_handler(struct rpmsg_endpoint *ept,
 #ifdef CONFIG_NETDEV_WIRELESS_IOCTL
       wlreq = (struct iwreq *)(req + 1);
       wlack = (struct iwreq *)(ack + 1);
-      if (WL_IS80211POINTERCMD(req->cmd))
+      if (WL_IS80211POINTERCMD(req->cmd) && wlreq->u.data.pointer)
         {
           wlack->u.data.pointer = wlack + 1;
         }
@@ -775,7 +775,7 @@ static int usrsock_rpmsg_ioctl_handler(struct rpmsg_endpoint *ept,
               req->cmd, (unsigned long)(ack + 1));
 
 #ifdef CONFIG_NETDEV_WIRELESS_IOCTL
-      if (WL_IS80211POINTERCMD(req->cmd))
+      if (WL_IS80211POINTERCMD(req->cmd) && wlreq->u.data.pointer)
         {
           if (ret >= 0)
             {


[incubator-nuttx-apps] 02/03: usrsock_server: Reduce unnecessary poll prepare

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 451243accba41f5937297e11af2664c66e09d49a
Author: zhanghongyu <zh...@xiaomi.com>
AuthorDate: Wed Apr 13 11:59:05 2022 +0800

    usrsock_server: Reduce unnecessary poll prepare
    
    Signed-off-by: zhanghongyu <zh...@xiaomi.com>
---
 netutils/usrsock_rpmsg/usrsock_rpmsg_server.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/netutils/usrsock_rpmsg/usrsock_rpmsg_server.c b/netutils/usrsock_rpmsg/usrsock_rpmsg_server.c
index 13d85b36c..d6004f466 100644
--- a/netutils/usrsock_rpmsg/usrsock_rpmsg_server.c
+++ b/netutils/usrsock_rpmsg/usrsock_rpmsg_server.c
@@ -971,9 +971,8 @@ static bool usrsock_rpmsg_process_poll(struct usrsock_rpmsg_s *priv,
               eventfd_t value;
 
               file_read(priv->eventfp, &value, sizeof(value));
+              prepare = true;
             }
-
-          prepare = true;
         }
       else
         {
@@ -1020,6 +1019,7 @@ static bool usrsock_rpmsg_process_poll(struct usrsock_rpmsg_s *priv,
 
                   pfds[i].ptr = NULL;
                   priv->pfds[j].ptr = NULL;
+                  prepare = true;
                 }
 
               if (events != 0)


[incubator-nuttx-apps] 03/03: usrsock: fix usrsock close hang when net not ready

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit 26892be8946ef3ed54c46839e1badb130710dd17
Author: zhanghongyu <zh...@xiaomi.com>
AuthorDate: Thu Apr 7 19:33:38 2022 +0800

    usrsock: fix usrsock close hang when net not ready
    
    reason: ept NULL when close request and poll event occur simultaneously
    
    Signed-off-by: zhanghongyu <zh...@xiaomi.com>
---
 netutils/usrsock_rpmsg/usrsock_rpmsg_server.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/netutils/usrsock_rpmsg/usrsock_rpmsg_server.c b/netutils/usrsock_rpmsg/usrsock_rpmsg_server.c
index d6004f466..0cb96590f 100644
--- a/netutils/usrsock_rpmsg/usrsock_rpmsg_server.c
+++ b/netutils/usrsock_rpmsg/usrsock_rpmsg_server.c
@@ -284,12 +284,12 @@ static int usrsock_rpmsg_close_handler(struct rpmsg_endpoint *ept,
   if (req->usockid >= 0 &&
       req->usockid < CONFIG_NETUTILS_USRSOCK_NSOCK_DESCRIPTORS)
     {
+      pthread_mutex_lock(&priv->mutex);
       priv->pfds[req->usockid].ptr = NULL;
       priv->epts[req->usockid] = NULL;
 
       /* Signal and wait the poll thread to wakeup */
 
-      pthread_mutex_lock(&priv->mutex);
       usrsock_rpmsg_notify_poll(priv);
       pthread_cond_wait(&priv->cond, &priv->mutex);
       pthread_mutex_unlock(&priv->mutex);