Re: 2.1.95, pre-2.1.96-1 disk hangs, patch

Linus Torvalds (torvalds@transmeta.com)
Mon, 13 Apr 1998 13:34:11 -0700 (PDT)


On Mon, 13 Apr 1998, Keith Owens wrote:
>
> "mount /dir/file -r -t iso9660 -o /loop /mnt" hangs 2.1.95 and
> pre-2.1.96-1 every time. Patch follows, this might help other users
> having 2.1.95 hangs. The bug is not just restricted to loopback, but
> loopback is much more sensitive.
>
> Index: linux/drivers/block/ll_rw_blk.c
> --- linux/drivers/block/ll_rw_blk.c.orig Sat, 11 Apr 1998 14:58:05 +1000 keith (linux-2.1/x/23_ll_rw_blk. 1.2.1.12 644) 95.10
> +++ linux/drivers/block/ll_rw_blk.c Mon, 13 Apr 1998 23:52:14 +1000 keith (linux-2.1/x/23_ll_rw_blk. 1.2.1.12 644) 95.10(w)
> @@ -352,9 +352,9 @@
> * request_fn() is usually a quite complex and slow function,
> * we want to call it with no spinlocks held
> */
> + spin_unlock_irqrestore(&io_request_lock,flags);
> if (queue_new_request)
> (dev->request_fn)();
> - spin_unlock_irqrestore(&io_request_lock,flags);
> }

The above is wrong. The comment is also wrong, and I'll fix it.

The above patch will start the lockups on SMP again, with people getting
stuck in disk-wait etc. The correct fix is to fix loopback, not break all
other drivers.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu