Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ieee1394: sbp2: slightly reorder sbp2scsi_abort

Put the target's fetch agent into reset state before the underlying ORB
DMA is unmapped and the ->done handler is called. It is highly unlikely
but the target could access that ORB right before sbp2 sends the reset
request.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

+2 -8
+2 -8
drivers/ieee1394/sbp2.c
··· 2564 2564 scsi_print_command(SCpnt); 2565 2565 2566 2566 if (sbp2util_node_is_available(scsi_id)) { 2567 + sbp2_agent_reset(scsi_id, 1); 2567 2568 2568 - /* 2569 - * Right now, just return any matching command structures 2570 - * to the free pool. 2571 - */ 2569 + /* Return a matching command structure to the free pool. */ 2572 2570 spin_lock_irqsave(&scsi_id->sbp2_command_orb_lock, flags); 2573 2571 command = sbp2util_find_command_for_SCpnt(scsi_id, SCpnt); 2574 2572 if (command) { ··· 2587 2589 } 2588 2590 spin_unlock_irqrestore(&scsi_id->sbp2_command_orb_lock, flags); 2589 2591 2590 - /* 2591 - * Initiate a fetch agent reset. 2592 - */ 2593 - sbp2_agent_reset(scsi_id, 1); 2594 2592 sbp2scsi_complete_all_commands(scsi_id, DID_BUS_BUSY); 2595 2593 } 2596 2594