From: Dan Carpenter <error27@gmail.com>
To: John Groves <John@groves.net>
Cc: nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org
Subject: [bug report] dax: Add dax_operations for use by fs-dax on fsdev dax
Date: Thu, 9 Apr 2026 12:28:17 +0300 [thread overview]
Message-ID: <addxMYPgp5t3oysP@stanley.mountain> (raw)
Hello John Groves,
This email is a free service from the Smatch-CI project
(smatch.sf.net).
Commit 099c81a1f0ab ("dax: Add dax_operations for use by fs-dax on
fsdev dax") from Mar 27, 2026 (linux-next), leads to the following
Smatch static checker warning:
drivers/dax/fsdev.c:86 fsdev_dax_zero_page_range()
error: uninitialized symbol 'kaddr'.
drivers/dax/fsdev.c
79 static int fsdev_dax_zero_page_range(struct dax_device *dax_dev,
80 pgoff_t pgoff, size_t nr_pages)
81 {
82 void *kaddr;
83
84 WARN_ONCE(nr_pages > 1, "%s: nr_pages > 1\n", __func__);
85 __fsdev_dax_direct_access(dax_dev, pgoff, 1, DAX_ACCESS, &kaddr, NULL);
The checker thinks __fsdev_dax_direct_access() can return -1.
--> 86 fsdev_write_dax(kaddr, ZERO_PAGE(0), 0, PAGE_SIZE);
^^^^^
which means kaddr is uninitialized
87 return 0;
88 }
regards,
dan carpenter
reply other threads:[~2026-04-09 9:28 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=addxMYPgp5t3oysP@stanley.mountain \
--to=error27@gmail.com \
--cc=John@groves.net \
--cc=linux-cxl@vger.kernel.org \
--cc=nvdimm@lists.linux.dev \
/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