From: "Pali Rohár" <pali.rohar@gmail.com>
To: linux-fsdevel@vger.kernel.org, Jan Kara <jack@suse.cz>
Subject: udf: Suspicious values in udf_statfs()
Date: Sun, 12 Jan 2020 17:23:11 +0100 [thread overview]
Message-ID: <20200112162311.khkvcu2u6y4gbbr7@pali> (raw)
[-- Attachment #1: Type: text/plain, Size: 660 bytes --]
Hello,
I looked at udf_statfs() implementation and I see there two things which
are probably incorrect:
First one:
buf->f_blocks = sbi->s_partmaps[sbi->s_partition].s_partition_len;
If sbi->s_partition points to Metadata partition then reported number
of blocks seems to be incorrect. Similar like in udf_count_free().
Second one:
buf->f_files = (lvidiu != NULL ? (le32_to_cpu(lvidiu->numFiles) +
le32_to_cpu(lvidiu->numDirs)) : 0)
+ buf->f_bfree;
What f_files entry should report? Because result of sum of free blocks
and number of files+directories does not make sense for me.
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next reply other threads:[~2020-01-12 16:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-12 16:23 Pali Rohár [this message]
2020-01-13 12:08 ` udf: Suspicious values in udf_statfs() Jan Kara
2020-01-16 15:30 ` Pali Rohár
2020-01-17 11:38 ` Jan Kara
2020-01-17 22:35 ` Pali Rohár
2020-01-17 12:05 ` Jan Kara
2020-01-18 0:11 ` Pali Rohár
2020-01-20 13:02 ` Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200112162311.khkvcu2u6y4gbbr7@pali \
--to=pali.rohar@gmail.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).