From: Dan Carpenter <dan.carpenter@linaro.org>
To: Jonathan Curley <jcurley@purestorage.com>
Cc: linux-nfs@vger.kernel.org
Subject: [bug report] NFSv4/flexfiles: Update low level helper functions to be DS stripe aware.
Date: Tue, 23 Sep 2025 13:38:10 +0300 [thread overview]
Message-ID: <aNJ4krKOHNu0sOKO@stanley.mountain> (raw)
Hello Jonathan Curley,
This is a semi-automatic email about new static checker warnings.
Commit e142d1137b17 ("NFSv4/flexfiles: Update low level helper
functions to be DS stripe aware.") from Aug 25, 2025, leads to the
following Smatch complaint:
fs/nfs/flexfilelayout/flexfilelayoutdev.c:598 ff_rw_layout_has_available_ds()
warn: variable dereferenced before check 'mirror' (see line 597)
fs/nfs/flexfilelayout/flexfilelayoutdev.c
596 mirror = FF_LAYOUT_COMP(lseg, idx);
597 for (dss_id = 0; dss_id < mirror->dss_count; dss_id++) {
^^^^^^^^
Dereference
598 if (!mirror || IS_ERR(mirror->dss[dss_id].mirror_ds))
^^^^^^^
NULL check is too late.
599 return false;
600 if (!mirror->dss[dss_id].mirror_ds)
regards,
dan carpenter
reply other threads:[~2025-09-23 10:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=aNJ4krKOHNu0sOKO@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=jcurley@purestorage.com \
--cc=linux-nfs@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