]> git.baikalelectronics.ru Git - kernel.git/commit
bus: mhi: core: Handle disable transitions in state worker
authorHemant Kumar <hemantk@codeaurora.org>
Thu, 21 May 2020 17:02:45 +0000 (22:32 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 May 2020 07:35:43 +0000 (09:35 +0200)
commit3c1bd0047124f506294520341cfe03e19ea773e3
tree6569eabee3cba0d69a546ffa0573ef57bbf7626b
parentbc7ccce5a5192cf277da0aef05e45cd92c81c79a
bus: mhi: core: Handle disable transitions in state worker

Mission mode transition is handled by state worker thread but
power off is not. There is a possibility while mission mode
transition is in progress which calls MHI client driver probe,
power off is issued by MHI controller. This results into client
driver probe and remove running in parallel and causes use after
free situation. By queuing disable transition work when mission
mode is in progress prevents the race condition.

Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Reviewed-by: Jeffrey Hugo <jhugo@codeaurora.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20200521170249.21795-11-manivannan.sadhasivam@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/bus/mhi/core/init.c
drivers/bus/mhi/core/internal.h
drivers/bus/mhi/core/pm.c