Commit 1653223
firmware: arm_ffa: Move memory allocation outside the mutex locking
BugLink: https://bugs.launchpad.net/bugs/2122072
commit 27e850c88df0e25474a8caeb2903e2e90b62c1dc upstream.
The notifier callback node allocation is currently done while holding
the notify_lock mutex. While this is safe even if memory allocation may
sleep, we need to move the allocation outside the locked region in
preparation to move from using muxtes to rwlocks.
Move the memory allocation to avoid potential sleeping in atomic context
once the locks are moved from mutex to rwlocks.
Fixes: e057344 ("firmware: arm_ffa: Add interfaces to request notification callbacks")
Message-Id: <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
Signed-off-by: Sudeep Holla <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Noah Wager <[email protected]>
Signed-off-by: Stefan Bader <[email protected]>1 parent 2f04fd8 commit 1653223
1 file changed
+21
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1141 | 1141 | | |
1142 | 1142 | | |
1143 | 1143 | | |
1144 | | - | |
1145 | | - | |
1146 | | - | |
| 1144 | + | |
| 1145 | + | |
1147 | 1146 | | |
1148 | 1147 | | |
1149 | | - | |
| 1148 | + | |
1150 | 1149 | | |
1151 | 1150 | | |
1152 | 1151 | | |
| |||
1155 | 1154 | | |
1156 | 1155 | | |
1157 | 1156 | | |
1158 | | - | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
1163 | | - | |
1164 | | - | |
1165 | | - | |
1166 | | - | |
| 1157 | + | |
1167 | 1158 | | |
1168 | 1159 | | |
1169 | 1160 | | |
| |||
1193 | 1184 | | |
1194 | 1185 | | |
1195 | 1186 | | |
1196 | | - | |
| 1187 | + | |
1197 | 1188 | | |
1198 | 1189 | | |
1199 | 1190 | | |
| |||
1212 | 1203 | | |
1213 | 1204 | | |
1214 | 1205 | | |
| 1206 | + | |
1215 | 1207 | | |
1216 | 1208 | | |
1217 | 1209 | | |
| |||
1220 | 1212 | | |
1221 | 1213 | | |
1222 | 1214 | | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
1223 | 1223 | | |
1224 | 1224 | | |
1225 | 1225 | | |
1226 | 1226 | | |
1227 | 1227 | | |
1228 | 1228 | | |
1229 | | - | |
1230 | | - | |
1231 | | - | |
1232 | | - | |
| 1229 | + | |
| 1230 | + | |
1233 | 1231 | | |
1234 | | - | |
| 1232 | + | |
1235 | 1233 | | |
1236 | 1234 | | |
1237 | 1235 | | |
1238 | 1236 | | |
1239 | 1237 | | |
| 1238 | + | |
| 1239 | + | |
1240 | 1240 | | |
| 1241 | + | |
| 1242 | + | |
1241 | 1243 | | |
1242 | 1244 | | |
1243 | 1245 | | |
| |||
0 commit comments