On Thu, Sep 10, 2015 at 08:26:59PM +0200, Dmitry Vyukov wrote: > On Thu, Sep 10, 2015 at 8:13 PM, Christoph Lameter <cl@xxxxxxxxx> wrote: > > On Thu, 10 Sep 2015, Dmitry Vyukov wrote: > > > >> On Thu, Sep 10, 2015 at 8:01 PM, Christoph Lameter <cl@xxxxxxxxx> wrote: > >> > On Thu, 10 Sep 2015, Paul E. McKenney wrote: > >> > > >> >> The reason we poked at this was to see if any of SLxB touched the > >> >> memory being freed. If none of them touched the memory being freed, > >> >> and if that was a policy, then the idiom above would be legal. However, > >> >> one of them does touch the memory being freed, so, yes, the above code > >> >> needs to be fixed. > >> > > >> > The one that touches the object has a barrier() before it touches the > >> > memory. > >> > >> It does not change anything, right? > > > > It changes the first word of the object after the barrier. The first word > > is used in SLUB as the pointer to the next free object. > > User can also write to this object after it is reallocated. It is > equivalent to kmalloc writing to the object. > And barrier is not the kind of barrier that would make it correct. > So I do not see how it is relevant. I believe that the two of you are talking past each other. It sounds to me that Christoph is arguing that SL*B is correctly implemented, and that Dmitry is arguing that the use case is broken. >From what I can see, both are correct. Thanx, Paul -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>