Re: [BUG - 2.5.56] bad: scheduling while atomic

Willem Riede
2003-01-11T18:45:04Z

On 2003.01.11 12:49 Andrew Morton wrote:
> On Sat January 11 2003 02:40, Paul Rolland wrote:
> >
> > Hello,
> >
> > Trying 2.5.56 this morning, I ended up with the trace included below.
> > To get that, I simply added a
> > "hdd=ide-scsi"
[snip]
> > ide-scsi: abort called for 21
> > bad: scheduling while atomic!
[snip]
> Well this backtrace is not the reason why ide-scsi fails to work - it is
> being triggered as a consequence of the I/O failure.
>
> This trace is due to the following bug:
>
> scsi_try_to_abort_cmd() takes spin_lock_irqsave(scmd->host->host_lock, flags);
> then it calls ide_scsi_abort()
> ide_scsi_abort() calls scsi_sleep(), still inside ->host_lock.
>
That would be my mistake. scmd->host->host_lock doesn't need to be held during
the sleep. I'll come up with a patch.

Thanks, Willem Riede.