Skip to content
Commit 97cd6805 authored by Akinobu Mita's avatar Akinobu Mita Committed by Christoph Hellwig
Browse files

ufs: ensure clk gating work is finished before module unloading



When dynamic clk gating feature is enabled, delayed workqueue machanism
is used in order to detect certain period of inactivity.  But there is no
guarantee that scheduled gating work is completed before module unloading.
So it can cause kernel crash by accessing memory after it was freed.

Fix it by cancelling clk gating and ungating works and ensure that its
execution is finished before module unloading.

Signed-off-by: default avatarAkinobu Mita <mita@fixstars.com>
Reviewed-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent e8cb64db
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment