From: Dan Carpenter <error27@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: fscache: bug report: dereferencing before checking
Date: Mon, 22 Mar 2010 12:07:54 +0000 [thread overview]
Message-ID: <20100322120753.GE21571@bicker> (raw)
Can "page" be NULL here?
fs/fscache/page.c +712
705 page = results[0];
706 _debug("gang %d [%lx]", n, page->index);
^^^^^^^^^^^
dereference
707 if (page->index > op->store_limit) {
^^^^^^^^^^^
dereference
708 fscache_stat(&fscache_n_store_pages_over_limit);
709 goto superseded;
710 }
711
712 if (page) {
check
713 radix_tree_tag_set(&cookie->stores, page->index,
714 FSCACHE_COOKIE_STORING_TAG);
715 radix_tree_tag_clear(&cookie->stores, page->index,
716 FSCACHE_COOKIE_PENDING_TAG);
717 }
718
719 spin_unlock(&cookie->stores_lock);
720 spin_unlock(&object->lock);
721
722 if (page) {
check
723 fscache_set_op_state(&op->op, "Store");
regards,
dan carpenter
next reply other threads:[~2010-03-22 12:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-22 12:07 Dan Carpenter [this message]
2010-03-22 12:47 ` fscache: bug report: dereferencing before checking David Howells
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=20100322120753.GE21571@bicker \
--to=error27@gmail.com \
--cc=kernel-janitors@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