All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: milosz@adfin.com
Cc: ceph-devel@vger.kernel.org
Subject: re: ceph: use fscache as a local presisent cache
Date: Wed, 9 Mar 2016 11:54:52 +0300	[thread overview]
Message-ID: <20160309085452.GA4085@mwanda> (raw)

[ Hm...  I don't know why this has suddenly started warning now only.
  This check doesn't warn if it knows that the NULL check is not
  needed so potentially that was what prevented the warning before?
  -dan ]

Hello Milosz Tanski,

This is a semi-automatic email about new static checker warnings.

The patch 99ccbd229cf7: "ceph: use fscache as a local presisent
cache" from Aug 21, 2013, leads to the following Smatch complaint:

fs/ceph/addr.c:183 ceph_releasepage()
	 error: we previously assumed 'page->mapping' could be null (see line 178)

fs/ceph/addr.c
   177	{
   178		struct inode *inode = page->mapping ? page->mapping->host : NULL;
                                      ^^^^^^^^^^^^^
Check for NULL.

   179		dout("%p releasepage %p idx %lu\n", inode, page, page->index);
   180		WARN_ON(PageDirty(page));
   181	
   182		/* Can we release the page from the cache? */
   183		if (!ceph_release_fscache_page(page, g))
                                               ^^^^
The patch adds a dereference inside the function call.

   184			return 0;
   185	

regards,
dan carpenter

             reply	other threads:[~2016-03-09  8:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09  8:54 Dan Carpenter [this message]
2016-03-10  3:26 ` ceph: use fscache as a local presisent cache Yan, Zheng
2016-03-10 18:53   ` Milosz Tanski

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=20160309085452.GA4085@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=milosz@adfin.com \
    /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.