zhhyu7 commented on PR #21411: URL: https://github.com/apache/nuttx/pull/21411#issuecomment-6812072605
> `net/utils/net_snoop.c:242`: The interrupt branch of `snoop_dump()` changes `snoop->buf` and `snoop->next` without the mutex. An interrupt between `snoop->next -= ret` and the `memmove()` appends over data not yet moved, and on SMP two interrupts can both pass the free-space test. > > Fix: keep `enter_critical_section()` around the interrupt branch of `snoop_dump()` and around these two lines in `snoop_flush()`, and leave `file_write()`/`file_fsync()` outside it. Done. -- 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]
