tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: biodone vs. BUFQ_PEEK



On Thu, Sep 11, 2008 at 10:46:20PM +0200, Manuel Bouyer wrote:
> On Thu, Sep 11, 2008 at 01:18:28PM +0200, Juergen Hannken-Illjes wrote:
> > While looking for something completely different I found this fragment of
> > biodone():
> > 
> >     if (cpu_intr_p()) {
> >             ...
> >             TAILQ_INSERT_TAIL(&curcpu()->ci_data.cpu_biodone, bp, b_actq);
> > 
> > This should lead to the corruption of b_actq if the buffer was dequeued with
> > BUFQ_PEEK() that leaves the buffer on the queue (using b_actq).
> > 
> > Confused,
> 
> I'm not sure you're supposed to call biodone on a buffer you got using
> BUFQ_PEEK(), without dequeuing it. Do you see some places that do it ?

Not sure. ld(4) does BUFQ_PEEK/_start/BUFQ_GET inside a mutex.
-- 
Juergen Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig 
(Germany)


Home | Main Index | Thread Index | Old Index