On Tue, May 26, 2015 at 10:01:24AM +0200, Daniel Vetter wrote: > On Mon, May 25, 2015 at 06:48:44PM +0100, Chris Wilson wrote: > > Since the advent of mmap(wc), where we reused the same cache domain for > > WC and GTT paths (oh, how I regret that double-edged advice), we need to > > be extra cautious when using GTT iomap_wc internally. Since userspace maybe > > modifying through the mmap(wc) and we then modify modifying through an > > aliased WC path through the GTT, those writes may overlap and not be > > visible to the other path. Easiest to trigger appears to be write the > > batch through mmap(wc) and then attempt to perform reloc the GTT, > > corruption quickly ensues. > > > > v2: Be stricter and do a full mb() in case we are reading through one > > path and about to write through the second path. Also, apply the > > barriers on transitioning into the GTT domain as well to cover the white > > lie asychronous cases. > > > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > > Cc: Akash Goel <akash.goel@xxxxxxxxx> > > Cc: stable@xxxxxxxxxxxxxxx > > There are a lot more mb() and wmb() in the gem code. I count execlist, > legacy rings, pwrite, set_domain and finish_gtt. You have more than I have... -Chris -- Chris Wilson, Intel Open Source Technology Centre -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html