lkml.org 
[lkml]   [2003]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PATCH:ide_do_reset() fix for 2.5.66
On Thu, Apr 03 2003, rain.wang wrote:
> Hi Alan,
> I found just changing ide_do_reset() to wait till completion can
> handle the handler race. can this be enough?

This is buggy for a number of reasons. Firstly, how do you make sure
that someone else doesn't race with your hwif_data manipulation? This
looks very suspect. By far the worst problem is that you are assuming
that ide_do_reset() can sleep, when in fact it cannot (just follow the
various paths into ide_do_request()). You even grab the ide_lock _and_
disable interrupts yourself prior calling wait_for_completion(), this is
incredibly broken.

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.080 / U:2.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site