From: Akinobu Mita Date: Mon, 24 Nov 2014 05:24:18 +0000 (+0900) Subject: ufs: ensure clk gating work is finished before module unloading X-Git-Tag: omap-for-v3.19/fixes-for-merge-window~54^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97cd6805acf0d6b1b06b439cbc8c25586d73dcfc;p=pandora-kernel.git 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: Akinobu Mita Reviewed-by: Subhash Jadavani Signed-off-by: Christoph Hellwig --- Reading git-diff-tree failed