From: Dan Carpenter <error27@gmail.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: trondmy@kernel.org, Anna Schumaker <Anna.Schumaker@netapp.com>,
linux-nfs@vger.kernel.org
Subject: Re: [PATCH v2 18/18] NFS: Remove unnecessary check in nfs_read_folio()
Date: Thu, 23 Feb 2023 16:43:39 +0300 [thread overview]
Message-ID: <Y/dti5+1vp55tMZX@kadam> (raw)
In-Reply-To: <Y/dorq8Elh4Mxg2g@casper.infradead.org>
On Thu, Feb 23, 2023 at 01:22:54PM +0000, Matthew Wilcox wrote:
> But I'm suspicious of static match tools claiming it can't ever happen,
> and I'd like more details please. I can't find the original report.
I would never write a warning like that... However at the time when
I reported the bug then Smatch did say that all the callers passed a
non-NULL file pointer. I've reviewed my logs and that was true when I
said it but it's not true now. :( Now Smatch says there are three
callers and nfs_write_begin() passes a valid pointer, read_pages()
passes either a valid pointer or a NULL and filemap_read_folio() passes
an unknown pointer.
https://lore.kernel.org/all/Y77+n9MyHgx%2FalA4@kadam/
The issue here is that the pointer was already derefernced on the lines
before the check for NULL.
struct inode *inode = file_inode(file);
So either the dereference or the check was wrong.
regards,
dan carpenter
next prev parent reply other threads:[~2023-02-23 13:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 21:33 [PATCH v2 00/18] Initial conversion of NFS basic I/O to use folios trondmy
2023-01-19 21:33 ` [PATCH v2 01/18] NFS: Fix for xfstests generic/208 trondmy
2023-01-19 21:33 ` [PATCH v2 02/18] NFS: Add basic functionality for tracking folios in struct nfs_page trondmy
2023-01-19 21:33 ` [PATCH v2 03/18] NFS: Support folios in nfs_generic_pgio() trondmy
2023-01-19 21:33 ` [PATCH v2 04/18] NFS: Fix nfs_coalesce_size() to work with folios trondmy
2023-01-19 21:33 ` [PATCH v2 05/18] NFS: Add a helper to convert a struct nfs_page into an inode trondmy
2023-01-19 21:33 ` [PATCH v2 06/18] NFS: Convert the remaining pagelist helper functions to support folios trondmy
2023-01-19 21:33 ` [PATCH v2 07/18] NFS: Add a helper nfs_wb_folio() trondmy
2023-01-19 21:33 ` [PATCH v2 08/18] NFS: Convert buffered reads to use folios trondmy
2023-01-19 21:33 ` [PATCH v2 09/18] NFS: Convert the function nfs_wb_page() " trondmy
2023-01-19 21:33 ` [PATCH v2 10/18] NFS: Convert buffered writes " trondmy
2023-01-19 21:33 ` [PATCH v2 11/18] NFS: Remove unused function nfs_wb_page() trondmy
2023-01-19 21:33 ` [PATCH v2 12/18] NFS: Convert nfs_write_begin/end to use folios trondmy
2023-01-19 21:33 ` [PATCH v2 13/18] NFS: Fix up nfs_vm_page_mkwrite() for folios trondmy
2023-01-19 21:33 ` [PATCH v2 14/18] NFS: Clean up O_DIRECT request allocation trondmy
2023-01-19 21:33 ` [PATCH v2 15/18] NFS: fix up nfs_release_folio() to try to release the page trondmy
2023-01-19 21:33 ` [PATCH v2 16/18] NFS: Enable tracing of nfs_invalidate_folio() and nfs_launder_folio() trondmy
2023-01-19 21:33 ` [PATCH v2 17/18] NFS: Improve tracing of nfs_wb_folio() trondmy
2023-01-19 21:33 ` [PATCH v2 18/18] NFS: Remove unnecessary check in nfs_read_folio() trondmy
2023-02-23 13:22 ` Matthew Wilcox
2023-02-23 13:43 ` Dan Carpenter [this message]
2023-01-24 16:07 ` [PATCH v2 00/18] Initial conversion of NFS basic I/O to use folios Olga Kornievskaia
2023-01-24 16:41 ` Trond Myklebust
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=Y/dti5+1vp55tMZX@kadam \
--to=error27@gmail.com \
--cc=Anna.Schumaker@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trondmy@kernel.org \
--cc=willy@infradead.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