Commit 3c96888
Revert "ib_srpt: Convert to percpu_ida tag allocation"
This reverts commit 0fd1072.
That patch causes the ib_srpt driver to crash as soon as the first SCSI
command is received:
kernel BUG at drivers/infiniband/ulp/srpt/ib_srpt.c:1439!
invalid opcode: 0000 [#1] SMP
Workqueue: target_completion target_complete_ok_work [target_core_mod]
RIP: srpt_queue_response+0x437/0x4a0 [ib_srpt]
Call Trace:
srpt_queue_data_in+0x9/0x10 [ib_srpt]
target_complete_ok_work+0x152/0x2b0 [target_core_mod]
process_one_work+0x197/0x480
worker_thread+0x49/0x490
kthread+0xea/0x100
ret_from_fork+0x22/0x40
Aside from the crash, the shortcomings of that patch are as follows:
- It makes the ib_srpt driver use I/O contexts allocated by
transport_alloc_session_tags() but it does not initialize these I/O
contexts properly. All the initializations performed by
srpt_alloc_ioctx() are skipped.
- It swaps the order of the send ioctx allocation and the transition to
RTR mode which is wrong.
- The amount of memory that is needed for I/O contexts is doubled.
- srpt_rdma_ch.free_list is no longer used but is not removed.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent 93061f3 commit 3c96888
2 files changed
+40
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1264 | 1264 | | |
1265 | 1265 | | |
1266 | 1266 | | |
1267 | | - | |
1268 | 1267 | | |
1269 | | - | |
| 1268 | + | |
1270 | 1269 | | |
1271 | 1270 | | |
1272 | | - | |
1273 | 1271 | | |
1274 | | - | |
1275 | | - | |
1276 | | - | |
1277 | | - | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
1278 | 1278 | | |
1279 | | - | |
1280 | | - | |
1281 | | - | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
1282 | 1285 | | |
1283 | 1286 | | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
1284 | 1293 | | |
1285 | | - | |
1286 | | - | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
1287 | 1301 | | |
1288 | 1302 | | |
1289 | 1303 | | |
| |||
2021 | 2035 | | |
2022 | 2036 | | |
2023 | 2037 | | |
2024 | | - | |
| 2038 | + | |
2025 | 2039 | | |
2026 | 2040 | | |
2027 | 2041 | | |
| |||
2143 | 2157 | | |
2144 | 2158 | | |
2145 | 2159 | | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
2146 | 2166 | | |
2147 | 2167 | | |
2148 | 2168 | | |
| |||
2173 | 2193 | | |
2174 | 2194 | | |
2175 | 2195 | | |
2176 | | - | |
2177 | | - | |
| 2196 | + | |
2178 | 2197 | | |
2179 | 2198 | | |
2180 | 2199 | | |
| |||
2881 | 2900 | | |
2882 | 2901 | | |
2883 | 2902 | | |
2884 | | - | |
| 2903 | + | |
2885 | 2904 | | |
2886 | 2905 | | |
2887 | 2906 | | |
| |||
2892 | 2911 | | |
2893 | 2912 | | |
2894 | 2913 | | |
2895 | | - | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
2896 | 2917 | | |
2897 | 2918 | | |
2898 | 2919 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
| |||
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
| 205 | + | |
204 | 206 | | |
205 | 207 | | |
206 | 208 | | |
| |||
0 commit comments