Re: biodone panics
From: Alex Lyashkov (umka_at_sevcity.net)
Date: 09/29/05
- Previous message: Don Lewis: "Re: stress test deadlock involving vm and/or geom"
- In reply to: Peter Edwards: "biodone panics"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: Peter Edwards <peadar.edwards@gmail.com> Date: Thu, 29 Sep 2005 10:01:18 +0300
>
> the call to wakeup may set in motion some events that cause the bio to
> be freed. By the time the mtx_unlock completes, "bp" could point to an
> invalid bio, and the "if (bp->bio_done != NULL)" is bogus. True?
> Shouldn't it be
>
> > biodone(struct bio *bp)
> > {
> > void (*done)(struct bio *);
> >
> > mtx_lock(&bdonelock);
> > bp->bio_flags |= BIO_DONE;
> > done = bp->bio_done
> > if (done == NULL)
> > wakeup(bp);
> > mtx_unlock(&bdonelock);
> > if (done != NULL)
> > bp->bio_done(bp);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
posible
if( done != NULL )
done(bp);
?
> > }
>
> Anyone agree?
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
- Previous message: Don Lewis: "Re: stress test deadlock involving vm and/or geom"
- In reply to: Peter Edwards: "biodone panics"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]