Commit 172bbb8
Bluetooth: hidp: fix possible might sleep error in hidp_session_thread
commit 5da8e47d849d3d37b14129f038782a095b9ad049 upstream.
It looks like hidp_session_thread has same pattern as the issue reported in
old rfcomm:
while (1) {
set_current_state(TASK_INTERRUPTIBLE);
if (condition)
break;
// may call might_sleep here
schedule();
}
__set_current_state(TASK_RUNNING);
Which fixed at:
dfb2fae Bluetooth: Fix nested sleeps
So let's fix it at the same way, also follow the suggestion of:
https://lwn.net/Articles/628628/
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Tested-by: AL Yu-Chen Cho <acho@suse.com>
Tested-by: Rohit Vaswani <rvaswani@nvidia.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 708d19e commit 172bbb8
1 file changed
Lines changed: 22 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
1068 | 1069 | | |
1069 | 1070 | | |
1070 | 1071 | | |
1071 | | - | |
| 1072 | + | |
1072 | 1073 | | |
1073 | 1074 | | |
1074 | 1075 | | |
1075 | 1076 | | |
1076 | | - | |
| 1077 | + | |
1077 | 1078 | | |
1078 | 1079 | | |
1079 | 1080 | | |
| |||
1180 | 1181 | | |
1181 | 1182 | | |
1182 | 1183 | | |
| 1184 | + | |
1183 | 1185 | | |
| 1186 | + | |
1184 | 1187 | | |
1185 | 1188 | | |
1186 | 1189 | | |
1187 | 1190 | | |
1188 | 1191 | | |
1189 | 1192 | | |
1190 | 1193 | | |
1191 | | - | |
1192 | | - | |
1193 | | - | |
1194 | 1194 | | |
1195 | | - | |
1196 | 1195 | | |
| 1196 | + | |
| 1197 | + | |
1197 | 1198 | | |
1198 | 1199 | | |
1199 | 1200 | | |
| |||
1227 | 1228 | | |
1228 | 1229 | | |
1229 | 1230 | | |
1230 | | - | |
| 1231 | + | |
1231 | 1232 | | |
| 1233 | + | |
1232 | 1234 | | |
1233 | 1235 | | |
1234 | | - | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
1235 | 1247 | | |
1236 | 1248 | | |
1237 | 1249 | | |
| |||
1244 | 1256 | | |
1245 | 1257 | | |
1246 | 1258 | | |
1247 | | - | |
| 1259 | + | |
| 1260 | + | |
1248 | 1261 | | |
1249 | 1262 | | |
1250 | 1263 | | |
| |||
1254 | 1267 | | |
1255 | 1268 | | |
1256 | 1269 | | |
1257 | | - | |
1258 | | - | |
1259 | 1270 | | |
1260 | 1271 | | |
1261 | 1272 | | |
| |||
0 commit comments