Re: [PATCH] /dev/mem: Add missing memory barriers for devmem_inode

2020-07-16 Thread Dan Williams
On Wed, Jul 15, 2020 at 11:07 PM Eric Biggers wrote: > > From: Eric Biggers > > WRITE_ONCE() isn't the correct way to publish a pointer to a data > structure, since it doesn't include a write memory barrier. Therefore > other tasks may see that the pointer has been set but not see that the >

[PATCH] /dev/mem: Add missing memory barriers for devmem_inode

2020-07-16 Thread Eric Biggers
From: Eric Biggers WRITE_ONCE() isn't the correct way to publish a pointer to a data structure, since it doesn't include a write memory barrier. Therefore other tasks may see that the pointer has been set but not see that the pointed-to memory has finished being initialized yet. Instead a