If failed in pty_register2, it is possible to enter unregister_driver
function, which eventually calls ptmx_minor_free, resulting in mutex
conflict.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
For some case, need large files from tmpfs or shmfs, will lead to high
pressure on memory fragments, add an optional fs_heap with independent
heap will benifit for memory fragments issue.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
Only in the non-critical region, nuttx can the respond to the irq and not hold the lock
When returning from the irq, there is no need to check whether the lock needs to be released
we also need keep restore_critical_section in svc call
test:
Configuring NuttX and compile:
$ ./tools/configure.sh -l qemu-armv8a:nsh_smp
$ make
Running with qemu
$ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \
-machine virt,virtualization=on,gic-version=3 \
-net none -chardev stdio,id=con,mux=on -serial chardev:con \
-mon chardev=con,mode=readline -kernel ./nuttx
Signed-off-by: hujun5 <hujun5@xiaomi.com>
"/home/guoshichao/work_profile/vela_os/vela_car_4/nuttx/include/nuttx/net/netdev.h", line 493: warning #231-D:
declaration is not visible outside of function
FAR struct netdev_ifaddr6_s *addr,
^
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
CC: irq/irq_initialize.c "ioexpander/gpio.c", line 386: warning #188-D: enumerated type mixed with
another type
*ptr = dev->gp_pintype;
^
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
"net/netdev_upperhalf.c", line 133: warning #188-D: enumerated type mixed with
another type
total += netdev_lower_quota_load(lower, type);
CC: dirent/lib_alphasort.c "spi/spi_transfer.c", line 83: warning #188-D: enumerated type mixed with
another type
SPI_SETMODE(spi, seq->mode);
^
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
CC: modlib/modlib_depend.c "modlib/modlib_bind.c", line 741: warning #186-D: pointless comparison of
unsigned integer with zero
if (rel->r_offset < 0)
^
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
[Desc]:We need to check the parameter passed to the kmm_zalloc(size_t) function.
If it exceeds the limit of size_t, we need to return an error directly to avoid further errors.
Signed-off-by: pengyinjie <pengyinjie@xiaomi.com>
we add ghs header file support using to fix the following link error:
[elxr] (error #412) unresolved symbols: 1
__sync_synchronize from libopenamp.a(io.o)
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
1. Tcp will idle loop by tcp_timer when have no packet to send. This will cause low-power devices to be frequently woken up.
2. We should add tcp_timer when timer has been canceled and have packet to send.
Signed-off-by: meijian <meijian@xiaomi.com>
1.Add sign to indicate negative and positive
2.Fix case where there are negative numbers in the operation
3.expand to 512 bytes to support rsa2048
Signed-off-by: makejian <makejian@xiaomi.com>
if dev->d_flags is POLICY_1, the circbuf cannot be initialized incorrectly.
We determine whether the circbuf should be initialized based on first reference on device and d_buffer is NULL
Signed-off-by: wangchen <wangchen41@xiaomi.com>
For udp localsocket current implementation,the sent information only carries the packet info.
The receiver receives the information,it don't know who the information comes from.
Thus the receiver doesn't know who to send the response message to.
We add sender's binding path info in the information,the receiver knows who sent the information
based on the parsed information.
The receiver knows who to send the response message to.
Signed-off-by: wangchen <wangchen41@xiaomi.com>
From the current implementation,udp localsoket receiver's pipe is closed, the sender write failed in the pipe;
we change the implementation to check if buffer is free(PIPE_IS_POLICY_0),if not free,the sender could write in the pipe;
From the current implementation,udp localsoket sender's pipe is empty,the recevier directly return end of file;
we change the implementation to check if buffer is free(PIPE_IS_POLICY_0),if not free,the receiver wait for data
Signed-off-by: wangchen <wangchen41@xiaomi.com>
thread1 thread2
open pipe open pipe
close()
-> pipecommon_close()
-> check inode refs
-> do NOT free dev close()
-> pipecommon_close()
-> check inode refs
-> do NOT free dev
-> inode_release
inode refs--
-> inode_release
inode refs--
Then, you will see the pipe hasn't free its resource, memleak
Resolve:
replace the inode refs with priv refs
Signed-off-by: ligd <liguiding1@xiaomi.com>