From: Dan Carpenter <dan.carpenter@oracle.com>
To: dwysocha@redhat.com
Cc: linux-nfs@vger.kernel.org
Subject: [bug report] NFS: Convert to the netfs API and nfs_readpage to use netfs_readpage
Date: Mon, 1 Feb 2021 21:48:02 -0800 (PST) [thread overview]
Message-ID: <YBjnktMpSchbnnJc@mwanda> (raw)
Hello Dave Wysochanski,
This is a semi-automatic email about new static checker warnings.
The patch bc6d7b12e4ea: "NFS: Convert to the netfs API and
nfs_readpage to use netfs_readpage" from Nov 14, 2020, leads to the
following Smatch complaint:
fs/nfs/read.c:365 nfs_readpage()
error: we previously assumed 'file' could be null (see line 356)
fs/nfs/read.c
355
356 if (file == NULL) {
^^^^^^^^^^^^
"file" is NULL here
357 ret = -EBADF;
358 desc.ctx = nfs_find_open_context(inode, NULL, FMODE_READ);
359 if (desc.ctx == NULL)
360 goto out_unlock;
361 } else
362 desc.ctx = get_nfs_open_context(nfs_file_open_context(file));
363
364 if (!IS_SYNC(inode)) {
365 ret = nfs_readpage_from_fscache(file, page, &desc);
^^^^
Unchecked dereference inside function call.
366 if (ret == 0)
367 goto out;
regards,
dan carpenter
next reply other threads:[~2021-02-02 5:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-02 5:48 Dan Carpenter [this message]
2021-02-02 12:23 ` [bug report] NFS: Convert to the netfs API and nfs_readpage to use netfs_readpage David Wysochanski
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=YBjnktMpSchbnnJc@mwanda \
--to=dan.carpenter@oracle.com \
--cc=dwysocha@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.