nuttx/drivers
dongjiuzhu1 1946bc4e44 drivers/serial: fix crash when buffer is full and only recvbuf is implemented
When the receive buffer is full and the driver only implements recvbuf
operation without receive operation, the code would crash due to calling
a NULL function pointer. This patch fixes the issue by:

1. Check if recvbuf is available before calling it
2. When buffer is full, use a temporary buffer to drain hardware FIFO
   to prevent data accumulation in hardware
3. Add proper NULL check for receive operation to avoid crash
4. Initialize pbuf to NULL to prevent uninitialized variable usage

This ensures the serial driver works correctly even when only recvbuf
is implemented and the receive buffer is full.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2026-01-28 22:19:21 +08:00
..
1wire
aie
analog drivers/analog/mcp47x6: fix configuration command 2026-01-22 00:12:37 +08:00
audio
bch
can ctucanfd: increase rwcnt bitfield width and fix structure alignment 2026-01-17 12:43:48 +01:00
clk
contactless
coresight
crypto
devicetree
dma
dummy
eeprom
efuse
i2c
i2s
i3c
input drivers/input/ff: use small lock to replace enter_critical_section 2026-01-08 11:17:17 +08:00
ioexpander ioe_dummy: fix pinval always zero issue 2026-01-05 15:10:41 -03:00
ipcc
lcd
leds drivers/leds: remove bo_closing as lu_lock can prevent race condition occurs 2026-01-08 11:17:17 +08:00
loop
math drivers/math: use small lock to replace enter_critical_section 2026-01-08 11:17:17 +08:00
misc drivers/misc/optee: add missing addrenv header include 2026-01-16 09:04:12 -03:00
mmcsd drivers/mmcsd: fix typo, it should be "Byte" by spec 2026-01-16 01:38:29 +08:00
modem
motor drivers/motor: use small lock to replace enter_critical_section 2026-01-08 11:17:17 +08:00
mtd mtd/mtd_config: add mtdconfig_register_by_path/mtdconfig_unregister_by_path api 2026-01-26 10:52:51 +08:00
net net: access the serial port in raw format to avoid character escaping 2026-01-22 23:17:08 +08:00
note note: add NOTE_DUMP_BINARY support for binary log dumping 2026-01-27 21:56:03 +08:00
pci drivers/pci: fix BAR size probing mask 2026-01-16 20:36:45 +08:00
pinctrl
pipes drivers/pipe: fix POLLHUP handling in poll() 2026-01-22 22:09:01 +08:00
power
rc
regmap
reset
rf
rmt
rpmsg drivers/rpmsg_port_uart: Fix some compile warnings 2026-01-28 19:23:41 +08:00
rptun drivers/rptun: it's not error when no carveout for virtio device 2026-01-19 14:18:27 +08:00
segger
sensors drivers/sensors: sensor bug fix. 2026-01-28 16:50:19 +08:00
serial drivers/serial: fix crash when buffer is full and only recvbuf is implemented 2026-01-28 22:19:21 +08:00
spi
syslog driver/ramlog: Implement the rate limiting function for ramlog driver. 2026-01-27 03:17:05 +08:00
thermal
timers drivers/pwm : remove critical section and mutex. 2026-01-27 17:59:07 +08:00
usbdev Author: shichunma <masc2008@gmail.com> Date: Thu Jan 15 07:24:08 2026 +0800 2026-01-25 23:59:49 +08:00
usbhost drivers/usbhost_hidkbd: Fix small typo in usbhost_hidkbd.c 2026-01-18 11:57:58 -05:00
usbmisc
usbmonitor
usrsock usrsock_rpmsg_server.c: replace net_lock with conn_lock 2026-01-07 09:17:49 -03:00
vhost drivers/vhost-rng: fix the vhost-rng compile error 2026-01-19 14:18:27 +08:00
video boards/sim: Fix watchdog callback 2026-01-23 09:46:02 +08:00
virtio virtio and vhost-rpmsg: add virtio and vhost rpmsg device support 2026-01-19 14:18:27 +08:00
wireless boards/sim: Fix watchdog callback 2026-01-23 09:46:02 +08:00
.gitignore
CMakeLists.txt
drivers_initialize.c drivers/net/rpmsgdrv.c: add bidirectional data netdev support, server side 2026-01-16 09:42:01 +08:00
Kconfig
Makefile