From: Dan Carpenter <dan.carpenter@linaro.org>
To: Joanne Koong <joannelkoong@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: [bug report] fuse: support copying large folios
Date: Fri, 23 May 2025 18:59:03 +0300 [thread overview]
Message-ID: <aDCbR9VpB3ojnM7q@stanley.mountain> (raw)
Hello Joanne Koong,
This is a semi-automatic email about new static checker warnings.
Commit f008a4390bde ("fuse: support copying large folios") from May
12, 2025, leads to the following Smatch complaint:
fs/fuse/dev.c:1103 fuse_copy_folio()
warn: variable dereferenced before check 'folio' (see line 1101)
fs/fuse/dev.c
1100 struct folio *folio = *foliop;
1101 size_t size = folio_size(folio);
^^^^^
The patch adds an unchecked dereference
1102
1103 if (folio && zeroing && count < size)
^^^^^
and it also adds this check for NULL which is too late.
1104 folio_zero_range(folio, 0, size);
1105
regards,
dan carpenter
next reply other threads:[~2025-05-23 15:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-23 15:59 Dan Carpenter [this message]
2025-05-23 17:32 ` [bug report] fuse: support copying large folios Joanne Koong
2025-05-23 18:51 ` Dan Carpenter
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=aDCbR9VpB3ojnM7q@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=joannelkoong@gmail.com \
--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