aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/scripting-engines/trace-event-python.c
diff options
context:
space:
mode:
authorYuezhang Mo <[email protected]>2022-09-22 14:43:47 +0800
committerNamjae Jeon <[email protected]>2023-02-27 21:14:44 +0900
commit6cb5d1a16a51d080fbc1649a5144cbc5ca7d6f88 (patch)
tree6b4ffdd08832eb0eadf1c899c16295acbe2f9151 /tools/perf/util/scripting-engines/trace-event-python.c
parentc9c3395d5e3dcc6daee66c6908354d47bf98cb0c (diff)
exfat: fix unexpected EOF while reading dir
If the position is not aligned with the dentry size, the return value of readdir() will be NULL and errno is 0, which means the end of the directory stream is reached. If the position is aligned with dentry size, but there is no file or directory at the position, exfat_readdir() will continue to get dentry from the next dentry. So the dentry gotten by readdir() may not be at the position. After this commit, if the position is not aligned with the dentry size, round the position up to the dentry size and continue to get the dentry. Fixes: ca06197382bd ("exfat: add directory operations") Cc: [email protected] # v5.7+ Reported-by: Wang Yugui <[email protected]> Signed-off-by: Yuezhang Mo <[email protected]> Reviewed-by: Andy Wu <[email protected]> Reviewed-by: Aoyama Wataru <[email protected]> Reviewed-by: Sungjong Seo <[email protected]> Signed-off-by: Namjae Jeon <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions