public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* Potentially invalid memory accesses in file drivers/mmc/core/block.c
@ 2017-07-22  1:37 Shaobo
  2017-08-03  7:46 ` Linus Walleij
  0 siblings, 1 reply; 4+ messages in thread
From: Shaobo @ 2017-07-22  1:37 UTC (permalink / raw)
  To: linux-mmc
  Cc: ulf.hansson, linus.walleij, adrian.hunter, shawn.lin, axboe,
	geert

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-08-07 12:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-22  1:37 Potentially invalid memory accesses in file drivers/mmc/core/block.c Shaobo
2017-08-03  7:46 ` Linus Walleij
2017-08-03 18:54   ` Shaobo
2017-08-07 12:53     ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox