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/25 12:02:27 UTC
[incubator-nuttx] branch master updated: Added lock in ifr ioctl calls.
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.git
The following commit(s) were added to refs/heads/master by this push:
new 9bc47ecdce Added lock in ifr ioctl calls.
9bc47ecdce is described below
commit 9bc47ecdce7959bc50ce7ea8f3d05d4cf626c1ae
Author: Fotis Panagiotopoulos <f....@gmail.com>
AuthorDate: Thu Aug 25 02:00:26 2022 +0300
Added lock in ifr ioctl calls.
---
net/netdev/netdev_ioctl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/netdev/netdev_ioctl.c b/net/netdev/netdev_ioctl.c
index 2f5a44f94d..b33871f09c 100644
--- a/net/netdev/netdev_ioctl.c
+++ b/net/netdev/netdev_ioctl.c
@@ -641,6 +641,8 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd,
ninfo("cmd: %d\n", cmd);
+ net_lock();
+
/* Execute the command */
switch (cmd)
@@ -1139,6 +1141,8 @@ static int netdev_ifr_ioctl(FAR struct socket *psock, int cmd,
break;
}
+ net_unlock();
+
return ret;
}