The call to intf_close() may result in the original interface being reopened. For example: when reading the capacity of a 2TB+ disk via iSCSI, the SCSI layer will respond to the intf_close() from the READ CAPACITY (10) command by immediately issuing a READ CAPACITY (16) command. The iSCSI layer happens to reuse the same interface for the new command (since it allows only a single concurrent command). Currently, intf_shutdown() unplugs the interface after the call to intf_close() returns. In the above scenario, this results in unplugging the just-reopened interface. Fix by transferring the interface destination (and its reference) to a temporary interface, and so effectively performing the unplug before making the call to intf_close(). Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
||
271 | 271 |
|
272 | 272 |
|
273 | 273 |
|
274 |
|
|
274 | 275 |
|
275 | 276 |
|
276 | 277 |
|
|
||
278 | 279 |
|
279 | 280 |
|
280 | 281 |
|
281 |
|
|
282 |
|
|
282 |
|
|
283 |
|
|
284 |
|
|
285 |
|
|
286 |
|
|
287 |
|
|
283 | 288 |
|
284 |
|
|
285 |
|
|
289 |
|
|
290 |
|
|
286 | 291 |
|
287 | 292 |
|
288 | 293 |
|