2005-11-29 16:51:28

by Mark Salyzyn

[permalink] [raw]
Subject: [2.6 patch] dpt_i2o fix for deadlock condition

Miquel van Smoorenburg <[email protected]> forwarded me this fix to
resolve a deadlock condition that occurs due to the API change in
2.6.13+ kernels dropping the host locking when entering the error
handling. They all end up calling adpt_i2o_post_wait(), which if you
call it unlocked, might return with host_lock locked anyway and that
causes a deadlock.

Signed-off-by: Mark Salyzyn <[email protected]>

drivers/scsi/dpt_i2o.c | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)

Patch attached to email due to Outlook corrupting content when inlined.

Sincerely -- Mark Salyzyn


Attachments:
dpt_i2o.deadlock.patch (1.95 kB)
dpt_i2o.deadlock.patch

2005-11-29 18:04:39

by Lennart Sorensen

[permalink] [raw]
Subject: Re: [2.6 patch] dpt_i2o fix for deadlock condition

On Tue, Nov 29, 2005 at 11:51:25AM -0500, Salyzyn, Mark wrote:
> Miquel van Smoorenburg <[email protected]> forwarded me this fix to
> resolve a deadlock condition that occurs due to the API change in
> 2.6.13+ kernels dropping the host locking when entering the error
> handling. They all end up calling adpt_i2o_post_wait(), which if you
> call it unlocked, might return with host_lock locked anyway and that
> causes a deadlock.
>
> Signed-off-by: Mark Salyzyn <[email protected]>
>
> drivers/scsi/dpt_i2o.c | 25 ++++++++++++++++++++-----
> 1 file changed, 20 insertions(+), 5 deletions(-)
>
> Patch attached to email due to Outlook corrupting content when inlined.

There must still be a way to tell outlook to make the type something
useful, rather than application/octet-stream. maybe if the extension
was .patch.txt it would do something smarter.

Len Sorensen

2005-11-29 18:53:38

by Adrian Bunk

[permalink] [raw]
Subject: Re: [2.6 patch] dpt_i2o fix for deadlock condition

On Tue, Nov 29, 2005 at 01:04:37PM -0500, Lennart Sorensen wrote:
> On Tue, Nov 29, 2005 at 11:51:25AM -0500, Salyzyn, Mark wrote:
> > Miquel van Smoorenburg <[email protected]> forwarded me this fix to
> > resolve a deadlock condition that occurs due to the API change in
> > 2.6.13+ kernels dropping the host locking when entering the error
> > handling. They all end up calling adpt_i2o_post_wait(), which if you
> > call it unlocked, might return with host_lock locked anyway and that
> > causes a deadlock.
> >
> > Signed-off-by: Mark Salyzyn <[email protected]>
> >
> > drivers/scsi/dpt_i2o.c | 25 ++++++++++++++++++++-----
> > 1 file changed, 20 insertions(+), 5 deletions(-)
> >
> > Patch attached to email due to Outlook corrupting content when inlined.
>
> There must still be a way to tell outlook to make the type something
> useful, rather than application/octet-stream. maybe if the extension
> was .patch.txt it would do something smarter.

Patches in Attachments aren't nice, but better than corrupted patches.

It's unfortunate, but bitching on the people who are somehow forced to
use crappy email clients is IMHO not a good idea.

> Len Sorensen

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed