Re: [PATCH 4/4] uas: improve abort handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 29 November 2012 14:06:15 Gerd Hoffmann wrote:
> diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
> index dd23b61..5f498db 100644
> --- a/drivers/usb/storage/uas.c
> +++ b/drivers/usb/storage/uas.c
> @@ -717,8 +717,22 @@ static int uas_eh_abort_handler(struct scsi_cmnd *cmnd)
>         uas_log_cmd_state(cmnd, __func__);
>         spin_lock_irqsave(&devinfo->lock, flags);
>         cmdinfo->state |= COMMAND_ABORTED;
> -       spin_unlock_irqrestore(&devinfo->lock, flags);
> -       ret = uas_eh_task_mgmt(cmnd, "ABORT TASK", TMF_ABORT_TASK);
> +       if (cmdinfo->state & IS_IN_WORK_LIST) {
> +               spin_lock_irq(&uas_work_lock);

a) it makes no sense to take the _irq version while you hold an _irqsave
b) are you sure this sequence of locks is safe deadlockwise?

	Regards
		Oliver

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux