nuttx/fs
dongjiuzhu1 1b6733c056 fs/mqueue: fix inverted 'created' flag in file_mq_vopen
The 'created' flag values were incorrectly inverted in file_mq_vopen():

1. When opening an existing message queue (inode_find succeeds):
   - Before: incorrectly set *created = 1 (indicating new creation)
   - After: correctly set *created = 0 (indicating existing queue)

2. When creating a new message queue (inode_find fails):
   - Before: incorrectly set *created = 0 (indicating existing queue)
   - After: correctly set *created = 1 (indicating new creation)

This bug could lead to incorrect resource management and cleanup behavior
in the calling function nxmq_vopen() when file_allocate() returns an error,
as it relies on the 'created' flag to determine whether the message queue
was newly created and needs to be cleaned up.

Impact:
- Resource leak when opening existing queues that should not be released
- Missing cleanup when creating new queues that should be released on error

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-12-31 02:27:37 +08:00
..
aio fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
binfs fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
cromfs fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
driver fs/fs.h: Add register_driver_with_size function 2025-11-13 08:57:52 -03:00
event fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
fat fs/fat: Ignore multiple consecutive slashes in long file names 2025-11-27 22:26:56 +08:00
hostfs style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
inode fs/fs_files: restore fd before calling fdlist_install 2025-06-26 09:31:14 -03:00
littlefs littlefs: fix statfs underflow during active writes 2025-12-29 14:23:04 +08:00
mmap fs/mmap/Kconfig: fix reference to non-existent readme 2025-10-11 17:07:51 -04:00
mnemofs style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
mount fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
mqueue fs/mqueue: fix inverted 'created' flag in file_mq_vopen 2025-12-31 02:27:37 +08:00
nfs style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
nxffs style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
partition style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
procfs mm:use Kconfig to control sequence number to save memory 2025-12-20 09:47:22 -03:00
romfs Revert "romfs:extend romfs to enable write" 2025-12-24 07:41:28 -03:00
rpmsgfs sched/sleep: replace all Signal-based sleep implement to Scheduled sleep 2025-10-17 14:05:02 +08:00
semaphore bugfix:the inode may have been removed by other core in SMP 2025-12-16 16:02:46 -03:00
shm fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
smartfs fs/smartfs: Fix a fatal bug about sector writing after seek 2025-06-13 20:42:36 +08:00
socket fs/vfs: Separate file descriptors from file descriptions 2025-06-12 18:12:42 +08:00
spiffs style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
tmpfs tmpfs:fix memoryleak of tmpfs_opendir 2025-12-22 11:02:10 -05:00
unionfs style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
userfs fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
v9fs refactor: fix spelling in private field names 2025-05-24 09:44:22 -03:00
vfs bugfix/fs:write Bad buf addr should return EINVAL 2025-12-16 19:41:19 +08:00
zipfs fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
CMakeLists.txt fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_heap.c fs_heap:add fs_heap_mallinfo_task 2025-01-15 17:12:50 +08:00
fs_heap.h fs_heap:add fs_heap_mallinfo_task 2025-01-15 17:12:50 +08:00
fs_initialize.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
Kconfig fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
Makefile fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00