[lvc-project] [PATCH] fs: minix: Fix handling of corrupted directories

Al Viro viro at zeniv.linux.org.uk
Fri May 2 20:13:16 MSK 2025


On Fri, May 02, 2025 at 07:50:57PM +0300, Andrey Kriulin wrote:
> If the directory is corrupted and the number of nlinks is less than 2 
> (valid nlinks have at least 2), then when the directory is deleted, the
> minix_rmdir will try to reduce the nlinks(unsigned int) to a negative
> value.
> 
> Make nlinks validity check for directory in minix_lookup.
 
Not sure it's a good mitigation strategy - if nothing else, doing that
on r/o filesystem is clear loss...



More information about the lvc-project mailing list