-
Notifications
You must be signed in to change notification settings - Fork 996
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libswap.c: Check free space with correct mnt path
The tst_fs_has_free should check fs size of mnt point. But current code check ".", that means check /tmp/LTP_xxx instead of /tmp/LTP_xxx/mntpoint. Also tst_fs_has_free's "size" parameter's type is unsigned int, it will overflow if encounter big filesystem block size (such as Btrfs can use 64k). Link: https://lore.kernel.org/ltp/20240301015037.22061-1-wegao@suse.com/ Reviewed-by: Li Wang <liwang@redhat.com> Reviewed-by: Petr Vorel <pvorel@suse.cz> Signed-off-by: Wei Gao <wegao@suse.com> [ pvorel: check for sscanf() return value ] Signed-off-by: Petr Vorel <pvorel@suse.cz>
- Loading branch information
Showing
3 changed files
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters