On Thu, 1 Mar 2007 00:37:48 -0800 Andrew Morton <[EMAIL PROTECTED]> wrote:
>
> On Thu, 1 Mar 2007 14:56:40 +1100 [EMAIL PROTECTED] (Tony Breeds) wrote:
>
> > From: Tony Breeds <[EMAIL PROTECTED]>
> >
> > Fix soft lockup with iSeries viocd driver, caused by eventually calling
> > end_that_request_first() with nr_bytes 0.
> >
> > The lockup is triggered by hald, interrogating the device.
> >
>
> What causes the lockup, and how does this patch fix it?

Some versions of hald do an SG_IO ioctl on the viocd device which becomes
a request with hard_nr_sectors and hard_cur_sectors set to zero.  Passing
zero as the number of sectors to end_request() (which calls
end_that_request_first()) causes an infinite loop when the bio is being
freed.  This patch makes sure that the zero is never passed. It only
requires some number larger the the request size the terminate the loop.

--
Cheers,
Stephen Rothwell                    [EMAIL PROTECTED]
http://www.canb.auug.org.au/~sfr/

Attachment: pgp7H2Qxz0Ee8.pgp
Description: PGP signature

Reply via email to