On Tuesday 03 October 2006 11:03 am, Alan Stern wrote:
> > > Notice another questionable use of hcd->state.
> >
> > Questionable in what way? When that code is called to clean up
> > after driver death, that loop must be ignored ... every pending I/O
> > can safely be scrubbed. That's the main point of that particular
> > HC_IS_RUNNING() test. In other cases, it's essential not to touch
> > DMA queue entries that the host controller is still using.
>
> Questionable because changes to hcd->state aren't synchronized with the
> driver. In this case it probably doesn't end up making any difference.
The driver changes hcd->state with its spinlock held ... or it did,
last time I audited that code.
> Removing "regs &&" might change other aspects too. For instance, does
> this routine ever get called from a timer routine, where regs would
> normally be NULL? In such situations removing "regs &&" would reverse
> the sense of the test.
As I said in my previous comments: should not be an issue. OHCI doesn't
have timers. That routine is normally called in_irq(), with the other
two call sites being cases where the controller is stopped.
- Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]