Re: 2.5 Problem Status Report

Oleg Drokin
2002-09-11T10:42:54Z

Hello!

On Wed, Sep 11, 2002 at 12:29:26PM +0200, Jens Axboe wrote:

> > ok I see the bug. it's due to the imbalanced nature of ide_map_buffer()
> > vs ide_unmap_buffer(). i'll cook up a fix right away.
> Does this make it work?

No. It fails exactly like without the patch.

> --- include/linux/ide.h~ 2002-09-11 12:27:14.000000000 +0200
> +++ include/linux/ide.h 2002-09-11 12:27:29.000000000 +0200
> @@ -597,9 +597,10 @@
> return rq->buffer + task_rq_offset(rq);
> }
>
> -extern inline void ide_unmap_buffer(char *buffer, unsigned long *flags)
> +extern inline void ide_unmap_buffer(struct request *rq, char *buffer, unsigned long *flags)
> {
> - bio_kunmap_irq(buffer, flags);
> + if (rq->bio)
> + bio_kunmap_irq(buffer, flags);
> }
>
> /*

Perhaps you forgot to make sure rq->bio is zeroed on unmapping/freeing?

Bye,
Oleg