[LTP] inotify13: check rename cookie pairing after adjacent moves
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Thu Oct 29 20:57:53 CET 2026
Hi Hungyu,
On Tue Oct 27 19:19:55 2026 +0000, Hungyu Lin <dennylin0707@gmail.com> wrote:
> inotify13: check rename cookie pairing after adjacent moves
> + len = SAFE_READ(SAFE_READ_ANY, fd_notify, buf.data, sizeof(buf.data));
> + SAFE_CLOSE(fd_notify);
> + fd_notify = -1;
SAFE_CLOSE() already sets fd_notify to -1, so the manual reset should be
removed.
> +static void cleanup(void)
> +{
> + if (fd_notify >= 0)
> + SAFE_CLOSE(fd_notify);
> +}
Use if (fd_notify != -1) to check file descriptor validity in cleanup().
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
More information about the ltp
mailing list