From: Shaobo <shaobo@cs.utah.edu>
To: linux-mmc@vger.kernel.org
Cc: ulf.hansson@linaro.org, linus.walleij@linaro.org,
adrian.hunter@intel.com, shawn.lin@rock-chips.com, axboe@fb.com,
geert@linux-m68k.org
Subject: Potentially invalid memory accesses in file drivers/mmc/core/block.c
Date: Fri, 21 Jul 2017 19:37:43 -0600 [thread overview]
Message-ID: <003501d30289$89f86990$9de93cb0$@Domain> (raw)
Hi there,
My name is Shaobo He and I am a graduate student at University of Utah.
I am using a static analysis tool to search for null pointer
dereferences and came across a couple of potentially invalid memory
accesses in the file drivers/mmc/core/block.c: in function
`force_ro_store`, function `mmc_blk_get` can return a NULL pointer.
However, there are a couple of conditions that can make the error path
infeasible. I was wondering if you could confirm this. Especially if the
condition `dev_to_disk(dev)->private_data &&
dev_to_disk(dev)->private_data->usage != 0` serves as a reasonable
precondition of function `force_ro_store`.
Please let me know if it makes sense. I am looking forward to your
reply.
Best,
Shaobo
next reply other threads:[~2017-07-22 1:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-22 1:37 Shaobo [this message]
2017-08-03 7:46 ` Potentially invalid memory accesses in file drivers/mmc/core/block.c Linus Walleij
2017-08-03 18:54 ` Shaobo
2017-08-07 12:53 ` Linus Walleij
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='003501d30289$89f86990$9de93cb0$@Domain' \
--to=shaobo@cs.utah.edu \
--cc=adrian.hunter@intel.com \
--cc=axboe@fb.com \
--cc=geert@linux-m68k.org \
--cc=linus.walleij@linaro.org \
--cc=linux-mmc@vger.kernel.org \
--cc=shawn.lin@rock-chips.com \
--cc=ulf.hansson@linaro.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.