Re: Null pointer dereference in the upstream SCM driver

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

 



Rishabh,

On 5/4/2018 3:00 PM, rishabhb@xxxxxxxxxxxxxx wrote:

The upstream qcom_scm driver is currently coded as a platform device
driver. This approach introduces the following problem:

The driver's init function is declared a subsys_initcall. There are
initcalls before the subsys level that use the scm apis for example
randomizing the stack canaries, etc.
All scm apis use a struct device * as one of arguments(__scm->dev).
At the early stages the scm driver is not initialized and if other
initcalls use these apis, it causes a null pointer dereference,
since __scm is NULL.
Even if we try to make the scm_initcall as an early initcall, it won't
workout as the platform driver code is not initialized at that stage.

I guess you are referring to the usage which is not yet upstream, so can you point out the driver which breaks with upstream convention from the CAF tree here so that others can understand the usecase?

--
---Trilok Soni
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux