Re: [Ext2-devel] [RFC] probably bug in current ext3/jbd

From: Stephen C. Tweedie (sct@redhat.com)
Date: Mon May 19 2003 - 15:51:33 EST


Hi,

On Tue, 2003-05-20 at 01:46, Alex Tomas wrote:

> please, look:
>
> thread A commit thread
>
> if (jh->b_committed_data) {
> kfree(jh->b_committed_data);
> jh->b_committed_data = NULL;
> }
> access for
> b_committed_data == NULL ?

Not with BKL. Without it, yes, that's definitely a risk, and you need
some locking for the access to b_committed_data. Without that, even if
you keep the jh->b_committed_data field valid, you risk freeing the old
copy that another thread is using.

Cheers,
 Stephen

-
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/



This archive was generated by hypermail 2b29 : Fri May 23 2003 - 22:00:36 EST