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

Bug#497562: Patch from Red Hat



I found this related information at Red Hat EL 4.8's RHSA-2009:0331-14.
The trouble caused by race conditions.

Information from Red Hat:
 * http://rhn.redhat.com/errata/RHSA-2009-0331.html
 * => https://bugzilla.redhat.com/show_bug.cgi?id=476533 (published info, link from RHSA-2009:0331-14)
 * => https://bugzilla.redhat.com/show_bug.cgi?id=460179 (this is Red Hat's private)
 * Red Hat's patchname:linux-2.6.9-fs-fix-it-already-cleared-for-block-errors.patch
    linux/fs/buffer.c::void unlock_buffer is :
    {
    +       smp_mb__before_clear_bit();
            clear_bit_unlock(BH_Lock, &bh->b_state);
            smp_mb__after_clear_bit();
            wake_up_bit(&bh->b_state, BH_Lock);
    }

They said, 
> a misplaced memory barrier at unlock_buffer() could lead to a concurrent
> h_refcounter update which produced a reference counter leak and, later, a
> double free in ext3_xattr_release_block(). Consequent to the double free,
> ext3 reported an error
> 
> ext3_free_blocks_sb: bit already cleared for block [block number]
>
> and mounted itself as read-only. With this update, the memory barrier is
> now placed before the buffer head lock bit, forcing the write order and
> preventing the double free. (BZ#476533)



Reply to: