Re: [PATCH v1] exfat: fix unexpected EOF while reading dir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2022-12-26 16:23 GMT+09:00, Yuezhang.Mo@xxxxxxxx <Yuezhang.Mo@xxxxxxxx>:
> 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")
>
> Signed-off-by: Yuezhang Mo <Yuezhang.Mo@xxxxxxxx>
> Reviewed-by: Andy Wu <Andy.Wu@xxxxxxxx>
> Reviewed-by: Aoyama Wataru <wataru.aoyama@xxxxxxxx>
> Reported-by: Wang Yugui <wangyugui@xxxxxxxxxxxx>
Applied, Thanks for your patch!



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux