zhhyu7 opened a new pull request, #17782:
URL: https://github.com/apache/nuttx/pull/17782
## Summary
Protect usrsock_rpmsg_server resources through conn_lock, avoid lack of
protection for usrsock_rpmsg_server after net_lock modification.
## Impact
usrsock rpmsg server.
## Testing
sim:rpserver with usrsocktest and sim:rpserver with im:rpproxy
usrsocktest log:
```
NuttShell (NSH) NuttX-12.12.0
server> free
total used free maxused maxfree nused nfree name
67108860 1539596 65569264 1606816 65503016 95 2 Umem
server> usrsocktest
Starting unit-tests...
Testing group "char_dev" =>
Group "char_dev": [OK]
Testing group "no_daemon" =>
Group "no_daemon": [OK]
Testing group "basic_daemon" =>
Group "basic_daemon": [OK]
Testing group "basic_connect" =>
Group "basic_connect": [OK]
Testing group "basic_connect_delay" =>
Group "basic_connect_delay": [OK]
Testing group "no_block_connect" =>
Group "no_block_connect": [OK]
Testing group "basic_send" =>
Group "basic_send": [OK]
Testing group "no_block_send" =>
Group "no_block_send": [OK]
Testing group "block_send" =>
Group "block_send": [OK]
Testing group "no_block_recv" =>
Group "no_block_recv": [OK]
Testing group "block_recv" =>
Group "block_recv": [OK]
Testing group "remote_disconnect" =>
Group "remote_disconnect": [OK]
Testing group "basic_setsockopt" =>
Group "basic_setsockopt": [OK]
Testing group "basic_getsockopt" =>
Group "basic_getsockopt": [OK]
Testing group "basic_getsockname" =>
Group "basic_getsockname": [OK]
Testing group "wake_with_signal" =>
Group "wake_with_signal": [OK]
Testing group "multithread" =>
Group "multithread": [OK]
Unit-test groups done... OK:17, FAILED:0, TOTAL:17
-- number of checks made: 3596
HEAP BEFORE TESTS:
total used free largest
Mem: 67108860 1609220 65499640 65433376
HEAP AFTER TESTS:
total used free largest
Mem: 67108860 1812900 65295960 65095416
server>
server> free
total used free maxused maxfree nused nfree name
67108860 1539692 65569168 1950440 65503016 97 3 Umem
server> usrsocktest
Starting unit-tests...
Testing group "char_dev" =>
Group "char_dev": [OK]
Testing group "no_daemon" =>
Group "no_daemon": [OK]
Testing group "basic_daemon" =>
Group "basic_daemon": [OK]
Testing group "basic_connect" =>
Group "basic_connect": [OK]
Testing group "basic_connect_delay" =>
Group "basic_connect_delay": [OK]
Testing group "no_block_connect" =>
Group "no_block_connect": [OK]
Testing group "basic_send" =>
Group "basic_send": [OK]
Testing group "no_block_send" =>
Group "no_block_send": [OK]
Testing group "block_send" =>
Group "block_send": [OK]
Testing group "no_block_recv" =>
Group "no_block_recv": [OK]
Testing group "block_recv" =>
Group "block_recv": [OK]
Testing group "remote_disconnect" =>
Group "remote_disconnect": [OK]
Testing group "basic_setsockopt" =>
Group "basic_setsockopt": [OK]
Testing group "basic_getsockopt" =>
Group "basic_getsockopt": [OK]
Testing group "basic_getsockname" =>
Group "basic_getsockname": [OK]
Testing group "wake_with_signal" =>
Group "wake_with_signal": [OK]
Testing group "multithread" =>
Group "multithread": [OK]
Unit-test groups done... OK:17, FAILED:0, TOTAL:17
-- number of checks made: 3596
HEAP BEFORE TESTS:
total used free largest
Mem: 67108860 1609316 65499544 65433376
HEAP AFTER TESTS:
total used free largest
Mem: 67108860 1812900 65295960 65095416
server>
server> free
total used free maxused maxfree nused nfree name
67108860 1539692 65569168 1950440 65503016 97 3 Umem
server>
```
sim:rpserver with im:rpproxy test log:
```
NuttShell (NSH) NuttX-12.12.0
server> ifconfig eth0 10.0.1.2/24
server> ping -c 3 10.0.1.1
PING 10.0.1.1 56 bytes of data
56 bytes from 10.0.1.1: icmp_seq=0 time=0.0 ms
56 bytes from 10.0.1.1: icmp_seq=1 time=0.0 ms
56 bytes from 10.0.1.1: icmp_seq=2 time=0.0 ms
3 packets transmitted, 3 received, 0% packet loss, time 3030 ms
rtt min/avg/max/mdev = 0.000/0.000/0.000/0.000 ms
server> cu
NuttShell (NSH) NuttX-12.12.0
proxy>
proxy> ping -c 3 10.0.1.1
PING 10.0.1.1 56 bytes of data
56 bytes from 10.0.1.1: icmp_seq=0 time=40.0 ms
56 bytes from 10.0.1.1: icmp_seq=1 time=30.0 ms
56 bytes from 10.0.1.1: icmp_seq=2 time=40.0 ms
3 packets transmitted, 3 received, 0% packet loss, time 3030 ms
rtt min/avg/max/mdev = 30.000/36.666/40.000/4.719 ms
proxy>
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]