Re: Potentially invalid memory accesses in file drivers/mmc/core/block.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jul 22, 2017 at 3:37 AM, Shaobo <shaobo@xxxxxxxxxxx> wrote:

> 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.

I can solidly confirm that the kernel is full och NULL pointer violations.
But pointing out the problems is rarely helpful as that pushes the work of
fixing them to others.

When you find specific cases, send patches to fix the issue to the respective
subsystem maintainer(s). It is the best way to illustrate the problem you see
and at the same time propose a solution.

You have reached the right list.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux