On Tue, Oct 20, 2020 at 04:08:13PM +0200, Jan Beulich wrote: > There's no global lock around the updating of this global piece of data. > Make use of cmpxchgptr() to avoid two entities racing with their > updates. > > While touching the functionality, mark xen_consumers[] read-mostly (or > else the if() condition could use the result of cmpxchgptr(), writing to > the slot unconditionally). > > The use of cmpxchgptr() here points out (by way of clang warning about > it) that its original use of const was slightly wrong. Adjust the > placement, or else undefined behavior of const qualifying a function > type will result. > > Signed-off-by: Jan Beulich <[email protected]>
Reviewed-by: Roger Pau Monné <[email protected]> Thanks, Roger.
