From: Ulrich Drepper Date: Thu, 2 Jul 2009 10:30:55 +0000 (-0700) Subject: Fix possible race when freeing object in fast bin list. X-Git-Tag: upstream/2.30~13490 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6cbbaa50aac809ad6e0692247876c82d58e466bf;p=external%2Fglibc.git Fix possible race when freeing object in fast bin list. --- diff --git a/ChangeLog b/ChangeLog index 0c6c36f..4700e7d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-07-02 Ulrich Drepper + + * malloc/malloc.c [ATOMIC_FASTBINS] (_int_free): Add full barrier when + adding to fast bin list. + 2009-07-01 Ulrich Drepper * nis/nss_nis/nis-network.c (_nss_nis_getnetbyaddr_r): Don't use diff --git a/malloc/malloc.c b/malloc/malloc.c index 516d401..70e4e58 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -4822,6 +4822,7 @@ _int_free(mstate av, mchunkptr p) goto errout; } p->fd = fd = old; + atomic_full_barrier (); } while ((old = catomic_compare_and_exchange_val_acq (fb, p, fd)) != fd); #else