Commit ec5a465
committed
opp: core: remove useless mutex protection in _allocate_opp_table
Mutex protection in not needed in _allocate_opp_table as it this function
is already called under mutex lock. Furthermore, it fixes the following
issue seen with CONFIG_PROVE_LOCKING flag:
[ 3.648912] =========================
[ 3.648927] WARNING: held lock freed!
[ 3.648944] 5.4.56-00014-g7cc4a3bdec16 #7 Not tainted
[ 3.648957] -------------------------
[ 3.648976] kworker/1:1/22 is freeing memory df183c00-df183fff, with a lock still held there!
[ 3.648991] df183ca0 (&opp_table->lock){+.+.}, at: _opp_get_opp_table+0x1cc/0x224
[ 3.649037] 5 locks held by kworker/1:1/22:
[ 3.649049] #0: df0086a0 ((wq_completion)events){+.+.}, at: process_one_work+0x200/0x858
[ 3.649082] #1: df515f1c (deferred_probe_work){+.+.}, at: process_one_work+0x200/0x858
[ 3.649110] #2: d1ff08cc (&dev->mutex){....}, at: __device_attach+0x34/0x17c
[ 3.649145] #3: c139e5e0 (opp_table_lock){+.+.}, at: _opp_get_opp_table+0x1c/0x224
[ 3.649175] #4: df183ca0 (&opp_table->lock){+.+.}, at: _opp_get_opp_table+0x1cc/0x224
Fixes: cf1f361 ("opp: core: fix memory leak in probe deferral")
Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
Change-Id: I6da51fab26b698bb803a3a8ddf5454f73d8af956
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/178474
Reviewed-by: CITOOLS <smet-aci-reviews@lists.codex.cro.st.com>1 parent 7cc4a3b commit ec5a465
1 file changed
+0
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
985 | 985 | | |
986 | 986 | | |
987 | 987 | | |
988 | | - | |
989 | 988 | | |
990 | 989 | | |
991 | | - | |
992 | 990 | | |
993 | 991 | | |
994 | 992 | | |
| |||
0 commit comments