Skip to content

Commit

Permalink
[SCSI] ibmvfc: Fix locking in ibmvfc_remove
Browse files Browse the repository at this point in the history
Need to grab the host lock around the call to ibmvfc_link_down.

Signed-off-by: Brian King <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
  • Loading branch information
bjking1 authored and James Bottomley committed Dec 4, 2009
1 parent 230934a commit 7043110
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/scsi/ibmvscsi/ibmvfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -4420,7 +4420,11 @@ static int ibmvfc_remove(struct vio_dev *vdev)

ENTER;
ibmvfc_remove_trace_file(&vhost->host->shost_dev.kobj, &ibmvfc_trace_attr);

spin_lock_irqsave(vhost->host->host_lock, flags);
ibmvfc_link_down(vhost, IBMVFC_HOST_OFFLINE);
spin_unlock_irqrestore(vhost->host->host_lock, flags);

ibmvfc_wait_while_resetting(vhost);
ibmvfc_release_crq_queue(vhost);
kthread_stop(vhost->work_thread);
Expand Down

0 comments on commit 7043110

Please sign in to comment.